mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
unified: Introduced named property_binding node
This groups together a bunch of related values that would otherwise be impossible to match up correctly.
This commit is contained in:
@@ -1400,10 +1400,10 @@ module.exports = grammar({
|
||||
prec.right(
|
||||
seq(
|
||||
$._possibly_async_binding_pattern_kind,
|
||||
sep1($._single_modifierless_property_declaration, ",")
|
||||
sep1(field("declarator", $.property_binding), ",")
|
||||
)
|
||||
),
|
||||
_single_modifierless_property_declaration: ($) =>
|
||||
property_binding: ($) =>
|
||||
prec.left(
|
||||
seq(
|
||||
field("name", alias($._no_expr_pattern_already_bound, $.pattern)),
|
||||
|
||||
@@ -507,15 +507,17 @@ named:
|
||||
operation: ["&", "+", "++", "-", "--", ".", bang, custom_operator, "~"]
|
||||
target: expression
|
||||
property_behavior_modifier:
|
||||
property_binding:
|
||||
computed_value?: computed_property
|
||||
name: pattern
|
||||
observers?: willset_didset_block
|
||||
type?: type_annotation
|
||||
type_constraints?: type_constraints
|
||||
value?: expression
|
||||
property_declaration:
|
||||
binding: value_binding_pattern
|
||||
computed_value*: computed_property
|
||||
declarator+: property_binding
|
||||
modifiers*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier]
|
||||
name+: pattern
|
||||
observers*: willset_didset_block
|
||||
type*: type_annotation
|
||||
type_constraints*: type_constraints
|
||||
value*: expression
|
||||
property_modifier:
|
||||
protocol_body:
|
||||
member*: protocol_member_declaration
|
||||
|
||||
Reference in New Issue
Block a user