Skip to content

Commit

Permalink
fix: parse error_union_type correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
chottolabs authored Sep 22, 2024
1 parent 21e2218 commit e5509b2
Show file tree
Hide file tree
Showing 4 changed files with 123,912 additions and 129,012 deletions.
3 changes: 1 addition & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ module.exports = grammar({
optional($.address_space),
optional($.link_section),
optional($.calling_convention),
optional('!'),
field('type', choice($.type_expression, $.if_type_expression, $.comptime_type_expression)),
),

Expand Down Expand Up @@ -692,7 +691,7 @@ module.exports = grammar({
)),

error_union_type: $ => prec.right(2, seq(
field('error', $.type_expression),
optional(field('error', $.type_expression)),
'!',
field('ok', $.type_expression),
)),
Expand Down
32 changes: 14 additions & 18 deletions src/grammar.json

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

2 changes: 1 addition & 1 deletion 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 e5509b2

Please sign in to comment.