-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Remove Width as a keyword #101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the thorough review of the changes. I will publish a new release in a few hours.
No, worries. I should have made that check before posting the list of statements, but the docs is misleading in that regard. |
Agreed. MS docs should be more clear. I have checked the docs for every keyword you added too and did not spot width being special. |
In the future, we might use the list of keywords in the docs: https://learn.microsoft.com/en-us/office/vba/language/reference/keywords-visual-basic-for-applications However I haven't checked whether it is complete. |
The keyword vscode-vba/syntaxes/vba.tmGrammar.yml Line 102 in b142af1
vscode-vba/syntaxes/tests/vba/other.bas Line 132 in b142af1
Lines 67 to 73 in b142af1
|
@h8nor While it is true that we can't create a variable directly in VBA with the type For example, this is valid VBA syntax: Private Declare PtrSafe Function SendMessageA Lib "user32" (ByVal hWnd As LongPtr, ByVal wMsg As Long, _
ByVal wParam As LongPtr, lParam As Any) As LongPtr |
I wanted to double check that all the IO keywords that were introduced were reserved keywords and could not be confused with variables.
Turns out it's the case for all of them except
Width
:Then, I went and looked at the documentation and noticed that the
Width
statement is not a real statement, it's more of Sub and the VBA object explorer confirms this:I would then suggest to remove it from the list as it's not even highlighted in the VBE itself.
Related issue: #96