mirror of
https://github.com/github/codeql.git
synced 2026-05-14 03:09:26 +02:00
unified: Prevent field bleed-through from _if_let_binding
Same procedure as before -- we change the anonymous node to a named node, and the problem magically goes away.
This commit is contained in:
@@ -1041,8 +1041,8 @@ module.exports = grammar({
|
||||
)
|
||||
),
|
||||
if_condition: ($) =>
|
||||
choice($._if_let_binding, $.expression, $.availability_condition),
|
||||
_if_let_binding: ($) =>
|
||||
choice($.if_let_binding, $.expression, $.availability_condition),
|
||||
if_let_binding: ($) =>
|
||||
seq(
|
||||
$._direct_or_indirect_binding,
|
||||
optional(seq($._equal_sign, $.expression)),
|
||||
|
||||
@@ -235,7 +235,9 @@ named:
|
||||
identifier:
|
||||
$children+: simple_identifier
|
||||
if_condition:
|
||||
$children*: [availability_condition, expression, pattern, type, type_annotation, user_type, value_binding_pattern, where_clause, wildcard_pattern]
|
||||
$children: [availability_condition, expression, if_let_binding]
|
||||
if_let_binding:
|
||||
$children*: [expression, pattern, type, type_annotation, user_type, value_binding_pattern, where_clause, wildcard_pattern]
|
||||
bound_identifier?: simple_identifier
|
||||
if_statement:
|
||||
$children*: [else, if_statement, statements]
|
||||
|
||||
Reference in New Issue
Block a user