Remove trailing commas in 'select_value' arguments
This commit is contained in:
parent
afdfbff7bc
commit
6ca4592d84
4 changed files with 738 additions and 779 deletions
|
|
@ -2,6 +2,10 @@ function commaSeparated(elem) {
|
|||
return seq(elem, repeat(seq(",", elem)), optional(","))
|
||||
}
|
||||
|
||||
function commaSeparatedNoTrailing(elem) {
|
||||
return seq(elem, repeat(seq(",", elem)))
|
||||
}
|
||||
|
||||
function trailingCommaSeparated(elem) {
|
||||
return repeat(seq(elem, ","))
|
||||
}
|
||||
|
|
@ -130,7 +134,7 @@ module.exports = grammar({
|
|||
select_value: ($) => seq(
|
||||
field("name", $.identifier),
|
||||
"(",
|
||||
field("arguments", optional(commaSeparated($._string_literal))),
|
||||
field("arguments", optional(commaSeparatedNoTrailing($._string_literal))),
|
||||
")",
|
||||
),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue