Skip to content

Commit

Permalink
refactor!: rename list to alternation
Browse files Browse the repository at this point in the history
The correct term is alternation, and correctly captures what this node
actually means in terms of the query syntax itself
  • Loading branch information
amaanq committed May 24, 2024
1 parent a12c4a1 commit 0dd04c2
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 326 deletions.
4 changes: 2 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = grammar({
$.anonymous_node,
$.grouping,
$.predicate,
$.list,
$.alternation,
$.field_definition,
),

Expand Down Expand Up @@ -75,7 +75,7 @@ module.exports = grammar({
string_content: $ => repeat1(choice(token.immediate(prec(PREC.STRING, /[^"\\]+/)), $.escape_sequence)),
parameters: $ => repeat1(choice($.capture, $.string, $._node_identifier)),
comment: _ => token(prec(PREC.COMMENT, seq(";", /.*/))),
list: $ => seq("[", repeat($.definition), "]", quantifier($), captures($)),
alternation: $ => seq("[", repeat($.definition), "]", quantifier($), captures($)),

grouping: $ => seq(
"(",
Expand Down
4 changes: 2 additions & 2 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 34 additions & 34 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0dd04c2

Please sign in to comment.