Closed berchn closed 2 years ago
I think the fix might be to change this:
to this:
field_declaration: $ => seq(
choice(
seq(
field('name', $._field_identifier),
repeat(seq(',', field('name', $._field_identifier))),
field('type', $._type)
),
There's a similar problem in parameter_declaration here:
which should be changed to:
parameter_declaration: $ => seq(
field('name', $._identifier),
repeat(seq(',', field('name', $._identifier))),
field('type', $._type)
),
To determine whether an unnamed node is or isn't interesting, I look at whether it is part of a field. In the case of
var_spec
, the comma is included in the "name" field, but it isn't interesting in the context of the node. The following is an example: