mirror of
https://github.com/hanzoai/ast.git
synced 2026-10-30 18:47:38 +00:00
These tests are easier to write and maintain if the grammars are just JS, like grammars normally are. It doesn't slow the tests down significantly to shell out to `node` for each of these grammars.
11 lines
176 B
JavaScript
11 lines
176 B
JavaScript
module.exports = grammar({
|
|
name: 'epsilon_rules',
|
|
|
|
rules: {
|
|
rule_1: $ => $.rule_2,
|
|
|
|
rule_2: $ => optional($.rule_3),
|
|
|
|
rule_3: $ => 'x'
|
|
}
|
|
}); |