Closed
Description
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>)))
Metadata
Metadata
Assignees
Labels
No labels