Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/etyp/assert'
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed Nov 6, 2024
2 parents 3c8742c + 9e8020e commit 0800faa
Show file tree
Hide file tree
Showing 6 changed files with 92,669 additions and 89,939 deletions.
3 changes: 3 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ module.exports = grammar({
// Same ambiguity as above for 'const'
prec(-1, $.preproc_directive),
";",
seq("assert", $.expr, optional($.assert_msg), ";"),
),

stmt_list: ($) => repeat1($.stmt),
Expand All @@ -188,6 +189,8 @@ module.exports = grammar({
case_type_list: ($) =>
list1(seq("type", $.type, optional(seq("as", $.id))), ","),

assert_msg: ($) => seq(",", $.expr),

type: ($) =>
choice(
"addr",
Expand Down
1 change: 1 addition & 0 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

[
"add"
"assert"
"break"
"case"
"const"
Expand Down
42 changes: 42 additions & 0 deletions src/grammar.json

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

31 changes: 27 additions & 4 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 0800faa

Please sign in to comment.