tree-sitter-bash
tree-sitter-bash copied to clipboard
Option arguments should be treated differently
Option arguments (-foo --bar) should not be mapped to argument: (word) like other arguments.
For example, this script produces the following syntax tree:
cmake . --fresh -B build -DCMAKE_BUILD_TYPE=Release
(program
(command
name: (command_name
(word))
argument: (word)
argument: (word)
argument: (word)
argument: (word)
argument: (word)))
I think it'd be better if options were differentiated with something like this:
(program
(command
name: (command_name
(word))
argument: (word)
(option)
(option)
(option
operator: '='
value: (word))))