tree-sitter/test/fixtures/test_grammars/immediate_tokens
2018-08-01 14:00:57 -07:00
..
corpus.txt Add IMMEDIATE_TOKEN rule type, for enforcing no preceding extras 2018-08-01 14:00:57 -07:00
grammar.json Add IMMEDIATE_TOKEN rule type, for enforcing no preceding extras 2018-08-01 14:00:57 -07:00
readme.md Add IMMEDIATE_TOKEN rule type, for enforcing no preceding extras 2018-08-01 14:00:57 -07:00

This grammar demonstrates the usage of the IMMEDIATE_TOKEN rule. It allows the parser to produce a different token based on whether or not there are extras preceding the token's main content. When there are no leading extras, an immediate token is preferred over a normal token which would otherwise match.