mirror of
https://github.com/github/codeql.git
synced 2026-05-14 03:09:26 +02:00
unified: Group enum entries
Same as in the preceding commit.
This commit is contained in:
@@ -1681,15 +1681,14 @@ module.exports = grammar({
|
||||
field("modifiers", optional($.modifiers)),
|
||||
optional("indirect"),
|
||||
"case",
|
||||
sep1(
|
||||
seq(
|
||||
field("name", $.simple_identifier),
|
||||
optional($._enum_entry_suffix)
|
||||
),
|
||||
","
|
||||
),
|
||||
sep1(field("case", $.enum_case_entry), ","),
|
||||
optional(";")
|
||||
),
|
||||
enum_case_entry: ($) =>
|
||||
seq(
|
||||
field("name", $.simple_identifier),
|
||||
optional($._enum_entry_suffix)
|
||||
),
|
||||
_enum_entry_suffix: ($) =>
|
||||
choice(
|
||||
field("data_contents", $.enum_type_parameters),
|
||||
|
||||
@@ -271,13 +271,15 @@ named:
|
||||
body: block
|
||||
catch*: catch_block
|
||||
else:
|
||||
enum_case_entry:
|
||||
data_contents?: enum_type_parameters
|
||||
name: simple_identifier
|
||||
raw_value?: expression
|
||||
enum_class_body:
|
||||
member*: [enum_entry, type_level_declaration]
|
||||
enum_entry:
|
||||
data_contents*: enum_type_parameters
|
||||
case+: enum_case_entry
|
||||
modifiers?: modifiers
|
||||
name+: simple_identifier
|
||||
raw_value*: expression
|
||||
enum_type_parameter:
|
||||
default_value?: expression
|
||||
external_name?: wildcard_pattern
|
||||
|
||||
Reference in New Issue
Block a user