From dd9c066c6139ccc4eeba6610a780e8cfffef7d8a Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 13 May 2026 14:24:12 +0000 Subject: [PATCH] unified: Regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 430 +++++++++++----------- unified/ql/lib/unified.dbscheme | 510 +++++++++++--------------- 2 files changed, 429 insertions(+), 511 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index db2e73df01b..1835f2c449a 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -364,6 +364,18 @@ module Swift { } } + /** A class representing `block` nodes. */ + class Block extends @swift_block, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "Block" } + + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_block_statement(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_block_statement(this, _, result) } + } + /** A class representing `boolean_literal` tokens. */ class BooleanLiteral extends @swift_token_boolean_literal, Token { /** Gets the name of the primary QL class for this element. */ @@ -471,22 +483,22 @@ module Swift { final override string getAPrimaryQlClass() { result = "CatchBlock" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_catch_block_body(this, result) } + final Block getBody() { swift_catch_block_def(this, result, _) } /** Gets the node corresponding to the field `error`. */ final Pattern getError() { swift_catch_block_error(this, result) } /** Gets the node corresponding to the field `keyword`. */ - final CatchKeyword getKeyword() { swift_catch_block_def(this, result) } + final CatchKeyword getKeyword() { swift_catch_block_def(this, _, result) } /** Gets the node corresponding to the field `where`. */ final WhereClause getWhere() { swift_catch_block_where(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_catch_block_body(this, result) or + swift_catch_block_def(this, result, _) or swift_catch_block_error(this, result) or - swift_catch_block_def(this, result) or + swift_catch_block_def(this, _, result) or swift_catch_block_where(this, result) } } @@ -677,7 +689,7 @@ module Swift { final Attribute getAttribute(int i) { swift_computed_getter_attribute(this, i, result) } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_computed_getter_body(this, result) } + final Block getBody() { swift_computed_getter_body(this, result) } /** Gets the node corresponding to the field `specifier`. */ final GetterSpecifier getSpecifier() { swift_computed_getter_def(this, result) } @@ -699,7 +711,7 @@ module Swift { final Attribute getAttribute(int i) { swift_computed_modify_attribute(this, i, result) } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_computed_modify_body(this, result) } + final Block getBody() { swift_computed_modify_body(this, result) } /** Gets the node corresponding to the field `specifier`. */ final ModifySpecifier getSpecifier() { swift_computed_modify_def(this, result) } @@ -720,13 +732,13 @@ module Swift { /** Gets the node corresponding to the field `accessor`. */ final AstNode getAccessor(int i) { swift_computed_property_accessor(this, i, result) } - /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_computed_property_body(this, result) } + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_computed_property_statement(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_computed_property_accessor(this, _, result) or - swift_computed_property_body(this, result) + swift_computed_property_statement(this, _, result) } } @@ -739,7 +751,7 @@ module Swift { final Attribute getAttribute(int i) { swift_computed_setter_attribute(this, i, result) } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_computed_setter_body(this, result) } + final Block getBody() { swift_computed_setter_body(this, result) } /** Gets the node corresponding to the field `parameter`. */ final SimpleIdentifier getParameter() { swift_computed_setter_parameter(this, result) } @@ -857,7 +869,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "DeinitDeclaration" } /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_deinit_declaration_def(this, result) } + final Block getBody() { swift_deinit_declaration_def(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_deinit_declaration_modifiers(this, result) } @@ -897,16 +909,30 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "DictionaryLiteral" } + /** Gets the node corresponding to the field `element`. */ + final DictionaryLiteralItem getElement(int i) { + swift_dictionary_literal_element(this, i, result) + } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_dictionary_literal_element(this, _, result) } + } + + /** A class representing `dictionary_literal_item` nodes. */ + class DictionaryLiteralItem extends @swift_dictionary_literal_item, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "DictionaryLiteralItem" } + /** Gets the node corresponding to the field `key`. */ - final Expression getKey(int i) { swift_dictionary_literal_key(this, i, result) } + final Expression getKey() { swift_dictionary_literal_item_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final Expression getValue(int i) { swift_dictionary_literal_value(this, i, result) } + final Expression getValue() { swift_dictionary_literal_item_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_dictionary_literal_key(this, _, result) or - swift_dictionary_literal_value(this, _, result) + swift_dictionary_literal_item_def(this, result, _) or + swift_dictionary_literal_item_def(this, _, result) } } @@ -933,7 +959,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "DidsetClause" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_didset_clause_body(this, result) } + final Block getBody() { swift_didset_clause_def(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_didset_clause_modifiers(this, result) } @@ -943,7 +969,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_didset_clause_body(this, result) or + swift_didset_clause_def(this, result) or swift_didset_clause_modifiers(this, result) or swift_didset_clause_parameter(this, result) } @@ -1006,21 +1032,37 @@ module Swift { final override string getAPrimaryQlClass() { result = "DoStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_do_statement_body(this, result) } + final Block getBody() { swift_do_statement_def(this, result) } /** Gets the node corresponding to the field `catch`. */ final CatchBlock getCatch(int i) { swift_do_statement_catch(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_do_statement_body(this, result) or swift_do_statement_catch(this, _, result) + swift_do_statement_def(this, result) or swift_do_statement_catch(this, _, result) } } - /** A class representing `else` tokens. */ - class Else extends @swift_token_else, Token { + /** A class representing `enum_case_entry` nodes. */ + class EnumCaseEntry extends @swift_enum_case_entry, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Else" } + final override string getAPrimaryQlClass() { result = "EnumCaseEntry" } + + /** Gets the node corresponding to the field `data_contents`. */ + final EnumTypeParameters getDataContents() { swift_enum_case_entry_data_contents(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final SimpleIdentifier getName() { swift_enum_case_entry_def(this, result) } + + /** Gets the node corresponding to the field `raw_value`. */ + final Expression getRawValue() { swift_enum_case_entry_raw_value(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_enum_case_entry_data_contents(this, result) or + swift_enum_case_entry_def(this, result) or + swift_enum_case_entry_raw_value(this, result) + } } /** A class representing `enum_class_body` nodes. */ @@ -1040,26 +1082,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "EnumEntry" } - /** Gets the node corresponding to the field `data_contents`. */ - final EnumTypeParameters getDataContents(int i) { - swift_enum_entry_data_contents(this, i, result) - } + /** Gets the node corresponding to the field `case`. */ + final EnumCaseEntry getCase(int i) { swift_enum_entry_case(this, i, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_enum_entry_modifiers(this, result) } - /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_enum_entry_name(this, i, result) } - - /** Gets the node corresponding to the field `raw_value`. */ - final Expression getRawValue(int i) { swift_enum_entry_raw_value(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_enum_entry_data_contents(this, _, result) or - swift_enum_entry_modifiers(this, result) or - swift_enum_entry_name(this, _, result) or - swift_enum_entry_raw_value(this, _, result) + swift_enum_entry_case(this, _, result) or swift_enum_entry_modifiers(this, result) } } @@ -1192,13 +1223,13 @@ module Swift { final override string getAPrimaryQlClass() { result = "ForStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_for_statement_body(this, result) } + final Block getBody() { swift_for_statement_def(this, result, _, _) } /** Gets the node corresponding to the field `collection`. */ - final Expression getCollection() { swift_for_statement_def(this, result, _) } + final Expression getCollection() { swift_for_statement_def(this, _, result, _) } /** Gets the node corresponding to the field `item`. */ - final Pattern getItem() { swift_for_statement_def(this, _, result) } + final Pattern getItem() { swift_for_statement_def(this, _, _, result) } /** Gets the node corresponding to the field `try`. */ final TryOperator getTry() { swift_for_statement_try(this, result) } @@ -1211,9 +1242,9 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_for_statement_body(this, result) or - swift_for_statement_def(this, result, _) or - swift_for_statement_def(this, _, result) or + swift_for_statement_def(this, result, _, _) or + swift_for_statement_def(this, _, result, _) or + swift_for_statement_def(this, _, _, result) or swift_for_statement_try(this, result) or swift_for_statement_type(this, result) or swift_for_statement_where(this, result) @@ -1226,18 +1257,6 @@ module Swift { final override string getAPrimaryQlClass() { result = "FullyOpenRange" } } - /** A class representing `function_body` nodes. */ - class FunctionBody extends @swift_function_body, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "FunctionBody" } - - /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_function_body_body(this, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_function_body_body(this, result) } - } - /** A class representing `function_declaration` nodes. */ class FunctionDeclaration extends @swift_function_declaration, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1246,16 +1265,8 @@ module Swift { /** Gets the node corresponding to the field `async`. */ final ReservedWord getAsync() { swift_function_declaration_async(this, result) } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_function_declaration_attribute(this, i, result) } - /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_function_declaration_def(this, result, _) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_function_declaration_default_value(this, i, result) - } + final Block getBody() { swift_function_declaration_def(this, result, _) } /** Gets the node corresponding to the field `modifiers`. */ final AstNode getModifiers(int i) { swift_function_declaration_modifiers(this, i, result) } @@ -1264,7 +1275,9 @@ module Swift { final AstNode getName() { swift_function_declaration_def(this, _, result) } /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { swift_function_declaration_parameter(this, i, result) } + final FunctionParameter getParameter(int i) { + swift_function_declaration_parameter(this, i, result) + } /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_function_declaration_return_type(this, result) } @@ -1285,9 +1298,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_function_declaration_async(this, result) or - swift_function_declaration_attribute(this, _, result) or swift_function_declaration_def(this, result, _) or - swift_function_declaration_default_value(this, _, result) or swift_function_declaration_modifiers(this, _, result) or swift_function_declaration_def(this, _, result) or swift_function_declaration_parameter(this, _, result) or @@ -1304,6 +1315,28 @@ module Swift { final override string getAPrimaryQlClass() { result = "FunctionModifier" } } + /** A class representing `function_parameter` nodes. */ + class FunctionParameter extends @swift_function_parameter, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "FunctionParameter" } + + /** Gets the node corresponding to the field `attribute`. */ + final Attribute getAttribute() { swift_function_parameter_attribute(this, result) } + + /** Gets the node corresponding to the field `default_value`. */ + final Expression getDefaultValue() { swift_function_parameter_default_value(this, result) } + + /** Gets the node corresponding to the field `parameter`. */ + final Parameter getParameter() { swift_function_parameter_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_function_parameter_attribute(this, result) or + swift_function_parameter_default_value(this, result) or + swift_function_parameter_def(this, result) + } + } + /** A class representing `function_type` nodes. */ class FunctionType extends @swift_function_type, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1356,19 +1389,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "GuardStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_guard_statement_body(this, result) } + final Block getBody() { swift_guard_statement_def(this, result) } /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_guard_statement_condition(this, i, result) } - /** Gets the node corresponding to the field `else_keyword`. */ - final Else getElseKeyword() { swift_guard_statement_def(this, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_guard_statement_body(this, result) or - swift_guard_statement_condition(this, _, result) or - swift_guard_statement_def(this, result) + swift_guard_statement_def(this, result) or swift_guard_statement_condition(this, _, result) } } @@ -1434,23 +1462,19 @@ module Swift { final override string getAPrimaryQlClass() { result = "IfStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody(int i) { swift_if_statement_body(this, i, result) } + final Block getBody() { swift_if_statement_def(this, result) } /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_if_statement_condition(this, i, result) } /** Gets the node corresponding to the field `else_branch`. */ - final IfStatement getElseBranch() { swift_if_statement_else_branch(this, result) } - - /** Gets the node corresponding to the field `else_keyword`. */ - final Else getElseKeyword() { swift_if_statement_else_keyword(this, result) } + final AstNode getElseBranch() { swift_if_statement_else_branch(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_if_statement_body(this, _, result) or + swift_if_statement_def(this, result) or swift_if_statement_condition(this, _, result) or - swift_if_statement_else_branch(this, result) or - swift_if_statement_else_keyword(this, result) + swift_if_statement_else_branch(this, result) } } @@ -1553,30 +1577,19 @@ module Swift { /** Gets the node corresponding to the field `async`. */ final ReservedWord getAsync() { swift_init_declaration_async(this, result) } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_init_declaration_attribute(this, i, result) } - /** Gets the node corresponding to the field `bang`. */ final Bang getBang() { swift_init_declaration_bang(this, result) } /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_init_declaration_body(this, result) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_init_declaration_default_value(this, i, result) - } + final Block getBody() { swift_init_declaration_body(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_init_declaration_modifiers(this, result) } - /** Gets the node corresponding to the field `name`. */ - final string getName() { - exists(int value | swift_init_declaration_def(this, value) | (result = "init" and value = 0)) - } - /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { swift_init_declaration_parameter(this, i, result) } + final FunctionParameter getParameter(int i) { + swift_init_declaration_parameter(this, i, result) + } /** Gets the node corresponding to the field `throws`. */ final AstNode getThrows() { swift_init_declaration_throws(this, result) } @@ -1594,10 +1607,8 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_init_declaration_async(this, result) or - swift_init_declaration_attribute(this, _, result) or swift_init_declaration_bang(this, result) or swift_init_declaration_body(this, result) or - swift_init_declaration_default_value(this, _, result) or swift_init_declaration_modifiers(this, result) or swift_init_declaration_parameter(this, _, result) or swift_init_declaration_throws(this, result) or @@ -1762,20 +1773,20 @@ module Swift { /** Gets the node corresponding to the field `attribute`. */ final Attribute getAttribute(int i) { swift_lambda_literal_attribute(this, i, result) } - /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_lambda_literal_body(this, result) } - /** Gets the node corresponding to the field `captures`. */ final CaptureList getCaptures() { swift_lambda_literal_captures(this, result) } + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_lambda_literal_statement(this, i, result) } + /** Gets the node corresponding to the field `type`. */ final LambdaFunctionType getType() { swift_lambda_literal_type(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_lambda_literal_attribute(this, _, result) or - swift_lambda_literal_body(this, result) or swift_lambda_literal_captures(this, result) or + swift_lambda_literal_statement(this, _, result) or swift_lambda_literal_type(this, result) } } @@ -1839,14 +1850,6 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "MacroDeclaration" } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_macro_declaration_attribute(this, i, result) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_macro_declaration_default_value(this, i, result) - } - /** Gets the node corresponding to the field `definition`. */ final MacroDefinition getDefinition() { swift_macro_declaration_definition(this, result) } @@ -1857,7 +1860,9 @@ module Swift { final SimpleIdentifier getName() { swift_macro_declaration_def(this, result) } /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { swift_macro_declaration_parameter(this, i, result) } + final FunctionParameter getParameter(int i) { + swift_macro_declaration_parameter(this, i, result) + } /** Gets the node corresponding to the field `return_type`. */ final UnannotatedType getReturnType() { swift_macro_declaration_return_type(this, result) } @@ -1874,8 +1879,6 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_macro_declaration_attribute(this, _, result) or - swift_macro_declaration_default_value(this, _, result) or swift_macro_declaration_definition(this, result) or swift_macro_declaration_modifiers(this, result) or swift_macro_declaration_def(this, result) or @@ -2295,16 +2298,41 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "PlaygroundLiteral" } + /** Gets the node corresponding to the field `argument`. */ + final PlaygroundLiteralArgument getArgument(int i) { + swift_playground_literal_argument(this, i, result) + } + + /** Gets the node corresponding to the field `kind`. */ + final string getKind() { + exists(int value | swift_playground_literal_def(this, value) | + result = "colorLiteral" and value = 0 + or + result = "fileLiteral" and value = 1 + or + result = "imageLiteral" and value = 2 + ) + } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_playground_literal_argument(this, _, result) } + } + + /** A class representing `playground_literal_argument` nodes. */ + class PlaygroundLiteralArgument extends @swift_playground_literal_argument, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "PlaygroundLiteralArgument" } + /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_playground_literal_name(this, i, result) } + final SimpleIdentifier getName() { swift_playground_literal_argument_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final Expression getValue(int i) { swift_playground_literal_value(this, i, result) } + final Expression getValue() { swift_playground_literal_argument_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_playground_literal_name(this, _, result) or - swift_playground_literal_value(this, _, result) + swift_playground_literal_argument_def(this, result, _) or + swift_playground_literal_argument_def(this, _, result) } } @@ -2402,6 +2430,44 @@ module Swift { final override string getAPrimaryQlClass() { result = "PropertyBehaviorModifier" } } + /** A class representing `property_binding` nodes. */ + class PropertyBinding extends @swift_property_binding, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "PropertyBinding" } + + /** Gets the node corresponding to the field `computed_value`. */ + final ComputedProperty getComputedValue() { + swift_property_binding_computed_value(this, result) + } + + /** Gets the node corresponding to the field `name`. */ + final Pattern getName() { swift_property_binding_def(this, result) } + + /** Gets the node corresponding to the field `observers`. */ + final WillsetDidsetBlock getObservers() { swift_property_binding_observers(this, result) } + + /** Gets the node corresponding to the field `type`. */ + final TypeAnnotation getType() { swift_property_binding_type(this, result) } + + /** Gets the node corresponding to the field `type_constraints`. */ + final TypeConstraints getTypeConstraints() { + swift_property_binding_type_constraints(this, result) + } + + /** Gets the node corresponding to the field `value`. */ + final Expression getValue() { swift_property_binding_value(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_property_binding_computed_value(this, result) or + swift_property_binding_def(this, result) or + swift_property_binding_observers(this, result) or + swift_property_binding_type(this, result) or + swift_property_binding_type_constraints(this, result) or + swift_property_binding_value(this, result) + } + } + /** A class representing `property_declaration` nodes. */ class PropertyDeclaration extends @swift_property_declaration, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -2410,43 +2476,19 @@ module Swift { /** Gets the node corresponding to the field `binding`. */ final ValueBindingPattern getBinding() { swift_property_declaration_def(this, result) } - /** Gets the node corresponding to the field `computed_value`. */ - final ComputedProperty getComputedValue(int i) { - swift_property_declaration_computed_value(this, i, result) + /** Gets the node corresponding to the field `declarator`. */ + final PropertyBinding getDeclarator(int i) { + swift_property_declaration_declarator(this, i, result) } /** Gets the node corresponding to the field `modifiers`. */ final AstNode getModifiers(int i) { swift_property_declaration_modifiers(this, i, result) } - /** Gets the node corresponding to the field `name`. */ - final Pattern getName(int i) { swift_property_declaration_name(this, i, result) } - - /** Gets the node corresponding to the field `observers`. */ - final WillsetDidsetBlock getObservers(int i) { - swift_property_declaration_observers(this, i, result) - } - - /** Gets the node corresponding to the field `type`. */ - final TypeAnnotation getType(int i) { swift_property_declaration_type(this, i, result) } - - /** Gets the node corresponding to the field `type_constraints`. */ - final TypeConstraints getTypeConstraints(int i) { - swift_property_declaration_type_constraints(this, i, result) - } - - /** Gets the node corresponding to the field `value`. */ - final Expression getValue(int i) { swift_property_declaration_value(this, i, result) } - /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_property_declaration_def(this, result) or - swift_property_declaration_computed_value(this, _, result) or - swift_property_declaration_modifiers(this, _, result) or - swift_property_declaration_name(this, _, result) or - swift_property_declaration_observers(this, _, result) or - swift_property_declaration_type(this, _, result) or - swift_property_declaration_type_constraints(this, _, result) or - swift_property_declaration_value(this, _, result) + swift_property_declaration_declarator(this, _, result) or + swift_property_declaration_modifiers(this, _, result) } } @@ -2491,14 +2533,7 @@ module Swift { final Attribute getAttribute(int i) { swift_protocol_declaration_attribute(this, i, result) } /** Gets the node corresponding to the field `body`. */ - final ProtocolBody getBody() { swift_protocol_declaration_def(this, result, _, _) } - - /** Gets the node corresponding to the field `declaration_kind`. */ - final string getDeclarationKind() { - exists(int value | swift_protocol_declaration_def(this, _, value, _) | - (result = "protocol" and value = 0) - ) - } + final ProtocolBody getBody() { swift_protocol_declaration_def(this, result, _) } /** Gets the node corresponding to the field `inherits`. */ final InheritanceSpecifier getInherits(int i) { @@ -2509,7 +2544,7 @@ module Swift { final Modifiers getModifiers() { swift_protocol_declaration_modifiers(this, result) } /** Gets the node corresponding to the field `name`. */ - final TypeIdentifier getName() { swift_protocol_declaration_def(this, _, _, result) } + final TypeIdentifier getName() { swift_protocol_declaration_def(this, _, result) } /** Gets the node corresponding to the field `type_constraints`. */ final TypeConstraints getTypeConstraints() { @@ -2524,10 +2559,10 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_protocol_declaration_attribute(this, _, result) or - swift_protocol_declaration_def(this, result, _, _) or + swift_protocol_declaration_def(this, result, _) or swift_protocol_declaration_inherits(this, _, result) or swift_protocol_declaration_modifiers(this, result) or - swift_protocol_declaration_def(this, _, _, result) or + swift_protocol_declaration_def(this, _, result) or swift_protocol_declaration_type_constraints(this, result) or swift_protocol_declaration_type_parameters(this, result) } @@ -2541,18 +2576,8 @@ module Swift { /** Gets the node corresponding to the field `async`. */ final ReservedWord getAsync() { swift_protocol_function_declaration_async(this, result) } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { - swift_protocol_function_declaration_attribute(this, i, result) - } - /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_protocol_function_declaration_body(this, result) } - - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_protocol_function_declaration_default_value(this, i, result) - } + final Block getBody() { swift_protocol_function_declaration_body(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_protocol_function_declaration_modifiers(this, result) } @@ -2561,7 +2586,7 @@ module Swift { final AstNode getName() { swift_protocol_function_declaration_def(this, result) } /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { + final FunctionParameter getParameter(int i) { swift_protocol_function_declaration_parameter(this, i, result) } @@ -2584,9 +2609,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_protocol_function_declaration_async(this, result) or - swift_protocol_function_declaration_attribute(this, _, result) or swift_protocol_function_declaration_body(this, result) or - swift_protocol_function_declaration_default_value(this, _, result) or swift_protocol_function_declaration_modifiers(this, result) or swift_protocol_function_declaration_def(this, result) or swift_protocol_function_declaration_parameter(this, _, result) or @@ -2776,7 +2799,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "RepeatWhileStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_repeat_while_statement_body(this, result) } + final Block getBody() { swift_repeat_while_statement_def(this, result) } /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { @@ -2785,7 +2808,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_repeat_while_statement_body(this, result) or + swift_repeat_while_statement_def(this, result) or swift_repeat_while_statement_condition(this, _, result) } } @@ -2878,18 +2901,6 @@ module Swift { final override string getAPrimaryQlClass() { result = "StatementLabel" } } - /** A class representing `statements` nodes. */ - class Statements extends @swift_statements, AstNode { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "Statements" } - - /** Gets the node corresponding to the field `statement`. */ - final AstNode getStatement(int i) { swift_statements_statement(this, i, result) } - - /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_statements_statement(this, _, result) } - } - /** A class representing `str_escaped_char` tokens. */ class StrEscapedChar extends @swift_token_str_escaped_char, Token { /** Gets the name of the primary QL class for this element. */ @@ -2901,22 +2912,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SubscriptDeclaration" } - /** Gets the node corresponding to the field `attribute`. */ - final Attribute getAttribute(int i) { swift_subscript_declaration_attribute(this, i, result) } - /** Gets the node corresponding to the field `body`. */ final ComputedProperty getBody() { swift_subscript_declaration_def(this, result) } - /** Gets the node corresponding to the field `default_value`. */ - final Expression getDefaultValue(int i) { - swift_subscript_declaration_default_value(this, i, result) - } - /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_subscript_declaration_modifiers(this, result) } /** Gets the node corresponding to the field `parameter`. */ - final Parameter getParameter(int i) { swift_subscript_declaration_parameter(this, i, result) } + final FunctionParameter getParameter(int i) { + swift_subscript_declaration_parameter(this, i, result) + } /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_subscript_declaration_return_type(this, result) } @@ -2933,9 +2938,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_subscript_declaration_attribute(this, _, result) or swift_subscript_declaration_def(this, result) or - swift_subscript_declaration_default_value(this, _, result) or swift_subscript_declaration_modifiers(this, result) or swift_subscript_declaration_parameter(this, _, result) or swift_subscript_declaration_return_type(this, result) or @@ -2967,9 +2970,6 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "SwitchEntry" } - /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_switch_entry_def(this, result) } - /** Gets the node corresponding to the field `default`. */ final DefaultKeyword getDefault() { swift_switch_entry_default(this, result) } @@ -2979,15 +2979,18 @@ module Swift { /** Gets the node corresponding to the field `pattern`. */ final SwitchPattern getPattern(int i) { swift_switch_entry_pattern(this, i, result) } + /** Gets the node corresponding to the field `statement`. */ + final AstNode getStatement(int i) { swift_switch_entry_statement(this, i, result) } + /** Gets the node corresponding to the field `where`. */ final WhereClause getWhere() { swift_switch_entry_where(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_switch_entry_def(this, result) or swift_switch_entry_default(this, result) or swift_switch_entry_modifiers(this, result) or swift_switch_entry_pattern(this, _, result) or + swift_switch_entry_statement(this, _, result) or swift_switch_entry_where(this, result) } } @@ -3095,15 +3098,28 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TupleExpression" } + /** Gets the node corresponding to the field `element`. */ + final TupleExpressionItem getElement(int i) { swift_tuple_expression_element(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_tuple_expression_element(this, _, result) } + } + + /** A class representing `tuple_expression_item` nodes. */ + class TupleExpressionItem extends @swift_tuple_expression_item, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "TupleExpressionItem" } + /** Gets the node corresponding to the field `name`. */ - final SimpleIdentifier getName(int i) { swift_tuple_expression_name(this, i, result) } + final SimpleIdentifier getName() { swift_tuple_expression_item_name(this, result) } /** Gets the node corresponding to the field `value`. */ - final Expression getValue(int i) { swift_tuple_expression_value(this, i, result) } + final Expression getValue() { swift_tuple_expression_item_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_tuple_expression_name(this, _, result) or swift_tuple_expression_value(this, _, result) + swift_tuple_expression_item_name(this, result) or + swift_tuple_expression_item_def(this, result) } } @@ -3533,14 +3549,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "WhileStatement" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_while_statement_body(this, result) } + final Block getBody() { swift_while_statement_def(this, result) } /** Gets the node corresponding to the field `condition`. */ final IfCondition getCondition(int i) { swift_while_statement_condition(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_while_statement_body(this, result) or swift_while_statement_condition(this, _, result) + swift_while_statement_def(this, result) or swift_while_statement_condition(this, _, result) } } @@ -3556,7 +3572,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "WillsetClause" } /** Gets the node corresponding to the field `body`. */ - final Statements getBody() { swift_willset_clause_body(this, result) } + final Block getBody() { swift_willset_clause_def(this, result) } /** Gets the node corresponding to the field `modifiers`. */ final Modifiers getModifiers() { swift_willset_clause_modifiers(this, result) } @@ -3566,7 +3582,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_willset_clause_body(this, result) or + swift_willset_clause_def(this, result) or swift_willset_clause_modifiers(this, result) or swift_willset_clause_parameter(this, result) } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 0c3f023b001..5cf748c1571 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -295,6 +295,19 @@ swift_bitwise_operation_def( int rhs: @swift_expression ref ); +@swift_block_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement + +#keyset[swift_block, index] +swift_block_statement( + int swift_block: @swift_block ref, + int index: int ref, + unique int statement: @swift_block_statement_type ref +); + +swift_block_def( + unique int id: @swift_block +); + swift_call_expression_def( unique int id: @swift_call_expression, int function: @swift_expression ref, @@ -367,11 +380,6 @@ swift_case_pattern_def( int name: @swift_token_simple_identifier ref ); -swift_catch_block_body( - unique int swift_catch_block: @swift_catch_block ref, - unique int body: @swift_statements ref -); - swift_catch_block_error( unique int swift_catch_block: @swift_catch_block ref, unique int error: @swift_pattern ref @@ -384,6 +392,7 @@ swift_catch_block_where( swift_catch_block_def( unique int id: @swift_catch_block, + int body: @swift_block ref, int keyword: @swift_token_catch_keyword ref ); @@ -530,7 +539,7 @@ swift_computed_getter_attribute( swift_computed_getter_body( unique int swift_computed_getter: @swift_computed_getter ref, - unique int body: @swift_statements ref + unique int body: @swift_block ref ); swift_computed_getter_def( @@ -547,7 +556,7 @@ swift_computed_modify_attribute( swift_computed_modify_body( unique int swift_computed_modify: @swift_computed_modify ref, - unique int body: @swift_statements ref + unique int body: @swift_block ref ); swift_computed_modify_def( @@ -564,9 +573,13 @@ swift_computed_property_accessor( unique int accessor: @swift_computed_property_accessor_type ref ); -swift_computed_property_body( - unique int swift_computed_property: @swift_computed_property ref, - unique int body: @swift_statements ref +@swift_computed_property_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement + +#keyset[swift_computed_property, index] +swift_computed_property_statement( + int swift_computed_property: @swift_computed_property ref, + int index: int ref, + unique int statement: @swift_computed_property_statement_type ref ); swift_computed_property_def( @@ -582,7 +595,7 @@ swift_computed_setter_attribute( swift_computed_setter_body( unique int swift_computed_setter: @swift_computed_setter ref, - unique int body: @swift_statements ref + unique int body: @swift_block ref ); swift_computed_setter_parameter( @@ -657,7 +670,7 @@ swift_deinit_declaration_modifiers( swift_deinit_declaration_def( unique int id: @swift_deinit_declaration, - int body: @swift_function_body ref + int body: @swift_block ref ); @swift_deprecated_operator_declaration_body_entry_type = @swift_line_string_literal | @swift_multi_line_string_literal | @swift_raw_string_literal | @swift_reserved_word | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_simple_identifier @@ -674,34 +687,28 @@ swift_deprecated_operator_declaration_body_def( ); #keyset[swift_dictionary_literal, index] -swift_dictionary_literal_key( +swift_dictionary_literal_element( int swift_dictionary_literal: @swift_dictionary_literal ref, int index: int ref, - unique int key__: @swift_expression ref -); - -#keyset[swift_dictionary_literal, index] -swift_dictionary_literal_value( - int swift_dictionary_literal: @swift_dictionary_literal ref, - int index: int ref, - unique int value: @swift_expression ref + unique int element: @swift_dictionary_literal_item ref ); swift_dictionary_literal_def( unique int id: @swift_dictionary_literal ); +swift_dictionary_literal_item_def( + unique int id: @swift_dictionary_literal_item, + int key__: @swift_expression ref, + int value: @swift_expression ref +); + swift_dictionary_type_def( unique int id: @swift_dictionary_type, int key__: @swift_type__ ref, int value: @swift_type__ ref ); -swift_didset_clause_body( - unique int swift_didset_clause: @swift_didset_clause ref, - unique int body: @swift_statements ref -); - swift_didset_clause_modifiers( unique int swift_didset_clause: @swift_didset_clause ref, unique int modifiers: @swift_modifiers ref @@ -713,7 +720,8 @@ swift_didset_clause_parameter( ); swift_didset_clause_def( - unique int id: @swift_didset_clause + unique int id: @swift_didset_clause, + int body: @swift_block ref ); swift_directive_condition( @@ -742,11 +750,6 @@ swift_disjunction_expression_def( int rhs: @swift_expression ref ); -swift_do_statement_body( - unique int swift_do_statement: @swift_do_statement ref, - unique int body: @swift_statements ref -); - #keyset[swift_do_statement, index] swift_do_statement_catch( int swift_do_statement: @swift_do_statement ref, @@ -755,7 +758,23 @@ swift_do_statement_catch( ); swift_do_statement_def( - unique int id: @swift_do_statement + unique int id: @swift_do_statement, + int body: @swift_block ref +); + +swift_enum_case_entry_data_contents( + unique int swift_enum_case_entry: @swift_enum_case_entry ref, + unique int data_contents: @swift_enum_type_parameters ref +); + +swift_enum_case_entry_raw_value( + unique int swift_enum_case_entry: @swift_enum_case_entry ref, + unique int raw_value: @swift_expression ref +); + +swift_enum_case_entry_def( + unique int id: @swift_enum_case_entry, + int name: @swift_token_simple_identifier ref ); @swift_enum_class_body_member_type = @swift_enum_entry | @swift_type_level_declaration @@ -772,10 +791,10 @@ swift_enum_class_body_def( ); #keyset[swift_enum_entry, index] -swift_enum_entry_data_contents( +swift_enum_entry_case( int swift_enum_entry: @swift_enum_entry ref, int index: int ref, - unique int data_contents: @swift_enum_type_parameters ref + unique int case__: @swift_enum_case_entry ref ); swift_enum_entry_modifiers( @@ -783,20 +802,6 @@ swift_enum_entry_modifiers( unique int modifiers: @swift_modifiers ref ); -#keyset[swift_enum_entry, index] -swift_enum_entry_name( - int swift_enum_entry: @swift_enum_entry ref, - int index: int ref, - unique int name: @swift_token_simple_identifier ref -); - -#keyset[swift_enum_entry, index] -swift_enum_entry_raw_value( - int swift_enum_entry: @swift_enum_entry ref, - int index: int ref, - unique int raw_value: @swift_expression ref -); - swift_enum_entry_def( unique int id: @swift_enum_entry ); @@ -874,11 +879,6 @@ swift_external_macro_definition_def( int arguments: @swift_value_arguments ref ); -swift_for_statement_body( - unique int swift_for_statement: @swift_for_statement ref, - unique int body: @swift_statements ref -); - swift_for_statement_try( unique int swift_for_statement: @swift_for_statement ref, unique int try: @swift_token_try_operator ref @@ -896,38 +896,16 @@ swift_for_statement_where( swift_for_statement_def( unique int id: @swift_for_statement, + int body: @swift_block ref, int collection: @swift_expression ref, int item: @swift_pattern ref ); -swift_function_body_body( - unique int swift_function_body: @swift_function_body ref, - unique int body: @swift_statements ref -); - -swift_function_body_def( - unique int id: @swift_function_body -); - swift_function_declaration_async( unique int swift_function_declaration: @swift_function_declaration ref, unique int async: @swift_reserved_word ref ); -#keyset[swift_function_declaration, index] -swift_function_declaration_attribute( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -#keyset[swift_function_declaration, index] -swift_function_declaration_default_value( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref -); - @swift_function_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier #keyset[swift_function_declaration, index] @@ -943,7 +921,7 @@ swift_function_declaration_modifiers( swift_function_declaration_parameter( int swift_function_declaration: @swift_function_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); @swift_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ @@ -972,10 +950,25 @@ swift_function_declaration_type_parameters( swift_function_declaration_def( unique int id: @swift_function_declaration, - int body: @swift_function_body ref, + int body: @swift_block ref, int name: @swift_function_declaration_name_type ref ); +swift_function_parameter_attribute( + unique int swift_function_parameter: @swift_function_parameter ref, + unique int attribute: @swift_attribute ref +); + +swift_function_parameter_default_value( + unique int swift_function_parameter: @swift_function_parameter ref, + unique int default_value: @swift_expression ref +); + +swift_function_parameter_def( + unique int id: @swift_function_parameter, + int parameter: @swift_parameter ref +); + swift_function_type_async( unique int swift_function_type: @swift_function_type ref, unique int async: @swift_reserved_word ref @@ -1014,11 +1007,6 @@ swift_getter_specifier_def( @swift_global_declaration = @swift_associatedtype_declaration | @swift_class_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_macro_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_typealias_declaration -swift_guard_statement_body( - unique int swift_guard_statement: @swift_guard_statement ref, - unique int body: @swift_statements ref -); - #keyset[swift_guard_statement, index] swift_guard_statement_condition( int swift_guard_statement: @swift_guard_statement ref, @@ -1028,7 +1016,7 @@ swift_guard_statement_condition( swift_guard_statement_def( unique int id: @swift_guard_statement, - int else_keyword: @swift_token_else ref + int body: @swift_block ref ); #keyset[swift_identifier, index] @@ -1069,13 +1057,6 @@ swift_if_let_binding_def( int pattern: @swift_pattern ref ); -#keyset[swift_if_statement, index] -swift_if_statement_body( - int swift_if_statement: @swift_if_statement ref, - int index: int ref, - unique int body: @swift_statements ref -); - #keyset[swift_if_statement, index] swift_if_statement_condition( int swift_if_statement: @swift_if_statement ref, @@ -1083,18 +1064,16 @@ swift_if_statement_condition( unique int condition: @swift_if_condition ref ); +@swift_if_statement_else_branch_type = @swift_block | @swift_if_statement + swift_if_statement_else_branch( unique int swift_if_statement: @swift_if_statement ref, - unique int else_branch: @swift_if_statement ref -); - -swift_if_statement_else_keyword( - unique int swift_if_statement: @swift_if_statement ref, - unique int else_keyword: @swift_token_else ref + unique int else_branch: @swift_if_statement_else_branch_type ref ); swift_if_statement_def( - unique int id: @swift_if_statement + unique int id: @swift_if_statement, + int body: @swift_block ref ); swift_implicitly_unwrapped_type_def( @@ -1148,13 +1127,6 @@ swift_init_declaration_async( unique int async: @swift_reserved_word ref ); -#keyset[swift_init_declaration, index] -swift_init_declaration_attribute( - int swift_init_declaration: @swift_init_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - swift_init_declaration_bang( unique int swift_init_declaration: @swift_init_declaration ref, unique int bang: @swift_token_bang ref @@ -1162,14 +1134,7 @@ swift_init_declaration_bang( swift_init_declaration_body( unique int swift_init_declaration: @swift_init_declaration ref, - unique int body: @swift_function_body ref -); - -#keyset[swift_init_declaration, index] -swift_init_declaration_default_value( - int swift_init_declaration: @swift_init_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref + unique int body: @swift_block ref ); swift_init_declaration_modifiers( @@ -1177,16 +1142,11 @@ swift_init_declaration_modifiers( unique int modifiers: @swift_modifiers ref ); -case @swift_init_declaration.name of - 0 = @swift_init_declaration_init -; - - #keyset[swift_init_declaration, index] swift_init_declaration_parameter( int swift_init_declaration: @swift_init_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); @swift_init_declaration_throws_type = @swift_throws_clause | @swift_token_throws @@ -1207,8 +1167,7 @@ swift_init_declaration_type_parameters( ); swift_init_declaration_def( - unique int id: @swift_init_declaration, - int name: int ref + unique int id: @swift_init_declaration ); swift_interpolated_expression_name( @@ -1338,16 +1297,20 @@ swift_lambda_literal_attribute( unique int attribute: @swift_attribute ref ); -swift_lambda_literal_body( - unique int swift_lambda_literal: @swift_lambda_literal ref, - unique int body: @swift_statements ref -); - swift_lambda_literal_captures( unique int swift_lambda_literal: @swift_lambda_literal ref, unique int captures: @swift_capture_list ref ); +@swift_lambda_literal_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement + +#keyset[swift_lambda_literal, index] +swift_lambda_literal_statement( + int swift_lambda_literal: @swift_lambda_literal ref, + int index: int ref, + unique int statement: @swift_lambda_literal_statement_type ref +); + swift_lambda_literal_type( unique int swift_lambda_literal: @swift_lambda_literal ref, unique int type__: @swift_lambda_function_type ref @@ -1403,20 +1366,6 @@ swift_line_string_literal_def( @swift_local_declaration = @swift_class_declaration | @swift_function_declaration | @swift_property_declaration | @swift_typealias_declaration -#keyset[swift_macro_declaration, index] -swift_macro_declaration_attribute( - int swift_macro_declaration: @swift_macro_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -#keyset[swift_macro_declaration, index] -swift_macro_declaration_default_value( - int swift_macro_declaration: @swift_macro_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref -); - swift_macro_declaration_definition( unique int swift_macro_declaration: @swift_macro_declaration ref, unique int definition: @swift_macro_definition ref @@ -1431,7 +1380,7 @@ swift_macro_declaration_modifiers( swift_macro_declaration_parameter( int swift_macro_declaration: @swift_macro_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); swift_macro_declaration_return_type( @@ -1670,21 +1619,28 @@ swift_pattern_def( ); #keyset[swift_playground_literal, index] -swift_playground_literal_name( +swift_playground_literal_argument( int swift_playground_literal: @swift_playground_literal ref, int index: int ref, - unique int name: @swift_token_simple_identifier ref + unique int argument: @swift_playground_literal_argument ref ); -#keyset[swift_playground_literal, index] -swift_playground_literal_value( - int swift_playground_literal: @swift_playground_literal ref, - int index: int ref, - unique int value: @swift_expression ref -); +case @swift_playground_literal.kind of + 0 = @swift_playground_literal_color_literal +| 1 = @swift_playground_literal_file_literal +| 2 = @swift_playground_literal_image_literal +; + swift_playground_literal_def( - unique int id: @swift_playground_literal + unique int id: @swift_playground_literal, + int kind: int ref +); + +swift_playground_literal_argument_def( + unique int id: @swift_playground_literal_argument, + int name: @swift_token_simple_identifier ref, + int value: @swift_expression ref ); @swift_postfix_expression_operation_type = @swift_reserved_word | @swift_token_bang @@ -1732,11 +1688,41 @@ swift_prefix_expression_def( int target: @swift_expression ref ); +swift_property_binding_computed_value( + unique int swift_property_binding: @swift_property_binding ref, + unique int computed_value: @swift_computed_property ref +); + +swift_property_binding_observers( + unique int swift_property_binding: @swift_property_binding ref, + unique int observers: @swift_willset_didset_block ref +); + +swift_property_binding_type( + unique int swift_property_binding: @swift_property_binding ref, + unique int type__: @swift_type_annotation ref +); + +swift_property_binding_type_constraints( + unique int swift_property_binding: @swift_property_binding ref, + unique int type_constraints: @swift_type_constraints ref +); + +swift_property_binding_value( + unique int swift_property_binding: @swift_property_binding ref, + unique int value: @swift_expression ref +); + +swift_property_binding_def( + unique int id: @swift_property_binding, + int name: @swift_pattern ref +); + #keyset[swift_property_declaration, index] -swift_property_declaration_computed_value( +swift_property_declaration_declarator( int swift_property_declaration: @swift_property_declaration ref, int index: int ref, - unique int computed_value: @swift_computed_property ref + unique int declarator: @swift_property_binding ref ); @swift_property_declaration_modifiers_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier @@ -1748,41 +1734,6 @@ swift_property_declaration_modifiers( unique int modifiers: @swift_property_declaration_modifiers_type ref ); -#keyset[swift_property_declaration, index] -swift_property_declaration_name( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int name: @swift_pattern ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_observers( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int observers: @swift_willset_didset_block ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_type( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int type__: @swift_type_annotation ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_type_constraints( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int type_constraints: @swift_type_constraints ref -); - -#keyset[swift_property_declaration, index] -swift_property_declaration_value( - int swift_property_declaration: @swift_property_declaration ref, - int index: int ref, - unique int value: @swift_expression ref -); - swift_property_declaration_def( unique int id: @swift_property_declaration, int binding: @swift_value_binding_pattern ref @@ -1817,11 +1768,6 @@ swift_protocol_declaration_attribute( unique int attribute: @swift_attribute ref ); -case @swift_protocol_declaration.declaration_kind of - 0 = @swift_protocol_declaration_protocol -; - - #keyset[swift_protocol_declaration, index] swift_protocol_declaration_inherits( int swift_protocol_declaration: @swift_protocol_declaration ref, @@ -1847,7 +1793,6 @@ swift_protocol_declaration_type_parameters( swift_protocol_declaration_def( unique int id: @swift_protocol_declaration, int body: @swift_protocol_body ref, - int declaration_kind: int ref, int name: @swift_token_type_identifier ref ); @@ -1856,23 +1801,9 @@ swift_protocol_function_declaration_async( unique int async: @swift_reserved_word ref ); -#keyset[swift_protocol_function_declaration, index] -swift_protocol_function_declaration_attribute( - int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - swift_protocol_function_declaration_body( unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int body: @swift_function_body ref -); - -#keyset[swift_protocol_function_declaration, index] -swift_protocol_function_declaration_default_value( - int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref + unique int body: @swift_block ref ); swift_protocol_function_declaration_modifiers( @@ -1886,7 +1817,7 @@ swift_protocol_function_declaration_modifiers( swift_protocol_function_declaration_parameter( int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); @swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ @@ -2013,11 +1944,6 @@ swift_referenceable_operator_def( int operator: @swift_referenceable_operator_operator_type ref ); -swift_repeat_while_statement_body( - unique int swift_repeat_while_statement: @swift_repeat_while_statement ref, - unique int body: @swift_statements ref -); - #keyset[swift_repeat_while_statement, index] swift_repeat_while_statement_condition( int swift_repeat_while_statement: @swift_repeat_while_statement ref, @@ -2026,7 +1952,8 @@ swift_repeat_while_statement_condition( ); swift_repeat_while_statement_def( - unique int id: @swift_repeat_while_statement + unique int id: @swift_repeat_while_statement, + int body: @swift_block ref ); swift_selector_expression_def( @@ -2071,33 +1998,6 @@ swift_source_file_def( unique int id: @swift_source_file ); -@swift_statements_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement - -#keyset[swift_statements, index] -swift_statements_statement( - int swift_statements: @swift_statements ref, - int index: int ref, - unique int statement: @swift_statements_statement_type ref -); - -swift_statements_def( - unique int id: @swift_statements -); - -#keyset[swift_subscript_declaration, index] -swift_subscript_declaration_attribute( - int swift_subscript_declaration: @swift_subscript_declaration ref, - int index: int ref, - unique int attribute: @swift_attribute ref -); - -#keyset[swift_subscript_declaration, index] -swift_subscript_declaration_default_value( - int swift_subscript_declaration: @swift_subscript_declaration ref, - int index: int ref, - unique int default_value: @swift_expression ref -); - swift_subscript_declaration_modifiers( unique int swift_subscript_declaration: @swift_subscript_declaration ref, unique int modifiers: @swift_modifiers ref @@ -2107,7 +2007,7 @@ swift_subscript_declaration_modifiers( swift_subscript_declaration_parameter( int swift_subscript_declaration: @swift_subscript_declaration ref, int index: int ref, - unique int parameter: @swift_parameter ref + unique int parameter: @swift_function_parameter ref ); @swift_subscript_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ @@ -2154,14 +2054,22 @@ swift_switch_entry_pattern( unique int pattern: @swift_switch_pattern ref ); +@swift_switch_entry_statement_type = @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_guard_statement | @swift_local_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_while_statement + +#keyset[swift_switch_entry, index] +swift_switch_entry_statement( + int swift_switch_entry: @swift_switch_entry ref, + int index: int ref, + unique int statement: @swift_switch_entry_statement_type ref +); + swift_switch_entry_where( unique int swift_switch_entry: @swift_switch_entry ref, unique int where: @swift_where_clause ref ); swift_switch_entry_def( - unique int id: @swift_switch_entry, - int body: @swift_statements ref + unique int id: @swift_switch_entry ); swift_switch_pattern_def( @@ -2200,23 +2108,26 @@ swift_try_expression_def( ); #keyset[swift_tuple_expression, index] -swift_tuple_expression_name( +swift_tuple_expression_element( int swift_tuple_expression: @swift_tuple_expression ref, int index: int ref, - unique int name: @swift_token_simple_identifier ref -); - -#keyset[swift_tuple_expression, index] -swift_tuple_expression_value( - int swift_tuple_expression: @swift_tuple_expression ref, - int index: int ref, - unique int value: @swift_expression ref + unique int element: @swift_tuple_expression_item ref ); swift_tuple_expression_def( unique int id: @swift_tuple_expression ); +swift_tuple_expression_item_name( + unique int swift_tuple_expression_item: @swift_tuple_expression_item ref, + unique int name: @swift_token_simple_identifier ref +); + +swift_tuple_expression_item_def( + unique int id: @swift_tuple_expression_item, + int value: @swift_expression ref +); + #keyset[swift_tuple_pattern, index] swift_tuple_pattern_item( int swift_tuple_pattern: @swift_tuple_pattern ref, @@ -2497,11 +2408,6 @@ swift_where_clause_def( int keyword: @swift_token_where_keyword ref ); -swift_while_statement_body( - unique int swift_while_statement: @swift_while_statement ref, - unique int body: @swift_statements ref -); - #keyset[swift_while_statement, index] swift_while_statement_condition( int swift_while_statement: @swift_while_statement ref, @@ -2510,12 +2416,8 @@ swift_while_statement_condition( ); swift_while_statement_def( - unique int id: @swift_while_statement -); - -swift_willset_clause_body( - unique int swift_willset_clause: @swift_willset_clause ref, - unique int body: @swift_statements ref + unique int id: @swift_while_statement, + int body: @swift_block ref ); swift_willset_clause_modifiers( @@ -2529,7 +2431,8 @@ swift_willset_clause_parameter( ); swift_willset_clause_def( - unique int id: @swift_willset_clause + unique int id: @swift_willset_clause, + int body: @swift_block ref ); swift_willset_didset_block_didset( @@ -2564,46 +2467,45 @@ case @swift_token.kind of | 8 = @swift_token_custom_operator | 9 = @swift_token_default_keyword | 10 = @swift_token_diagnostic -| 11 = @swift_token_else -| 12 = @swift_token_fully_open_range -| 13 = @swift_token_function_modifier -| 14 = @swift_token_hex_literal -| 15 = @swift_token_inheritance_modifier -| 16 = @swift_token_integer_literal -| 17 = @swift_token_line_str_text -| 18 = @swift_token_member_modifier -| 19 = @swift_token_multi_line_str_text -| 20 = @swift_token_multiline_comment -| 21 = @swift_token_mutation_modifier -| 22 = @swift_token_oct_literal -| 23 = @swift_token_ownership_modifier -| 24 = @swift_token_parameter_modifier -| 25 = @swift_token_property_behavior_modifier -| 26 = @swift_token_property_modifier -| 27 = @swift_token_raw_str_continuing_indicator -| 28 = @swift_token_raw_str_end_part -| 29 = @swift_token_raw_str_interpolation_start -| 30 = @swift_token_raw_str_part -| 31 = @swift_token_real_literal -| 32 = @swift_token_regex_literal -| 33 = @swift_token_self_expression -| 34 = @swift_token_shebang_line -| 35 = @swift_token_simple_identifier -| 36 = @swift_token_special_literal -| 37 = @swift_token_statement_label -| 38 = @swift_token_str_escaped_char -| 39 = @swift_token_super_expression -| 40 = @swift_token_throw_keyword -| 41 = @swift_token_throws -| 42 = @swift_token_try_operator -| 43 = @swift_token_type_identifier -| 44 = @swift_token_visibility_modifier -| 45 = @swift_token_where_keyword -| 46 = @swift_token_wildcard_pattern +| 11 = @swift_token_fully_open_range +| 12 = @swift_token_function_modifier +| 13 = @swift_token_hex_literal +| 14 = @swift_token_inheritance_modifier +| 15 = @swift_token_integer_literal +| 16 = @swift_token_line_str_text +| 17 = @swift_token_member_modifier +| 18 = @swift_token_multi_line_str_text +| 19 = @swift_token_multiline_comment +| 20 = @swift_token_mutation_modifier +| 21 = @swift_token_oct_literal +| 22 = @swift_token_ownership_modifier +| 23 = @swift_token_parameter_modifier +| 24 = @swift_token_property_behavior_modifier +| 25 = @swift_token_property_modifier +| 26 = @swift_token_raw_str_continuing_indicator +| 27 = @swift_token_raw_str_end_part +| 28 = @swift_token_raw_str_interpolation_start +| 29 = @swift_token_raw_str_part +| 30 = @swift_token_real_literal +| 31 = @swift_token_regex_literal +| 32 = @swift_token_self_expression +| 33 = @swift_token_shebang_line +| 34 = @swift_token_simple_identifier +| 35 = @swift_token_special_literal +| 36 = @swift_token_statement_label +| 37 = @swift_token_str_escaped_char +| 38 = @swift_token_super_expression +| 39 = @swift_token_throw_keyword +| 40 = @swift_token_throws +| 41 = @swift_token_try_operator +| 42 = @swift_token_type_identifier +| 43 = @swift_token_visibility_modifier +| 44 = @swift_token_where_keyword +| 45 = @swift_token_wildcard_pattern ; -@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_binding_pattern | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_case_pattern | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_compilation_condition | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameter | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_body | @swift_function_declaration | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_let_binding | @swift_if_statement | @swift_implicitly_unwrapped_type | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_component | @swift_key_path_expression | @swift_key_path_postfix | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nested_type_identifier | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_parenthesized_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_simple_user_type | @swift_source_file | @swift_statements | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_pattern | @swift_tuple_pattern_item | @swift_tuple_type | @swift_tuple_type_item | @swift_type__ | @swift_type_annotation | @swift_type_arguments | @swift_type_casting_pattern | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block +@swift_ast_node = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_attribute | @swift_availability_condition | @swift_await_expression | @swift_binding_pattern | @swift_bitwise_operation | @swift_block | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_case_pattern | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @swift_compilation_condition | @swift_computed_getter | @swift_computed_modify | @swift_computed_property | @swift_computed_setter | @swift_conjunction_expression | @swift_constructor_expression | @swift_constructor_suffix | @swift_control_transfer_statement | @swift_deinit_declaration | @swift_deprecated_operator_declaration_body | @swift_dictionary_literal | @swift_dictionary_literal_item | @swift_dictionary_type | @swift_didset_clause | @swift_directive | @swift_directly_assignable_expression | @swift_disjunction_expression | @swift_do_statement | @swift_enum_case_entry | @swift_enum_class_body | @swift_enum_entry | @swift_enum_type_parameter | @swift_enum_type_parameters | @swift_equality_constraint | @swift_equality_expression | @swift_existential_type | @swift_external_macro_definition | @swift_for_statement | @swift_function_declaration | @swift_function_parameter | @swift_function_type | @swift_getter_specifier | @swift_guard_statement | @swift_identifier | @swift_if_condition | @swift_if_let_binding | @swift_if_statement | @swift_implicitly_unwrapped_type | @swift_import_declaration | @swift_infix_expression | @swift_inheritance_constraint | @swift_inheritance_specifier | @swift_init_declaration | @swift_interpolated_expression | @swift_key_path_component | @swift_key_path_expression | @swift_key_path_postfix | @swift_key_path_string_expression | @swift_lambda_function_type | @swift_lambda_function_type_parameters | @swift_lambda_literal | @swift_lambda_parameter | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_definition | @swift_macro_invocation | @swift_metatype | @swift_modifiers | @swift_modify_specifier | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_navigation_suffix | @swift_nested_type_identifier | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_optional_type | @swift_parameter | @swift_parameter_modifiers | @swift_parenthesized_type | @swift_pattern | @swift_playground_literal | @swift_playground_literal_argument | @swift_postfix_expression | @swift_precedence_group_attribute | @swift_precedence_group_attributes | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_binding | @swift_property_declaration | @swift_protocol_body | @swift_protocol_composition_type | @swift_protocol_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_protocol_property_requirements | @swift_range_expression | @swift_raw_str_interpolation | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_setter_specifier | @swift_simple_user_type | @swift_source_file | @swift_subscript_declaration | @swift_suppressed_constraint | @swift_switch_entry | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_throws_clause | @swift_token | @swift_try_expression | @swift_tuple_expression | @swift_tuple_expression_item | @swift_tuple_pattern | @swift_tuple_pattern_item | @swift_tuple_type | @swift_tuple_type_item | @swift_type__ | @swift_type_annotation | @swift_type_arguments | @swift_type_casting_pattern | @swift_type_constraint | @swift_type_constraints | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter | @swift_type_parameter_modifiers | @swift_type_parameter_pack | @swift_type_parameters | @swift_typealias_declaration | @swift_user_type | @swift_value_argument | @swift_value_argument_label | @swift_value_arguments | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause | @swift_while_statement | @swift_willset_clause | @swift_willset_didset_block swift_ast_node_location( unique int node: @swift_ast_node ref,