Skip to content

Commit

Permalink
add support for response redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
treywood committed Sep 1, 2024
1 parent 49e1cee commit 7c68e1c
Show file tree
Hide file tree
Showing 6 changed files with 4,618 additions and 4,173 deletions.
9 changes: 9 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ module.exports = grammar({
),
NL,
$.res_handler_script,
$.res_redirect,
),
),
),
Expand Down Expand Up @@ -213,6 +214,14 @@ module.exports = grammar({
token(prec(1, "%}")),
),

res_redirect: ($) =>
seq(
token(prec(PREC.REQ_SEPARATOR, />>!?/)),
WS,
field("path", $.path),
token(repeat1(NL)),
),

variable_declaration: ($) =>
seq(
"@",
Expand Down
63 changes: 63 additions & 0 deletions src/grammar.json

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

20 changes: 20 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 7c68e1c

Please sign in to comment.