For some reason the rule doesn't seem to be working the way I expect it to since it will match a single entry in the array but not multiple ones.
Grammar rule:
// rule should match 1 or more comma separated expressions
// (i.e. literals, function calls, etc.)
array_literal: $ => seq('(', '/', commaSep1($._expression), '/', ')'),
Test source code:
y = (/ INT(1) /) ! matches
l(1:3) = (/1, INT(r/i), i/) ! doesn't match
For some reason the rule doesn't seem to be working the way I expect it to since it will match a single entry in the array but not multiple ones.
Grammar rule:
Test source code: