tree-sitter/test/fixtures/test_grammars/precedence_on_single_child_missing
2025-09-16 02:24:11 -04:00
..
expected_error.txt Ensure interpretations are in a predictable order in conflict messages 2019-02-08 17:11:44 -08:00
grammar.js feat: migrate to ESM 2025-09-16 02:24:11 -04:00
readme.md Rename spec -> test 2017-03-09 20:40:01 -08:00

This language has function calls similar to Ruby's, with no parentheses required, and optional blocks.

There is a shift/reduce conflict here:

foo bar { baz }
       ^

The possible actions are:

  1. reduce(expression, 1) - bar is an expression being passed to the foo function.
  2. shift - bar is a function being called with the block { baz }

The grammars precedence_on_single_child_negative and precedence_on_single_child_positive show possible resolutions to this conflict.