Skip to content

Commit

Permalink
chore: add within until (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored Oct 16, 2024
1 parent 5f45436 commit f471036
Show file tree
Hide file tree
Showing 7 changed files with 28,530 additions and 27,591 deletions.
3 changes: 3 additions & 0 deletions bindings/rust/build.rs

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

9 changes: 8 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,14 @@ module.exports = grammar({
),
// --- conditional pattern ------------

within: ($) => seq('within', allowCurly(field('pattern', $._pattern))),
within: ($) =>
prec.right(
seq(
'within',
allowCurly(field('pattern', $._pattern)),
optional(seq('until', field('until', $._pattern))),
),
),

_bubbleScope: ($) => prec.right(seq('bubble', optional(seq('(', commaSep($.variable), ')')))),

Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
"lexer",
"gritql"
],
"files": [
"grammar.js",
"binding.gyp",
"prebuilds/**",
"bindings/node/*",
"queries/*",
"src/**"
],
"scripts": {
"build": "tree-sitter generate",
"parse": "tree-sitter parse",
Expand All @@ -22,6 +30,7 @@
"prebuildify": "prebuildify --napi --strip"
},
"main": "bindings/node",
"types": "bindings/node",
"dependencies": {
"node-addon-api": "^7.1.0",
"node-gyp-build": "^4.8.0"
Expand Down
107 changes: 68 additions & 39 deletions src/grammar.json

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

206 changes: 206 additions & 0 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 f471036

Please sign in to comment.