mirror of
https://github.com/github/codeql.git
synced 2026-05-14 03:09:26 +02:00
unified: Remove some pointless fields
All of these fields have contents that are uniquely determined by the node they appear on, so they convey no information.
This commit is contained in:
@@ -1050,7 +1050,7 @@ module.exports = grammar({
|
||||
"if",
|
||||
sep1(field("condition", $.if_condition), ","),
|
||||
field("body", $.block),
|
||||
optional(seq(field("else_keyword", $["else"]), $._else_options))
|
||||
optional(seq(alias($["else"], "else"), $._else_options))
|
||||
)
|
||||
),
|
||||
if_condition: ($) =>
|
||||
@@ -1067,7 +1067,7 @@ module.exports = grammar({
|
||||
seq(
|
||||
"guard",
|
||||
sep1(field("condition", $.if_condition), ","),
|
||||
field("else_keyword", $["else"]),
|
||||
alias($["else"], "else"),
|
||||
field("body", $.block)
|
||||
)
|
||||
),
|
||||
@@ -1712,7 +1712,7 @@ module.exports = grammar({
|
||||
prec.right(
|
||||
seq(
|
||||
field("modifiers", optional($.modifiers)),
|
||||
field("declaration_kind", "protocol"),
|
||||
"protocol",
|
||||
field("name", alias($.simple_identifier, $.type_identifier)),
|
||||
field("type_parameters", optional($.type_parameters)),
|
||||
optional(seq(":", $._inheritance_specifiers)),
|
||||
@@ -1744,7 +1744,7 @@ module.exports = grammar({
|
||||
seq(
|
||||
field("modifiers", optional($.modifiers)),
|
||||
optional("class"),
|
||||
field("name", "init"),
|
||||
"init",
|
||||
optional(choice($._quest, field("bang", $.bang))),
|
||||
field("type_parameters", optional($.type_parameters)),
|
||||
$._function_value_parameters,
|
||||
|
||||
@@ -270,7 +270,6 @@ named:
|
||||
do_statement:
|
||||
body: block
|
||||
catch*: catch_block
|
||||
else:
|
||||
enum_case_entry:
|
||||
data_contents?: enum_type_parameters
|
||||
name: simple_identifier
|
||||
@@ -333,7 +332,6 @@ named:
|
||||
guard_statement:
|
||||
body: block
|
||||
condition+: if_condition
|
||||
else_keyword: else
|
||||
hex_literal:
|
||||
identifier:
|
||||
part+: simple_identifier
|
||||
@@ -348,7 +346,6 @@ named:
|
||||
body: block
|
||||
condition+: if_condition
|
||||
else_branch?: [block, if_statement]
|
||||
else_keyword?: else
|
||||
implicitly_unwrapped_type:
|
||||
name: type
|
||||
import_declaration:
|
||||
@@ -370,7 +367,6 @@ named:
|
||||
bang?: bang
|
||||
body?: block
|
||||
modifiers?: modifiers
|
||||
name: "init"
|
||||
parameter*: function_parameter
|
||||
throws?: [throws, throws_clause]
|
||||
type_constraints?: type_constraints
|
||||
@@ -526,7 +522,6 @@ named:
|
||||
protocol_declaration:
|
||||
attribute*: attribute
|
||||
body: protocol_body
|
||||
declaration_kind: "protocol"
|
||||
inherits*: inheritance_specifier
|
||||
modifiers?: modifiers
|
||||
name: type_identifier
|
||||
@@ -794,6 +789,7 @@ unnamed:
|
||||
- "dsohandle"
|
||||
- "dynamic"
|
||||
- "each"
|
||||
- "else"
|
||||
- "enum"
|
||||
- "extension"
|
||||
- "externalMacro"
|
||||
|
||||
Reference in New Issue
Block a user