Skip to content

Commit

Permalink
add field
Browse files Browse the repository at this point in the history
  • Loading branch information
treywood committed Aug 30, 2024
1 parent 99ddb89 commit 3870b81
Show file tree
Hide file tree
Showing 8 changed files with 3,917 additions and 24,837 deletions.
12 changes: 4 additions & 8 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ module.exports = grammar({
seq(
token(prec(4, />>!?/)),
WS,
$.path,
field("path", $.path),
NL
),

Expand Down Expand Up @@ -254,18 +254,14 @@ module.exports = grammar({
repeat1(token(prec(2, LINE_TAIL))),
),

_external_body: ($) =>
seq(
$.external_body,
repeat1(NL),
),
_external_body: ($) => seq($.external_body, NL),
external_body: ($) =>
seq(
prec.right(seq(
token(prec(2, "<")),
optional(seq("@", field("name", $.identifier))),
WS,
field("path", $.path),
),
)),

multipart_form_data: ($) =>
prec.right(seq(
Expand Down
Binary file added http.dylib
Binary file not shown.
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
"main": "bindings/node",
"types": "bindings/node",
"scripts": {
"gen": "tree-sitter generate",
"test": "tree-sitter test",
"parse": "tree-sitter parse",
"clean": "rm -r bindings; rm -r src; rm binding.gyp",
"install": "node-gyp-build",
"prebuildify": "prebuildify --napi --strip"
"prestart": "tree-sitter build --wasm",
"start": "tree-sitter playground",
"test": "node --test bindings/node/*_test.js"
},
"repository": {
"type": "git",
Expand Down
149 changes: 77 additions & 72 deletions src/grammar.json

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

21 changes: 11 additions & 10 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 3870b81

Please sign in to comment.