tree-sitter/test/fixtures/test_grammars/aliased_unit_reductions
2018-08-30 09:57:22 -07:00
..
corpus.txt Account for simple aliases in unit reduction elimination 2018-08-30 09:57:22 -07:00
grammar.json Account for simple aliases in unit reduction elimination 2018-08-30 09:57:22 -07:00
readme.md Fix unit reduction elimination bugs 2018-03-12 07:54:18 -07:00

Normally, when there are invisible rules (rules whose names start with an _) that simply wrap another rule, there is an optimization at parser-generation time called Unit Reduction Elimination that avoids creating nodes for those rules at runtime. One case where this optimization must not be applied is when those invisible rules are going to be aliased within their parent rule. In that situation, eliminating the invisible node could cause the alias to be incorrectly applied to its child.