Skip to content

Commit

Permalink
parser: allow returning string literal in on_error_phrase
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbz64 committed Feb 22, 2024
1 parent ae29568 commit a0704d0
Show file tree
Hide file tree
Showing 4 changed files with 134,436 additions and 117,405 deletions.
5 changes: 4 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,10 @@ module.exports = grammar({
seq(kw("LEAVE"), field("label", optional($.identifier))),
seq(kw("NEXT"), field("label", optional($.identifier))),
seq(kw("RETRY"), field("label", optional($.identifier))),
seq(kw("RETURN"), choice(seq(kw("ERROR")), kw("NO-APPLY"))),
seq(
kw("RETURN"),
choice(seq(kw("ERROR")), kw("NO-APPLY"), $._string_literal)
),
kw("THROW")
)
),
Expand Down
Loading

0 comments on commit a0704d0

Please sign in to comment.