tree-sitter-bash/src
Max Brunsfeld 6f81608535 Always lex braces and brackets as separate tokens
The lexer needs to always return braces and brackets separately so that
the parser can decide if they are part of some construct like an array
subscript or a variable expansion. This means that there was no point
in moving bare-word tokenization into the external scanner. I've moved
it back into the normal scanner.

The tricky part is how to deal with the separate '}' and ']' tokens
in the case where they are *not* part of a subscript or an expansion.
For example, in code like `echo {hi}`, the syntax tree should still
clearly indicate that only *one* argument is being passed to echo.
For now, we achieve this by grouping the '{', hi, and '}' tokens into
a single `concatenation` node, which is a bit odd, but it's the best
we can do.
2018-02-28 14:33:50 -08:00
..
tree_sitter Regenerate with latest tree-sitter 2018-02-12 16:53:11 -08:00
binding.cc Initial commit 2017-07-14 12:28:54 -07:00
grammar.json Always lex braces and brackets as separate tokens 2018-02-28 14:33:50 -08:00
parser.c Always lex braces and brackets as separate tokens 2018-02-28 14:33:50 -08:00
scanner.cc Always lex braces and brackets as separate tokens 2018-02-28 14:33:50 -08:00