Skip to content

Commit

Permalink
feat: add var_spec_list
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Aug 16, 2024
1 parent eb6589d commit 3454c3a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,7 @@ module.exports = grammar({
'var',
choice(
$.var_spec,
seq(
'(',
repeat(seq($.var_spec, terminator)),
')',
),
$.var_spec_list,
),
),

Expand All @@ -205,6 +201,12 @@ module.exports = grammar({
),
),

var_spec_list: $ => seq(
'(',
repeat(seq($.var_spec, terminator)),
')',
),

function_declaration: $ => prec.right(1, seq(
'func',
field('name', $.identifier),
Expand Down

0 comments on commit 3454c3a

Please sign in to comment.