mirror of
https://github.com/github/codeql.git
synced 2026-05-14 03:09:26 +02:00
unified: Promote enum_type_parameter to named and add fields
This commit is contained in:
@@ -1699,20 +1699,17 @@ module.exports = grammar({
|
||||
enum_type_parameters: ($) =>
|
||||
seq(
|
||||
"(",
|
||||
optional(
|
||||
sep1(
|
||||
seq(
|
||||
optional(
|
||||
seq(optional($.wildcard_pattern), $.simple_identifier, ":")
|
||||
),
|
||||
$.type,
|
||||
optional(seq($._equal_sign, $.expression))
|
||||
),
|
||||
","
|
||||
)
|
||||
),
|
||||
optional(sep1(field("parameter", $.enum_type_parameter), ",")),
|
||||
")"
|
||||
),
|
||||
enum_type_parameter: ($) =>
|
||||
seq(
|
||||
optional(
|
||||
seq(optional(field("external_name", $.wildcard_pattern)), field("name", $.simple_identifier), ":")
|
||||
),
|
||||
field("type", $.type),
|
||||
optional(seq($._equal_sign, field("default_value", $.expression)))
|
||||
),
|
||||
protocol_declaration: ($) =>
|
||||
prec.right(
|
||||
seq(
|
||||
|
||||
@@ -268,8 +268,13 @@ named:
|
||||
modifiers?: modifiers
|
||||
name+: simple_identifier
|
||||
raw_value*: expression
|
||||
enum_type_parameter:
|
||||
default_value?: expression
|
||||
external_name?: wildcard_pattern
|
||||
name?: simple_identifier
|
||||
type: type
|
||||
enum_type_parameters:
|
||||
$children*: [expression, type, wildcard_pattern]
|
||||
parameter*: enum_type_parameter
|
||||
equality_constraint:
|
||||
attribute*: attribute
|
||||
constrained_type: [identifier, nested_type_identifier]
|
||||
|
||||
Reference in New Issue
Block a user