tree-sitter/test/fixtures/test_grammars/associativity_missing/grammar.js
2025-09-16 02:24:11 -04:00

18 lines
No EOL
333 B
JavaScript

export default grammar({
name: 'associativity_missing',
rules: {
expression: $ => choice(
$.math_operation,
$.identifier
),
math_operation: $ => seq(
$.expression,
'+',
$.expression,
),
identifier: $ => /[a-z]+/,
}
});