Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open myPath for input not highlighted #96

Closed
sancarn opened this issue Oct 13, 2023 · 7 comments
Closed

Open myPath for input not highlighted #96

sancarn opened this issue Oct 13, 2023 · 7 comments
Labels

Comments

@sancarn
Copy link
Contributor

sancarn commented Oct 13, 2023

Description and Reproduction Steps

Keywords not highlighted in:

  Open sPath For Input as #ff
    Input #ff, sContent
  Close #ff
@serkonda7
Copy link
Owner

@DecimalTurn
Copy link
Contributor

I'd suggest making a new keyword category just for I/O related keywords with scope name keyword.io.vba.

Here's the ones I could find:

@serkonda7
Copy link
Owner

@DecimalTurn thank you for the list. I have some time today and will implement it.

@serkonda7
Copy link
Owner

serkonda7 commented Nov 28, 2023

The changes are here: 33305c3

The test covers not all keywords yet.

Also some fine adjustments to the Open statement are needed. But this exceeds my time for now so I have opened #99

@DecimalTurn
Copy link
Contributor

In my opinion, it's not necessary to highlight the mode and access keywords inside the Open statement. Otherwise, the whole line of code is pretty much highlighted and I feel like too much highlighting is almost like no highlighting at all.

That being said, I'm not totally opposed to the idea, but that will need some more playing around with regex to make it work.

In the meantime, it would be weird that the Input keyword would be highlighted inside the Open statement and not the others (Append, Binary, Output, and Random). I tried something with a lookahead here to fix that. I'm just wondering if that's something that would cause issues with GitHub Linguist like we had to fix for lookbehind that were not of fixed length (#80) 🤔.

@DecimalTurn
Copy link
Contributor

I managed to use only a fixed length lookahead here. Let me know your thoughts.

@serkonda7
Copy link
Owner

@DecimalTurn btw, I included your concern from the comment in #99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants