Skip to content

Commit

Permalink
fix: correct parsing of map types in function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Nov 24, 2024
1 parent 3c3775f commit 12fe553
Show file tree
Hide file tree
Showing 4 changed files with 21,656 additions and 21,116 deletions.
6 changes: 3 additions & 3 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ module.exports = grammar({
')',
),

parameter_declaration: $ => prec.left(seq(
parameter_declaration: $ => seq(
commaSep(field('name', $.identifier)),
field('type', $._type),
)),
),

variadic_parameter_declaration: $ => seq(
field('name', optional($.identifier)),
Expand Down Expand Up @@ -302,7 +302,7 @@ module.exports = grammar({
$.interface_type,
$.array_type,
$.slice_type,
$.map_type,
prec.dynamic(3, $.map_type),
$.channel_type,
$.function_type,
$.negated_type,
Expand Down
108 changes: 54 additions & 54 deletions src/grammar.json

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

Loading

0 comments on commit 12fe553

Please sign in to comment.