Skip to content

Commit a720e25

Browse files
committed
unified: regenerate files
1 parent 8b977ef commit a720e25

2 files changed

Lines changed: 39 additions & 28 deletions

File tree

unified/ql/lib/codeql/unified/Ast.qll

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -899,24 +899,22 @@ module Swift {
899899
final override string getAPrimaryQlClass() { result = "EqualityConstraint" }
900900

901901
/** Gets the node corresponding to the field `constrained_type`. */
902-
final AstNode getConstrainedType(int i) {
903-
swift_equality_constraint_constrained_type(this, i, result)
904-
}
902+
final AstNode getConstrainedType() { swift_equality_constraint_def(this, result, _) }
905903

906904
/** Gets the node corresponding to the field `must_equal`. */
907905
final AstNode getMustEqual(int i) { swift_equality_constraint_must_equal(this, i, result) }
908906

909907
/** Gets the node corresponding to the field `name`. */
910-
final UnannotatedType getName() { swift_equality_constraint_def(this, result) }
908+
final UnannotatedType getName() { swift_equality_constraint_def(this, _, result) }
911909

912910
/** Gets the `i`th child of this node. */
913911
final Attribute getChild(int i) { swift_equality_constraint_child(this, i, result) }
914912

915913
/** Gets a field or child node of this node. */
916914
final override AstNode getAFieldOrChild() {
917-
swift_equality_constraint_constrained_type(this, _, result) or
915+
swift_equality_constraint_def(this, result, _) or
918916
swift_equality_constraint_must_equal(this, _, result) or
919-
swift_equality_constraint_def(this, result) or
917+
swift_equality_constraint_def(this, _, result) or
920918
swift_equality_constraint_child(this, _, result)
921919
}
922920
}
@@ -1229,9 +1227,7 @@ module Swift {
12291227
final override string getAPrimaryQlClass() { result = "InheritanceConstraint" }
12301228

12311229
/** Gets the node corresponding to the field `constrained_type`. */
1232-
final AstNode getConstrainedType(int i) {
1233-
swift_inheritance_constraint_constrained_type(this, i, result)
1234-
}
1230+
final AstNode getConstrainedType() { swift_inheritance_constraint_def(this, result) }
12351231

12361232
/** Gets the node corresponding to the field `inherits_from`. */
12371233
final AstNode getInheritsFrom(int i) {
@@ -1246,7 +1242,7 @@ module Swift {
12461242

12471243
/** Gets a field or child node of this node. */
12481244
final override AstNode getAFieldOrChild() {
1249-
swift_inheritance_constraint_constrained_type(this, _, result) or
1245+
swift_inheritance_constraint_def(this, result) or
12501246
swift_inheritance_constraint_inherits_from(this, _, result) or
12511247
swift_inheritance_constraint_name(this, result) or
12521248
swift_inheritance_constraint_child(this, _, result)
@@ -1661,6 +1657,20 @@ module Swift {
16611657
final override AstNode getAFieldOrChild() { swift_navigation_suffix_def(this, result) }
16621658
}
16631659

1660+
/** A class representing `nested_type_identifier` nodes. */
1661+
class NestedTypeIdentifier extends @swift_nested_type_identifier, AstNode {
1662+
/** Gets the name of the primary QL class for this element. */
1663+
final override string getAPrimaryQlClass() { result = "NestedTypeIdentifier" }
1664+
1665+
/** Gets the `i`th child of this node. */
1666+
final AstNode getChild(int i) { swift_nested_type_identifier_child(this, i, result) }
1667+
1668+
/** Gets a field or child node of this node. */
1669+
final override AstNode getAFieldOrChild() {
1670+
swift_nested_type_identifier_child(this, _, result)
1671+
}
1672+
}
1673+
16641674
/** A class representing `nil_coalescing_expression` nodes. */
16651675
class NilCoalescingExpression extends @swift_nil_coalescing_expression, AstNode {
16661676
/** Gets the name of the primary QL class for this element. */

unified/ql/lib/unified.dbscheme

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -755,14 +755,7 @@ swift_enum_type_parameters_def(
755755
unique int id: @swift_enum_type_parameters
756756
);
757757

758-
@swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_reserved_word | @swift_token_simple_identifier | @swift_unannotated_type
759-
760-
#keyset[swift_equality_constraint, index]
761-
swift_equality_constraint_constrained_type(
762-
int swift_equality_constraint: @swift_equality_constraint ref,
763-
int index: int ref,
764-
unique int constrained_type: @swift_equality_constraint_constrained_type_type ref
765-
);
758+
@swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier
766759

767760
@swift_equality_constraint_must_equal_type = @swift_type_modifiers | @swift_unannotated_type
768761

@@ -782,6 +775,7 @@ swift_equality_constraint_child(
782775

783776
swift_equality_constraint_def(
784777
unique int id: @swift_equality_constraint,
778+
int constrained_type: @swift_equality_constraint_constrained_type_type ref,
785779
int name: @swift_unannotated_type ref
786780
);
787781

@@ -1014,14 +1008,7 @@ swift_infix_expression_def(
10141008
int rhs: @swift_expression ref
10151009
);
10161010

1017-
@swift_inheritance_constraint_constrained_type_type = @swift_identifier | @swift_reserved_word | @swift_token_simple_identifier | @swift_unannotated_type
1018-
1019-
#keyset[swift_inheritance_constraint, index]
1020-
swift_inheritance_constraint_constrained_type(
1021-
int swift_inheritance_constraint: @swift_inheritance_constraint ref,
1022-
int index: int ref,
1023-
unique int constrained_type: @swift_inheritance_constraint_constrained_type_type ref
1024-
);
1011+
@swift_inheritance_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier
10251012

10261013
@swift_inheritance_constraint_inherits_from_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type
10271014

@@ -1045,7 +1032,8 @@ swift_inheritance_constraint_child(
10451032
);
10461033

10471034
swift_inheritance_constraint_def(
1048-
unique int id: @swift_inheritance_constraint
1035+
unique int id: @swift_inheritance_constraint,
1036+
int constrained_type: @swift_inheritance_constraint_constrained_type_type ref
10491037
);
10501038

10511039
@swift_inheritance_specifier_inherits_from_type = @swift_function_type | @swift_suppressed_constraint | @swift_user_type
@@ -1379,6 +1367,19 @@ swift_navigation_suffix_def(
13791367
int suffix: @swift_navigation_suffix_suffix_type ref
13801368
);
13811369

1370+
@swift_nested_type_identifier_child_type = @swift_token_simple_identifier | @swift_unannotated_type
1371+
1372+
#keyset[swift_nested_type_identifier, index]
1373+
swift_nested_type_identifier_child(
1374+
int swift_nested_type_identifier: @swift_nested_type_identifier ref,
1375+
int index: int ref,
1376+
unique int child: @swift_nested_type_identifier_child_type ref
1377+
);
1378+
1379+
swift_nested_type_identifier_def(
1380+
unique int id: @swift_nested_type_identifier
1381+
);
1382+
13821383
swift_nil_coalescing_expression_def(
13831384
unique int id: @swift_nil_coalescing_expression,
13841385
int if_nil: @swift_expression ref,
@@ -2323,7 +2324,7 @@ case @swift_token.kind of
23232324
;
23242325

23252326

2326-
@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_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @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_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_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_expression | @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_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_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_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_type | @swift_tuple_type_item | @swift_type_annotation | @swift_type_arguments | @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
2327+
@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_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_capture_list | @swift_capture_list_item | @swift_catch_block | @swift_check_expression | @swift_class_body | @swift_class_declaration | @swift_comparison_expression | @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_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_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_expression | @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_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_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_type | @swift_tuple_type_item | @swift_type_annotation | @swift_type_arguments | @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
23272328

23282329
swift_ast_node_location(
23292330
unique int node: @swift_ast_node ref,

0 commit comments

Comments
 (0)