diff --git a/common/define-grammar.js b/common/define-grammar.js index 6284c19f..acf7d43a 100644 --- a/common/define-grammar.js +++ b/common/define-grammar.js @@ -314,7 +314,7 @@ module.exports = function defineGrammar(dialect) { optional(field('attributes', $.attribute_list)), keyword('case'), field('name', $.name), - optional(seq('=', field('value', choice($.string, $.integer)))), + optional(seq('=', field('value', choice($._string, $.integer)))), $._semicolon, ), diff --git a/common/test/corpus/declarations.txt b/common/test/corpus/declarations.txt index 179f4c25..ee5855f6 100644 --- a/common/test/corpus/declarations.txt +++ b/common/test/corpus/declarations.txt @@ -391,7 +391,7 @@ class B { name: (name) parameters: (formal_parameters (simple_parameter - attributes: (attribute_list + attributes: (attribute_list (attribute_group (attribute (name))) ) name: (variable_name (name)) @@ -651,8 +651,10 @@ enum Suit: string { case Hearts = 'H'; case Diamonds; - case Clubs = 'C'; - case Spades = 'S'; + case Clubs = "C"; + case Spades = <<