-
Notifications
You must be signed in to change notification settings - Fork 64
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
Missing reserved words #133
Comments
I support adding the A complete list of keywords and builtins can be generated with |
I added Also, " |
bye is a zsh builtin in my case The others are not exposed literals, so no point adding them as keywords unless they're separate statement rules |
Hi,
I notice that the grammar does not include some reserved words that are part of the language according to the Bash Reference Manual.
This is a list of some with some reserved words that are missing:
("time" "coproc" "type" "trap" "exit" "exec" "continue" "break" "return" "logout" "bye" "true" "false" "test")
My suspicion is that including those would complicate significantly the parser and that my be the reason to leave those out.
However, for fontification and other text editing tasks, it is desirable to identify those.
Is the recommend approach to use a generic query and a regex to find the above reserved words? Something like this:
(command_name ((word) @captured_keyword (#match? @captured_keyword <regex to reserved words>)))
The text was updated successfully, but these errors were encountered: