diff --git a/grammar.js b/grammar.js index cfc6bc6..44ddff0 100644 --- a/grammar.js +++ b/grammar.js @@ -132,7 +132,7 @@ module.exports = grammar({ insert_items: ($) => choice( seq(kw("default"), kw("values")), - seq(kw("values"), $.insert_values, repeat(seq(",", $.insert_values))), + seq(kw("values"), commaSep1($.insert_values)), $.select_statement, seq("(", $.select_statement, ")") ), diff --git a/src/grammar.json b/src/grammar.json index b7486b9..076c56f 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -842,24 +842,29 @@ "value": "values" }, { - "type": "SYMBOL", - "name": "insert_values" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "insert_values" + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "insert_values" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "insert_values" + } + ] } - ] - } + } + ] } ] },