diff --git a/grammar.js b/grammar.js index 63e36d5..1ecbb53 100644 --- a/grammar.js +++ b/grammar.js @@ -182,11 +182,12 @@ module.exports = grammar(lua, { object_type: $ => seq( '{', - commaSep1(seq( - choice($.identifier, $.object_field_type), - ':', - $.type, - )), + choice( + commaSep1( + seq(choice($.identifier, $.object_field_type), ':', $.type), + ), + commaSep1($.type), + ), optional(','), '}', ),