Use explicit 'nil_literal' rule
Makes the dumped AST more readable, and will probably help in writing future queries.
This commit is contained in:
parent
0bc7e59fc7
commit
02f83784b1
5 changed files with 54 additions and 29 deletions
|
|
@ -26,7 +26,7 @@ module.exports = grammar({
|
|||
),
|
||||
|
||||
_expr: ($) => choice(
|
||||
"nil",
|
||||
$.nil_literal,
|
||||
$.integer_literal,
|
||||
$.string_literal,
|
||||
|
||||
|
|
@ -35,6 +35,8 @@ module.exports = grammar({
|
|||
$.sequence_expression,
|
||||
),
|
||||
|
||||
nil_literal: (_) => "nil",
|
||||
|
||||
integer_literal: (_) => /[0-9]+/,
|
||||
|
||||
string_literal: ($) => seq(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue