mirror of
https://github.com/github/codeql.git
synced 2026-05-14 03:09:26 +02:00
unified: Consolidate fields in if_let_binding
This commit is contained in:
@@ -1907,10 +1907,10 @@ module.exports = grammar({
|
||||
_direct_or_indirect_binding: ($) =>
|
||||
seq(
|
||||
choice(
|
||||
$._binding_kind_and_pattern,
|
||||
seq("case", $._binding_pattern_no_expr)
|
||||
field("pattern", alias($._binding_kind_and_pattern, $.pattern)),
|
||||
seq("case", field("pattern", alias($._binding_pattern_no_expr, $.pattern)))
|
||||
),
|
||||
optional($.type_annotation)
|
||||
field("type", optional($.type_annotation))
|
||||
),
|
||||
value_binding_pattern: ($) => field("mutability", choice("var", "let")),
|
||||
_possibly_async_binding_pattern_kind: ($) =>
|
||||
|
||||
@@ -314,8 +314,8 @@ named:
|
||||
if_condition:
|
||||
kind: [availability_condition, expression, if_let_binding]
|
||||
if_let_binding:
|
||||
$children*: [pattern, simple_identifier, type, type_annotation, user_type, value_binding_pattern, wildcard_pattern]
|
||||
bound_identifier?: simple_identifier
|
||||
pattern: pattern
|
||||
type?: type_annotation
|
||||
value?: expression
|
||||
where?: where_clause
|
||||
if_statement:
|
||||
|
||||
Reference in New Issue
Block a user