From 513c7bb30baac0f9a5ad1879a9f56f54d3ea87ae Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 13:57:34 +0000 Subject: [PATCH 01/24] unified: Add scripts for automatically rebuilding Swift grammar --- unified/AGENTS.md | 15 + .../tree-sitter-swift/node-types.yml | 633 ++++++++++++++++++ unified/scripts/regenerate-grammar.sh | 28 + 3 files changed, 676 insertions(+) create mode 100644 unified/extractor/tree-sitter-swift/node-types.yml create mode 100755 unified/scripts/regenerate-grammar.sh diff --git a/unified/AGENTS.md b/unified/AGENTS.md index 44cb74372883..488a94f44bd4 100644 --- a/unified/AGENTS.md +++ b/unified/AGENTS.md @@ -5,6 +5,21 @@ This is a CodeQL extractor based on tree-sitter. ## Building To build the extractor, run `scripts/create-extractor-pack.sh` +## Editing the Swift grammar +The vendored tree-sitter-swift grammar lives at +`extractor/tree-sitter-swift/`. After editing `grammar.js` (or any other +grammar source), run `scripts/regenerate-grammar.sh` to: +- regenerate `extractor/tree-sitter-swift/src/{parser.c, grammar.json, + node-types.json}` (and the `src/tree_sitter/*.h` headers) via + `tree-sitter generate`; and +- refresh `extractor/tree-sitter-swift/node-types.yml`, the + human-readable companion to `src/node-types.json` produced by yeast's + `node_types_yaml` binary. + +`node-types.yml` is the recommended review surface for grammar changes — +it shows the impact of a grammar tweak on the named node kinds, fields, +and child types in a form much easier to read than the raw JSON. + ## Testing - If you changed the extractor code, always rebuild it before running tests. diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml new file mode 100644 index 000000000000..6b3e19f5bf0b --- /dev/null +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -0,0 +1,633 @@ +named: + _expression: + additive_expression: + lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: ["+", "-"] + rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + array_literal: + element*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + array_type: + element+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + as_expression: + $children: as_operator + expr+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + as_operator: + assignment: + operator: ["%=", "*=", "+=", "-=", "/=", "="] + result+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + target: directly_assignable_expression + associatedtype_declaration: + $children*: [modifiers, type_constraints] + default_value*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + must_inherit*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] + attribute: + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack] + availability_condition: + $children*: [identifier, integer_literal] + await_expression: + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + expr*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + bang: + bin_literal: + bitwise_operation: + lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: ["&", "<<", ">>", "^", "|"] + rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + boolean_literal: + call_expression: + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, call_suffix, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + call_suffix: + $children+: [lambda_literal, value_arguments] + name*: simple_identifier + capture_list: + $children+: capture_list_item + capture_list_item: + $children?: ownership_modifier + name: [self_expression, simple_identifier] + value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + catch_block: + $children+: [catch_keyword, statements, where_clause] + error?: pattern + catch_keyword: + check_expression: + name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + op: "is" + target+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + class_body: + $children*: [associatedtype_declaration, class_declaration, deinit_declaration, function_declaration, import_declaration, init_declaration, multiline_comment, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] + class_declaration: + $children*: [attribute, inheritance_modifier, inheritance_specifier, modifiers, ownership_modifier, property_behavior_modifier, type_constraints, type_parameters] + body: [class_body, enum_class_body] + declaration_kind: ["actor", "class", "enum", "extension", "struct"] + name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] + comment: + comparison_expression: + lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: ["<", "<=", ">", ">="] + rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + computed_getter: + $children+: [attribute, getter_specifier, statements] + computed_modify: + $children+: [attribute, modify_specifier, statements] + computed_property: + $children*: [computed_getter, computed_modify, computed_setter, statements] + computed_setter: + $children+: [attribute, setter_specifier, simple_identifier, statements] + conjunction_expression: + lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: "&&" + rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + constructor_expression: + $children: constructor_suffix + constructed_type: [array_type, dictionary_type, user_type] + constructor_suffix: + $children+: [lambda_literal, value_arguments] + name*: simple_identifier + control_transfer_statement: + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + result*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + custom_operator: + default_keyword: + deinit_declaration: + $children?: modifiers + body: function_body + deprecated_operator_declaration_body: + $children*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] + diagnostic: + dictionary_literal: + key*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + dictionary_type: + key+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + value+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + didset_clause: + $children*: [modifiers, simple_identifier, statements] + directive: + $children*: [boolean_literal, integer_literal, simple_identifier] + directly_assignable_expression: + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + disjunction_expression: + lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: "||" + rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + do_statement: + $children*: [catch_block, statements] + else: + enum_class_body: + $children*: [associatedtype_declaration, class_declaration, deinit_declaration, enum_entry, function_declaration, import_declaration, init_declaration, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] + enum_entry: + $children?: modifiers + data_contents*: enum_type_parameters + name+: simple_identifier + raw_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + enum_type_parameters: + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, value_pack_expansion, value_parameter_pack, wildcard_pattern] + name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + equality_constraint: + $children*: attribute + constrained_type+: [".", array_type, dictionary_type, existential_type, function_type, identifier, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + must_equal+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + equality_expression: + lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: ["!=", "!==", "==", "==="] + rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + existential_type: + $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + external_macro_definition: + $children: value_arguments + for_statement: + $children*: [statements, try_operator, type_annotation, where_clause] + collection+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + item: pattern + fully_open_range: + function_body: + $children?: statements + function_declaration: + $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, parameter, property_behavior_modifier, throws, throws_clause, type_constraints, type_parameters] + body: function_body + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + name+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", array_type, bang, custom_operator, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type, "|", "~"] + return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + function_modifier: + function_type: + $children?: [throws, throws_clause] + name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + params: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + return_type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + getter_specifier: + $children*: [mutation_modifier, throws, throws_clause] + guard_statement: + $children+: [else, statements] + bound_identifier*: simple_identifier + condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + hex_literal: + identifier: + $children+: simple_identifier + if_statement: + $children*: [else, if_statement, statements] + bound_identifier*: simple_identifier + condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + import_declaration: + $children+: [identifier, modifiers] + infix_expression: + lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: custom_operator + rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + inheritance_constraint: + $children*: attribute + constrained_type+: [".", array_type, dictionary_type, existential_type, function_type, identifier, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + inherits_from+: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + inheritance_modifier: + inheritance_specifier: + inherits_from: [function_type, suppressed_constraint, user_type] + init_declaration: + $children*: [attribute, bang, modifiers, parameter, throws, throws_clause, type_constraints, type_parameters] + body?: function_body + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + name: "init" + integer_literal: + interpolated_expression: + $children?: type_modifiers + name?: value_argument_label + reference_specifier*: value_argument_label + value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + key_path_expression: + $children*: [array_type, bang, dictionary_type, simple_identifier, type_arguments, type_identifier, value_argument] + key_path_string_expression: + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lambda_function_type: + $children*: [lambda_function_type_parameters, throws, throws_clause] + name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + lambda_function_type_parameters: + $children+: lambda_parameter + lambda_literal: + $children*: [attribute, statements] + captures?: capture_list + type?: lambda_function_type + lambda_parameter: + $children?: [parameter_modifiers, self_expression] + external_name?: simple_identifier + name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + line_str_text: + line_string_literal: + interpolation*: interpolated_expression + text*: [line_str_text, str_escaped_char] + macro_declaration: + $children+: [array_type, attribute, dictionary_type, existential_type, function_type, metatype, modifiers, opaque_type, optional_type, parameter, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_constraints, type_pack_expansion, type_parameter_pack, type_parameters, user_type] + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + definition?: macro_definition + macro_definition: + body+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, external_macro_definition, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + macro_invocation: + $children+: [call_suffix, simple_identifier, type_parameters] + member_modifier: + metatype: + $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + modifiers: + $children+: [attribute, function_modifier, inheritance_modifier, member_modifier, mutation_modifier, ownership_modifier, parameter_modifier, property_behavior_modifier, property_modifier, visibility_modifier] + modify_specifier: + $children?: mutation_modifier + multi_line_str_text: + multi_line_string_literal: + interpolation*: interpolated_expression + text*: ["\"", multi_line_str_text, str_escaped_char] + multiline_comment: + multiplicative_expression: + lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: ["%", "*", "/"] + rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + mutation_modifier: + navigation_expression: + element?: [dictionary_type, existential_type, opaque_type] + suffix: navigation_suffix + target+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack, "|", "~"] + navigation_suffix: + suffix: [integer_literal, simple_identifier] + nil_coalescing_expression: + if_nil+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + oct_literal: + opaque_type: + $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + open_end_range_expression: + start+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + open_start_range_expression: + end+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + operator_declaration: + $children*: [bang, custom_operator, deprecated_operator_declaration_body, simple_identifier] + optional_type: + wrapped: [array_type, dictionary_type, tuple_type, user_type] + ownership_modifier: + parameter: + $children?: parameter_modifiers + external_name?: simple_identifier + name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type+: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + parameter_modifier: + parameter_modifiers: + $children+: parameter_modifier + pattern: + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, pattern, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, wildcard_pattern] + bound_identifier?: simple_identifier + name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + playground_literal: + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + postfix_expression: + operation: ["++", "--", bang] + target+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + precedence_group_attribute: + $children+: [boolean_literal, simple_identifier] + precedence_group_attributes: + $children+: precedence_group_attribute + precedence_group_declaration: + $children+: [precedence_group_attributes, simple_identifier] + prefix_expression: + operation: ["&", "+", "++", "-", "--", ".", bang, custom_operator, "~"] + target+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", _expression, additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + property_behavior_modifier: + property_declaration: + $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_annotation, type_constraints, value_binding_pattern, willset_didset_block] + computed_value*: computed_property + name+: pattern + value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + property_modifier: + protocol_body: + $children*: [associatedtype_declaration, deinit_declaration, init_declaration, protocol_function_declaration, protocol_property_declaration, subscript_declaration, typealias_declaration] + body*: protocol_function_declaration + protocol_composition_type: + $children+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + protocol_declaration: + $children*: [attribute, inheritance_specifier, modifiers, type_constraints, type_parameters] + body: protocol_body + declaration_kind: "protocol" + name: type_identifier + protocol_function_declaration: + $children*: [attribute, modifiers, parameter, statements, throws, throws_clause, type_constraints, type_parameters] + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + name*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", array_type, bang, custom_operator, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type, "|", "~"] + return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + protocol_property_declaration: + $children+: [modifiers, protocol_property_requirements, type_annotation, type_constraints] + name: pattern + protocol_property_requirements: + $children*: [getter_specifier, setter_specifier] + range_expression: + end+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + op: ["...", "..<"] + start+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + raw_str_continuing_indicator: + raw_str_end_part: + raw_str_interpolation: + $children: raw_str_interpolation_start + interpolation+: interpolated_expression + raw_str_interpolation_start: + raw_str_part: + raw_string_literal: + $children*: raw_str_continuing_indicator + interpolation*: raw_str_interpolation + text+: [raw_str_end_part, raw_str_part] + real_literal: + regex_literal: + repeat_while_statement: + $children?: statements + bound_identifier*: simple_identifier + condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + selector_expression: + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + self_expression: + setter_specifier: + $children?: mutation_modifier + shebang_line: + simple_identifier: + source_file: + $children*: [additive_expression, array_literal, as_expression, assignment, associatedtype_declaration, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, import_declaration, infix_expression, init_declaration, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_declaration, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, operator_declaration, playground_literal, postfix_expression, precedence_group_declaration, prefix_expression, property_declaration, protocol_declaration, range_expression, raw_string_literal, real_literal, regex_literal, repeat_while_statement, selector_expression, self_expression, shebang_line, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] + special_literal: + statement_label: + statements: + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, control_transfer_statement, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, property_declaration, range_expression, raw_string_literal, real_literal, regex_literal, repeat_while_statement, selector_expression, self_expression, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] + str_escaped_char: + subscript_declaration: + $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + super_expression: + suppressed_constraint: + suppressed: type_identifier + switch_entry: + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, default_keyword, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, modifiers, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, statements, super_expression, switch_pattern, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] + switch_pattern: + $children: pattern + switch_statement: + $children*: switch_entry + expr+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + ternary_expression: + condition+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + if_false+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + if_true+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + throw_keyword: + throws: + throws_clause: + type: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + try_expression: + $children: try_operator + expr+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + try_operator: + tuple_expression: + name*: simple_identifier + value+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + tuple_type: + $children?: tuple_type_item + element*: tuple_type_item + tuple_type_item: + $children*: [parameter_modifiers, wildcard_pattern] + element?: [dictionary_type, existential_type, opaque_type] + name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + type_annotation: + name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type+: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + type_arguments: + $children*: type_modifiers + name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type_constraint: + $children: [equality_constraint, inheritance_constraint] + type_constraints: + $children+: [type_constraint, where_keyword] + type_identifier: + type_modifiers: + $children+: attribute + type_pack_expansion: + $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type_parameter: + $children+: [type_identifier, type_modifiers, type_parameter_modifiers, type_parameter_pack] + name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type_parameter_modifiers: + $children+: attribute + type_parameter_pack: + $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type_parameters: + $children+: [type_constraints, type_parameter] + typealias_declaration: + $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_parameters] + name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] + value+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + user_type: + $children+: [type_arguments, type_identifier] + value_argument: + $children?: type_modifiers + name?: value_argument_label + reference_specifier*: value_argument_label + value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value_argument_label: + $children: simple_identifier + value_arguments: + $children*: value_argument + value_binding_pattern: + mutability: ["let", "var"] + value_pack_expansion: + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + value_parameter_pack: + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + visibility_modifier: + where_clause: + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] + where_keyword: + while_statement: + $children?: statements + bound_identifier*: simple_identifier + condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + wildcard_pattern: + willset_clause: + $children*: [modifiers, simple_identifier, statements] + willset_didset_block: + $children+: [didset_clause, willset_clause] + +unnamed: + - "?" + - "!" + - "!=" + - "!==" + - "\"" + - "\"\"\"" + - "#" + - "#else" + - "#elseif" + - "#endif" + - "#if" + - "%" + - "%=" + - "&" + - "&&" + - "(" + - ")" + - "*" + - "*=" + - "+" + - "++" + - "+=" + - "," + - "-" + - "--" + - "-=" + - "->" + - "." + - "..." + - "..<" + - "/" + - "/=" + - ":" + - ";" + - "<" + - "<<" + - "<=" + - "=" + - "==" + - "===" + - ">" + - ">=" + - ">>" + - "?" + - "??" + - "@" + - "@autoclosure" + - "@escaping" + - "Protocol" + - "Type" + - "[" + - "\\" + - "\\(" + - "]" + - "^" + - "^{" + - "_modify" + - "actor" + - "any" + - "arch" + - "as" + - "as!" + - "as?" + - "associatedtype" + - "async" + - "available" + - "await" + - "borrowing" + - "break" + - "canImport" + - "case" + - "class" + - "colorLiteral" + - "column" + - "compiler" + - "consuming" + - "continue" + - "convenience" + - "deinit" + - "delegate" + - "didSet" + - "distributed" + - "do" + - "dsohandle" + - "dynamic" + - "each" + - "enum" + - "extension" + - "externalMacro" + - "fallthrough" + - "false" + - "file" + - "fileID" + - "fileLiteral" + - "filePath" + - "fileprivate" + - "final" + - "for" + - "func" + - "function" + - "get" + - "getter:" + - "guard" + - "if" + - "imageLiteral" + - "import" + - "in" + - "indirect" + - "infix" + - "init" + - "inout" + - "internal" + - "is" + - "keyPath" + - "lazy" + - "let" + - "line" + - "macro" + - "mutating" + - "nil" + - "nonisolated" + - "nonmutating" + - "open" + - "operator" + - "optional" + - "os" + - "override" + - "package" + - "param" + - "postfix" + - "precedencegroup" + - "prefix" + - "private" + - "property" + - "protocol" + - "public" + - "receiver" + - "repeat" + - "required" + - "return" + - "selector" + - "self" + - "set" + - "setparam" + - "setter:" + - "some" + - "static" + - "struct" + - "subscript" + - "super" + - "swift" + - "switch" + - "targetEnvironment" + - "true" + - "try" + - "try!" + - "try?" + - "typealias" + - "u" + - "unavailable" + - "unowned" + - "unowned(safe)" + - "unowned(unsafe)" + - "var" + - "weak" + - "while" + - "willSet" + - "yield" + - "{" + - "|" + - "||" + - "}" + - "~" diff --git a/unified/scripts/regenerate-grammar.sh b/unified/scripts/regenerate-grammar.sh new file mode 100755 index 000000000000..b7a5ce263fb8 --- /dev/null +++ b/unified/scripts/regenerate-grammar.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Regenerate the vendored tree-sitter-swift parser tables from grammar.js, +# then refresh the human-readable node-types.yml companion file. +# +# Run this after editing +# unified/extractor/tree-sitter-swift/grammar.js so that: +# * src/parser.c, src/grammar.json, src/node-types.json (and the +# src/tree_sitter/*.h headers) reflect the current grammar; and +# * node-types.yml shows the same information in a form that's +# pleasant to review in PR diffs. +# +# Requirements: tree-sitter CLI on PATH, and a working cargo toolchain. +set -euo pipefail + +cd "$(dirname "$0")/.." +SWIFT_DIR="extractor/tree-sitter-swift" + +( + cd "$SWIFT_DIR" + tree-sitter generate +) + +# Build yeast's node_types_yaml binary and use it to convert the freshly +# generated src/node-types.json into the human-readable node-types.yml. +cargo run --release --quiet -p yeast --bin node_types_yaml -- \ + --from-json "$SWIFT_DIR/src/node-types.json" > "$SWIFT_DIR/node-types.yml" + +echo "Regenerated $SWIFT_DIR/{src/parser.c,src/grammar.json,src/node-types.json,node-types.yml}" From e709650449fcc04e0b545681894fbcc4de03d086 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 14:13:06 +0000 Subject: [PATCH 02/24] unified: Rebuild generated files The astute reader will note that we seem to _lose_ some node types in the process. Apparently, these were unreachable in the grammar, and the newer version of tree-sitter removes such "dead code". --- unified/extractor/tree-sitter-swift/node-types.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 6b3e19f5bf0b..9fc368de5955 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -537,7 +537,6 @@ unnamed: - "continue" - "convenience" - "deinit" - - "delegate" - "didSet" - "distributed" - "do" @@ -586,22 +585,18 @@ unnamed: - "os" - "override" - "package" - - "param" - "postfix" - "precedencegroup" - "prefix" - "private" - - "property" - "protocol" - "public" - - "receiver" - "repeat" - "required" - "return" - "selector" - "self" - "set" - - "setparam" - "setter:" - "some" - "static" @@ -613,8 +608,6 @@ unnamed: - "targetEnvironment" - "true" - "try" - - "try!" - - "try?" - "typealias" - "u" - "unavailable" From 9062bba168d2bec4c55f9e589b431bb2ba858f3b Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 14:41:20 +0000 Subject: [PATCH 03/24] unified: get rid of undesirable self-recursion in _expression This caused any field containing an _expression to appear as if it could countain any number of such nodes. It also threw away the information that there was a `?` marker there. To fix it, we simply move the definition into its own named node. --- .../extractor/tree-sitter-swift/grammar.js | 4 +- .../tree-sitter-swift/node-types.yml | 144 +++++++++--------- 2 files changed, 76 insertions(+), 72 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 5f4e85547ad4..a72253292e2d 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -521,9 +521,11 @@ module.exports = grammar({ $.assignment, $.value_parameter_pack, $.value_pack_expansion, - seq($._expression, alias($._immediate_quest, "?")) + $.optional_chain_marker ) ), + optional_chain_marker: ($) => + seq($._expression, alias($._immediate_quest, "?")), // Unary expressions _unary_expression: ($) => choice( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 9fc368de5955..8d7f99ee205b 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -1,23 +1,23 @@ named: _expression: additive_expression: - lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: ["+", "-"] - rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] array_literal: - element*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + element*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] array_type: element+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] as_expression: $children: as_operator - expr+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + expr: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] as_operator: assignment: operator: ["%=", "*=", "+=", "-=", "/=", "="] - result+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + result: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] target: directly_assignable_expression associatedtype_declaration: $children*: [modifiers, type_constraints] @@ -25,21 +25,21 @@ named: must_inherit*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] attribute: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack] availability_condition: $children*: [identifier, integer_literal] await_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - expr*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + expr?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] bang: bin_literal: bitwise_operation: - lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: ["&", "<<", ">>", "^", "|"] - rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] boolean_literal: call_expression: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, call_suffix, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, call_suffix, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] call_suffix: $children+: [lambda_literal, value_arguments] name*: simple_identifier @@ -48,7 +48,7 @@ named: capture_list_item: $children?: ownership_modifier name: [self_expression, simple_identifier] - value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] catch_block: $children+: [catch_keyword, statements, where_clause] error?: pattern @@ -56,7 +56,7 @@ named: check_expression: name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] op: "is" - target+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + target: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] class_body: $children*: [associatedtype_declaration, class_declaration, deinit_declaration, function_declaration, import_declaration, init_declaration, multiline_comment, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] @@ -67,9 +67,9 @@ named: name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] comment: comparison_expression: - lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: ["<", "<=", ">", ">="] - rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] computed_getter: $children+: [attribute, getter_specifier, statements] computed_modify: @@ -79,9 +79,9 @@ named: computed_setter: $children+: [attribute, setter_specifier, simple_identifier, statements] conjunction_expression: - lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: "&&" - rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] constructor_expression: $children: constructor_suffix constructed_type: [array_type, dictionary_type, user_type] @@ -89,8 +89,8 @@ named: $children+: [lambda_literal, value_arguments] name*: simple_identifier control_transfer_statement: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - result*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + result?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] custom_operator: default_keyword: deinit_declaration: @@ -100,8 +100,8 @@ named: $children*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] diagnostic: dictionary_literal: - key*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + key*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] dictionary_type: key+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -111,11 +111,11 @@ named: directive: $children*: [boolean_literal, integer_literal, simple_identifier] directly_assignable_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] disjunction_expression: - lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: "||" - rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] do_statement: $children*: [catch_block, statements] else: @@ -125,9 +125,9 @@ named: $children?: modifiers data_contents*: enum_type_parameters name+: simple_identifier - raw_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + raw_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] enum_type_parameters: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, value_pack_expansion, value_parameter_pack, wildcard_pattern] + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, value_pack_expansion, value_parameter_pack, wildcard_pattern] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] equality_constraint: $children*: attribute @@ -135,16 +135,16 @@ named: must_equal+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] equality_expression: - lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: ["!=", "!==", "==", "==="] - rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] existential_type: $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] external_macro_definition: $children: value_arguments for_statement: $children*: [statements, try_operator, type_annotation, where_clause] - collection+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + collection: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] item: pattern fully_open_range: function_body: @@ -152,7 +152,7 @@ named: function_declaration: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, parameter, property_behavior_modifier, throws, throws_clause, type_constraints, type_parameters] body: function_body - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] name+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", array_type, bang, custom_operator, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type, "|", "~"] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] function_modifier: @@ -166,7 +166,7 @@ named: guard_statement: $children+: [else, statements] bound_identifier*: simple_identifier - condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] hex_literal: identifier: @@ -174,14 +174,14 @@ named: if_statement: $children*: [else, if_statement, statements] bound_identifier*: simple_identifier - condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] import_declaration: $children+: [identifier, modifiers] infix_expression: - lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: custom_operator - rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] inheritance_constraint: $children*: attribute constrained_type+: [".", array_type, dictionary_type, existential_type, function_type, identifier, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -193,18 +193,18 @@ named: init_declaration: $children*: [attribute, bang, modifiers, parameter, throws, throws_clause, type_constraints, type_parameters] body?: function_body - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] name: "init" integer_literal: interpolated_expression: $children?: type_modifiers name?: value_argument_label reference_specifier*: value_argument_label - value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] key_path_expression: $children*: [array_type, bang, dictionary_type, simple_identifier, type_arguments, type_identifier, value_argument] key_path_string_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] lambda_function_type: $children*: [lambda_function_type_parameters, throws, throws_clause] name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -226,10 +226,10 @@ named: text*: [line_str_text, str_escaped_char] macro_declaration: $children+: [array_type, attribute, dictionary_type, existential_type, function_type, metatype, modifiers, opaque_type, optional_type, parameter, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_constraints, type_pack_expansion, type_parameter_pack, type_parameters, user_type] - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] definition?: macro_definition macro_definition: - body+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, external_macro_definition, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + body: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, external_macro_definition, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] macro_invocation: $children+: [call_suffix, simple_identifier, type_parameters] member_modifier: @@ -245,28 +245,30 @@ named: text*: ["\"", multi_line_str_text, str_escaped_char] multiline_comment: multiplicative_expression: - lhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: ["%", "*", "/"] - rhs+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] mutation_modifier: navigation_expression: element?: [dictionary_type, existential_type, opaque_type] suffix: navigation_suffix - target+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack, "|", "~"] + target+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, array_type, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack, "|", "~"] navigation_suffix: suffix: [integer_literal, simple_identifier] nil_coalescing_expression: - if_nil+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - value+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + if_nil: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] oct_literal: opaque_type: $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] open_end_range_expression: - start+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + start: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] open_start_range_expression: - end+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + end: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] operator_declaration: $children*: [bang, custom_operator, deprecated_operator_declaration_body, simple_identifier] + optional_chain_marker: + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] optional_type: wrapped: [array_type, dictionary_type, tuple_type, user_type] ownership_modifier: @@ -279,14 +281,14 @@ named: parameter_modifiers: $children+: parameter_modifier pattern: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, pattern, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, wildcard_pattern] + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, pattern, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, wildcard_pattern] bound_identifier?: simple_identifier name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] playground_literal: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] postfix_expression: operation: ["++", "--", bang] - target+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + target: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] precedence_group_attribute: $children+: [boolean_literal, simple_identifier] precedence_group_attributes: @@ -295,13 +297,13 @@ named: $children+: [precedence_group_attributes, simple_identifier] prefix_expression: operation: ["&", "+", "++", "-", "--", ".", bang, custom_operator, "~"] - target+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", _expression, additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + target: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", _expression, additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] property_behavior_modifier: property_declaration: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_annotation, type_constraints, value_binding_pattern, willset_didset_block] computed_value*: computed_property name+: pattern - value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] property_modifier: protocol_body: $children*: [associatedtype_declaration, deinit_declaration, init_declaration, protocol_function_declaration, protocol_property_declaration, subscript_declaration, typealias_declaration] @@ -315,7 +317,7 @@ named: name: type_identifier protocol_function_declaration: $children*: [attribute, modifiers, parameter, statements, throws, throws_clause, type_constraints, type_parameters] - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] name*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", array_type, bang, custom_operator, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type, "|", "~"] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] protocol_property_declaration: @@ -324,9 +326,9 @@ named: protocol_property_requirements: $children*: [getter_specifier, setter_specifier] range_expression: - end+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + end: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] op: ["...", "..<"] - start+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + start: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] raw_str_continuing_indicator: raw_str_end_part: raw_str_interpolation: @@ -343,52 +345,52 @@ named: repeat_while_statement: $children?: statements bound_identifier*: simple_identifier - condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] selector_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] self_expression: setter_specifier: $children?: mutation_modifier shebang_line: simple_identifier: source_file: - $children*: [additive_expression, array_literal, as_expression, assignment, associatedtype_declaration, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, import_declaration, infix_expression, init_declaration, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_declaration, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, operator_declaration, playground_literal, postfix_expression, precedence_group_declaration, prefix_expression, property_declaration, protocol_declaration, range_expression, raw_string_literal, real_literal, regex_literal, repeat_while_statement, selector_expression, self_expression, shebang_line, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] + $children*: [additive_expression, array_literal, as_expression, assignment, associatedtype_declaration, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, import_declaration, infix_expression, init_declaration, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_declaration, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, operator_declaration, optional_chain_marker, playground_literal, postfix_expression, precedence_group_declaration, prefix_expression, property_declaration, protocol_declaration, range_expression, raw_string_literal, real_literal, regex_literal, repeat_while_statement, selector_expression, self_expression, shebang_line, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] special_literal: statement_label: statements: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, control_transfer_statement, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, property_declaration, range_expression, raw_string_literal, real_literal, regex_literal, repeat_while_statement, selector_expression, self_expression, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, control_transfer_statement, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, property_declaration, range_expression, raw_string_literal, real_literal, regex_literal, repeat_while_statement, selector_expression, self_expression, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] str_escaped_char: subscript_declaration: $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] super_expression: suppressed_constraint: suppressed: type_identifier switch_entry: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, default_keyword, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, modifiers, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, statements, super_expression, switch_pattern, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, default_keyword, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, modifiers, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, statements, super_expression, switch_pattern, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] switch_pattern: $children: pattern switch_statement: $children*: switch_entry - expr+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + expr: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] ternary_expression: - condition+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - if_false+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - if_true+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + condition: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + if_false: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + if_true: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] throw_keyword: throws: throws_clause: type: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] try_expression: $children: try_operator - expr+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + expr: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] try_operator: tuple_expression: name*: simple_identifier - value+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] tuple_type: $children?: tuple_type_item element*: tuple_type_item @@ -431,7 +433,7 @@ named: $children?: type_modifiers name?: value_argument_label reference_specifier*: value_argument_label - value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] value_argument_label: $children: simple_identifier value_arguments: @@ -439,17 +441,17 @@ named: value_binding_pattern: mutability: ["let", "var"] value_pack_expansion: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] value_parameter_pack: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] visibility_modifier: where_clause: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] where_keyword: while_statement: $children?: statements bound_identifier*: simple_identifier - condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] wildcard_pattern: willset_clause: From 76a1a87c41d5da9d5d481b07691174d0670321db Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 14:41:31 +0000 Subject: [PATCH 04/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 218 ++++++------ unified/ql/lib/unified.dbscheme | 483 ++++++++------------------ 2 files changed, 256 insertions(+), 445 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index 54c1caceaf4b..8155f61de562 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -99,11 +99,11 @@ module Swift { final override string getAPrimaryQlClass() { result = "AdditiveExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs(int i) { swift_additive_expression_lhs(this, i, result) } + final AstNode getLhs() { swift_additive_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_additive_expression_def(this, value) | + exists(int value | swift_additive_expression_def(this, _, value, _) | result = "+" and value = 0 or result = "-" and value = 1 @@ -111,12 +111,12 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs(int i) { swift_additive_expression_rhs(this, i, result) } + final AstNode getRhs() { swift_additive_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_additive_expression_lhs(this, _, result) or - swift_additive_expression_rhs(this, _, result) + swift_additive_expression_def(this, result, _, _) or + swift_additive_expression_def(this, _, _, result) } } @@ -155,23 +155,23 @@ module Swift { final override string getAPrimaryQlClass() { result = "AsExpression" } /** Gets the node corresponding to the field `expr`. */ - final AstNode getExpr(int i) { swift_as_expression_expr(this, i, result) } + final AstNode getExpr() { swift_as_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_as_expression_def(this, result, _) } + final AstNode getName() { swift_as_expression_def(this, _, result, _) } /** Gets the node corresponding to the field `type`. */ final AstNode getType(int i) { swift_as_expression_type(this, i, result) } /** Gets the child of this node. */ - final AsOperator getChild() { swift_as_expression_def(this, _, result) } + final AsOperator getChild() { swift_as_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_as_expression_expr(this, _, result) or - swift_as_expression_def(this, result, _) or + swift_as_expression_def(this, result, _, _) or + swift_as_expression_def(this, _, result, _) or swift_as_expression_type(this, _, result) or - swift_as_expression_def(this, _, result) + swift_as_expression_def(this, _, _, result) } } @@ -188,7 +188,7 @@ module Swift { /** Gets the node corresponding to the field `operator`. */ final string getOperator() { - exists(int value | swift_assignment_def(this, value, _) | + exists(int value | swift_assignment_def(this, value, _, _) | result = "%=" and value = 0 or result = "*=" and value = 1 @@ -204,14 +204,14 @@ module Swift { } /** Gets the node corresponding to the field `result`. */ - final AstNode getResult(int i) { swift_assignment_result(this, i, result) } + final AstNode getResult() { swift_assignment_def(this, _, result, _) } /** Gets the node corresponding to the field `target`. */ - final DirectlyAssignableExpression getTarget() { swift_assignment_def(this, _, result) } + final DirectlyAssignableExpression getTarget() { swift_assignment_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_assignment_result(this, _, result) or swift_assignment_def(this, _, result) + swift_assignment_def(this, _, result, _) or swift_assignment_def(this, _, _, result) } } @@ -277,14 +277,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "AwaitExpression" } /** Gets the node corresponding to the field `expr`. */ - final AstNode getExpr(int i) { swift_await_expression_expr(this, i, result) } + final AstNode getExpr() { swift_await_expression_expr(this, result) } /** Gets the child of this node. */ final AstNode getChild() { swift_await_expression_child(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_await_expression_expr(this, _, result) or swift_await_expression_child(this, result) + swift_await_expression_expr(this, result) or swift_await_expression_child(this, result) } } @@ -306,11 +306,11 @@ module Swift { final override string getAPrimaryQlClass() { result = "BitwiseOperation" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs(int i) { swift_bitwise_operation_lhs(this, i, result) } + final AstNode getLhs() { swift_bitwise_operation_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_bitwise_operation_def(this, value) | + exists(int value | swift_bitwise_operation_def(this, _, value, _) | result = "&" and value = 0 or result = "<<" and value = 1 @@ -324,11 +324,12 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs(int i) { swift_bitwise_operation_rhs(this, i, result) } + final AstNode getRhs() { swift_bitwise_operation_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_bitwise_operation_lhs(this, _, result) or swift_bitwise_operation_rhs(this, _, result) + swift_bitwise_operation_def(this, result, _, _) or + swift_bitwise_operation_def(this, _, _, result) } } @@ -388,7 +389,7 @@ module Swift { final AstNode getName() { swift_capture_list_item_def(this, result) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_capture_list_item_value(this, i, result) } + final AstNode getValue() { swift_capture_list_item_value(this, result) } /** Gets the child of this node. */ final OwnershipModifier getChild() { swift_capture_list_item_child(this, result) } @@ -396,7 +397,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_capture_list_item_def(this, result) or - swift_capture_list_item_value(this, _, result) or + swift_capture_list_item_value(this, result) or swift_capture_list_item_child(this, result) } } @@ -430,23 +431,25 @@ module Swift { final override string getAPrimaryQlClass() { result = "CheckExpression" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_check_expression_def(this, result, _) } + final AstNode getName() { swift_check_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_check_expression_def(this, _, value) | (result = "is" and value = 0)) + exists(int value | swift_check_expression_def(this, _, value, _) | + (result = "is" and value = 0) + ) } /** Gets the node corresponding to the field `target`. */ - final AstNode getTarget(int i) { swift_check_expression_target(this, i, result) } + final AstNode getTarget() { swift_check_expression_def(this, _, _, result) } /** Gets the node corresponding to the field `type`. */ final AstNode getType(int i) { swift_check_expression_type(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_check_expression_def(this, result, _) or - swift_check_expression_target(this, _, result) or + swift_check_expression_def(this, result, _, _) or + swift_check_expression_def(this, _, _, result) or swift_check_expression_type(this, _, result) } } @@ -512,11 +515,11 @@ module Swift { final override string getAPrimaryQlClass() { result = "ComparisonExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs(int i) { swift_comparison_expression_lhs(this, i, result) } + final AstNode getLhs() { swift_comparison_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_comparison_expression_def(this, value) | + exists(int value | swift_comparison_expression_def(this, _, value, _) | result = "<" and value = 0 or result = "<=" and value = 1 @@ -528,12 +531,12 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs(int i) { swift_comparison_expression_rhs(this, i, result) } + final AstNode getRhs() { swift_comparison_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_comparison_expression_lhs(this, _, result) or - swift_comparison_expression_rhs(this, _, result) + swift_comparison_expression_def(this, result, _, _) or + swift_comparison_expression_def(this, _, _, result) } } @@ -591,22 +594,22 @@ module Swift { final override string getAPrimaryQlClass() { result = "ConjunctionExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs(int i) { swift_conjunction_expression_lhs(this, i, result) } + final AstNode getLhs() { swift_conjunction_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_conjunction_expression_def(this, value) | + exists(int value | swift_conjunction_expression_def(this, _, value, _) | (result = "&&" and value = 0) ) } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs(int i) { swift_conjunction_expression_rhs(this, i, result) } + final AstNode getRhs() { swift_conjunction_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_conjunction_expression_lhs(this, _, result) or - swift_conjunction_expression_rhs(this, _, result) + swift_conjunction_expression_def(this, result, _, _) or + swift_conjunction_expression_def(this, _, _, result) } } @@ -652,14 +655,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "ControlTransferStatement" } /** Gets the node corresponding to the field `result`. */ - final AstNode getResult(int i) { swift_control_transfer_statement_result(this, i, result) } + final AstNode getResult() { swift_control_transfer_statement_result(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_control_transfer_statement_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_control_transfer_statement_result(this, _, result) or + swift_control_transfer_statement_result(this, result) or swift_control_transfer_statement_child(this, _, result) } } @@ -801,22 +804,22 @@ module Swift { final override string getAPrimaryQlClass() { result = "DisjunctionExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs(int i) { swift_disjunction_expression_lhs(this, i, result) } + final AstNode getLhs() { swift_disjunction_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_disjunction_expression_def(this, value) | + exists(int value | swift_disjunction_expression_def(this, _, value, _) | (result = "||" and value = 0) ) } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs(int i) { swift_disjunction_expression_rhs(this, i, result) } + final AstNode getRhs() { swift_disjunction_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_disjunction_expression_lhs(this, _, result) or - swift_disjunction_expression_rhs(this, _, result) + swift_disjunction_expression_def(this, result, _, _) or + swift_disjunction_expression_def(this, _, _, result) } } @@ -930,11 +933,11 @@ module Swift { final override string getAPrimaryQlClass() { result = "EqualityExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs(int i) { swift_equality_expression_lhs(this, i, result) } + final AstNode getLhs() { swift_equality_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_equality_expression_def(this, value) | + exists(int value | swift_equality_expression_def(this, _, value, _) | result = "!=" and value = 0 or result = "!==" and value = 1 @@ -946,12 +949,12 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs(int i) { swift_equality_expression_rhs(this, i, result) } + final AstNode getRhs() { swift_equality_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_equality_expression_lhs(this, _, result) or - swift_equality_expression_rhs(this, _, result) + swift_equality_expression_def(this, result, _, _) or + swift_equality_expression_def(this, _, _, result) } } @@ -985,18 +988,18 @@ module Swift { final override string getAPrimaryQlClass() { result = "ForStatement" } /** Gets the node corresponding to the field `collection`. */ - final AstNode getCollection(int i) { swift_for_statement_collection(this, i, result) } + final AstNode 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 `i`th child of this node. */ final AstNode getChild(int i) { swift_for_statement_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_for_statement_collection(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_child(this, _, result) } } @@ -1187,19 +1190,19 @@ module Swift { final override string getAPrimaryQlClass() { result = "InfixExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs(int i) { swift_infix_expression_lhs(this, i, result) } + final AstNode getLhs() { swift_infix_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ - final CustomOperator getOp() { swift_infix_expression_def(this, result) } + final CustomOperator getOp() { swift_infix_expression_def(this, _, result, _) } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs(int i) { swift_infix_expression_rhs(this, i, result) } + final AstNode getRhs() { swift_infix_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_infix_expression_lhs(this, _, result) or - swift_infix_expression_def(this, result) or - swift_infix_expression_rhs(this, _, result) + swift_infix_expression_def(this, result, _, _) or + swift_infix_expression_def(this, _, result, _) or + swift_infix_expression_def(this, _, _, result) } } @@ -1298,7 +1301,7 @@ module Swift { } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_interpolated_expression_value(this, i, result) } + final AstNode getValue() { swift_interpolated_expression_value(this, result) } /** Gets the child of this node. */ final TypeModifiers getChild() { swift_interpolated_expression_child(this, result) } @@ -1307,7 +1310,7 @@ module Swift { final override AstNode getAFieldOrChild() { swift_interpolated_expression_name(this, result) or swift_interpolated_expression_reference_specifier(this, _, result) or - swift_interpolated_expression_value(this, _, result) or + swift_interpolated_expression_value(this, result) or swift_interpolated_expression_child(this, result) } } @@ -1478,10 +1481,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "MacroDefinition" } /** Gets the node corresponding to the field `body`. */ - final AstNode getBody(int i) { swift_macro_definition_body(this, i, result) } + final AstNode getBody() { swift_macro_definition_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_macro_definition_body(this, _, result) } + final override AstNode getAFieldOrChild() { swift_macro_definition_def(this, result) } } /** A class representing `macro_invocation` nodes. */ @@ -1576,11 +1579,11 @@ module Swift { final override string getAPrimaryQlClass() { result = "MultiplicativeExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs(int i) { swift_multiplicative_expression_lhs(this, i, result) } + final AstNode getLhs() { swift_multiplicative_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_multiplicative_expression_def(this, value) | + exists(int value | swift_multiplicative_expression_def(this, _, value, _) | result = "%" and value = 0 or result = "*" and value = 1 @@ -1590,12 +1593,12 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs(int i) { swift_multiplicative_expression_rhs(this, i, result) } + final AstNode getRhs() { swift_multiplicative_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_multiplicative_expression_lhs(this, _, result) or - swift_multiplicative_expression_rhs(this, _, result) + swift_multiplicative_expression_def(this, result, _, _) or + swift_multiplicative_expression_def(this, _, _, result) } } @@ -1645,15 +1648,15 @@ module Swift { final override string getAPrimaryQlClass() { result = "NilCoalescingExpression" } /** Gets the node corresponding to the field `if_nil`. */ - final AstNode getIfNil(int i) { swift_nil_coalescing_expression_if_nil(this, i, result) } + final AstNode getIfNil() { swift_nil_coalescing_expression_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_nil_coalescing_expression_value(this, i, result) } + final AstNode getValue() { swift_nil_coalescing_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_nil_coalescing_expression_if_nil(this, _, result) or - swift_nil_coalescing_expression_value(this, _, result) + swift_nil_coalescing_expression_def(this, result, _) or + swift_nil_coalescing_expression_def(this, _, result) } } @@ -1681,12 +1684,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "OpenEndRangeExpression" } /** Gets the node corresponding to the field `start`. */ - final AstNode getStart(int i) { swift_open_end_range_expression_start(this, i, result) } + final AstNode getStart() { swift_open_end_range_expression_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_open_end_range_expression_start(this, _, result) - } + final override AstNode getAFieldOrChild() { swift_open_end_range_expression_def(this, result) } } /** A class representing `open_start_range_expression` nodes. */ @@ -1695,11 +1696,11 @@ module Swift { final override string getAPrimaryQlClass() { result = "OpenStartRangeExpression" } /** Gets the node corresponding to the field `end`. */ - final AstNode getEnd(int i) { swift_open_start_range_expression_end(this, i, result) } + final AstNode getEnd() { swift_open_start_range_expression_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_open_start_range_expression_end(this, _, result) + swift_open_start_range_expression_def(this, result) } } @@ -1715,6 +1716,18 @@ module Swift { final override AstNode getAFieldOrChild() { swift_operator_declaration_child(this, _, result) } } + /** A class representing `optional_chain_marker` nodes. */ + class OptionalChainMarker extends @swift_optional_chain_marker, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "OptionalChainMarker" } + + /** Gets the child of this node. */ + final AstNode getChild() { swift_optional_chain_marker_child(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_optional_chain_marker_child(this, result) } + } + /** A class representing `optional_type` nodes. */ class OptionalType extends @swift_optional_type, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1817,14 +1830,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "PostfixExpression" } /** Gets the node corresponding to the field `operation`. */ - final AstNode getOperation() { swift_postfix_expression_def(this, result) } + final AstNode getOperation() { swift_postfix_expression_def(this, result, _) } /** Gets the node corresponding to the field `target`. */ - final AstNode getTarget(int i) { swift_postfix_expression_target(this, i, result) } + final AstNode getTarget() { swift_postfix_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_postfix_expression_def(this, result) or swift_postfix_expression_target(this, _, result) + swift_postfix_expression_def(this, result, _) or swift_postfix_expression_def(this, _, result) } } @@ -1878,14 +1891,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "PrefixExpression" } /** Gets the node corresponding to the field `operation`. */ - final AstNode getOperation() { swift_prefix_expression_def(this, result) } + final AstNode getOperation() { swift_prefix_expression_def(this, result, _) } /** Gets the node corresponding to the field `target`. */ - final AstNode getTarget(int i) { swift_prefix_expression_target(this, i, result) } + final AstNode getTarget() { swift_prefix_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_prefix_expression_def(this, result) or swift_prefix_expression_target(this, _, result) + swift_prefix_expression_def(this, result, _) or swift_prefix_expression_def(this, _, result) } } @@ -2057,11 +2070,11 @@ module Swift { final override string getAPrimaryQlClass() { result = "RangeExpression" } /** Gets the node corresponding to the field `end`. */ - final AstNode getEnd(int i) { swift_range_expression_end(this, i, result) } + final AstNode getEnd() { swift_range_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_range_expression_def(this, value) | + exists(int value | swift_range_expression_def(this, _, value, _) | result = "..." and value = 0 or result = "..<" and value = 1 @@ -2069,11 +2082,12 @@ module Swift { } /** Gets the node corresponding to the field `start`. */ - final AstNode getStart(int i) { swift_range_expression_start(this, i, result) } + final AstNode getStart() { swift_range_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_range_expression_end(this, _, result) or swift_range_expression_start(this, _, result) + swift_range_expression_def(this, result, _, _) or + swift_range_expression_def(this, _, _, result) } } @@ -2347,14 +2361,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "SwitchStatement" } /** Gets the node corresponding to the field `expr`. */ - final AstNode getExpr(int i) { swift_switch_statement_expr(this, i, result) } + final AstNode getExpr() { swift_switch_statement_def(this, result) } /** Gets the `i`th child of this node. */ final SwitchEntry getChild(int i) { swift_switch_statement_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_switch_statement_expr(this, _, result) or swift_switch_statement_child(this, _, result) + swift_switch_statement_def(this, result) or swift_switch_statement_child(this, _, result) } } @@ -2364,19 +2378,19 @@ module Swift { final override string getAPrimaryQlClass() { result = "TernaryExpression" } /** Gets the node corresponding to the field `condition`. */ - final AstNode getCondition(int i) { swift_ternary_expression_condition(this, i, result) } + final AstNode getCondition() { swift_ternary_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `if_false`. */ - final AstNode getIfFalse(int i) { swift_ternary_expression_if_false(this, i, result) } + final AstNode getIfFalse() { swift_ternary_expression_def(this, _, result, _) } /** Gets the node corresponding to the field `if_true`. */ - final AstNode getIfTrue(int i) { swift_ternary_expression_if_true(this, i, result) } + final AstNode getIfTrue() { swift_ternary_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_ternary_expression_condition(this, _, result) or - swift_ternary_expression_if_false(this, _, result) or - swift_ternary_expression_if_true(this, _, result) + swift_ternary_expression_def(this, result, _, _) or + swift_ternary_expression_def(this, _, result, _) or + swift_ternary_expression_def(this, _, _, result) } } @@ -2410,14 +2424,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "TryExpression" } /** Gets the node corresponding to the field `expr`. */ - final AstNode getExpr(int i) { swift_try_expression_expr(this, i, result) } + final AstNode getExpr() { swift_try_expression_def(this, result, _) } /** Gets the child of this node. */ - final TryOperator getChild() { swift_try_expression_def(this, result) } + final TryOperator getChild() { swift_try_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_try_expression_expr(this, _, result) or swift_try_expression_def(this, result) + swift_try_expression_def(this, result, _) or swift_try_expression_def(this, _, result) } } @@ -2678,7 +2692,7 @@ module Swift { } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_value_argument_value(this, i, result) } + final AstNode getValue() { swift_value_argument_value(this, result) } /** Gets the child of this node. */ final TypeModifiers getChild() { swift_value_argument_child(this, result) } @@ -2687,7 +2701,7 @@ module Swift { final override AstNode getAFieldOrChild() { swift_value_argument_name(this, result) or swift_value_argument_reference_specifier(this, _, result) or - swift_value_argument_value(this, _, result) or + swift_value_argument_value(this, result) or swift_value_argument_child(this, result) } } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index c580e8e69271..cfd37ea9db66 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -132,14 +132,7 @@ overlayChangedFiles( ); /*- Swift dbscheme -*/ -@swift_additive_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_additive_expression, index] -swift_additive_expression_lhs( - int swift_additive_expression: @swift_additive_expression ref, - int index: int ref, - unique int lhs: @swift_additive_expression_lhs_type ref -); +@swift_additive_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_additive_expression.op of 0 = @swift_additive_expression_plus @@ -147,21 +140,16 @@ case @swift_additive_expression.op of ; -@swift_additive_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_additive_expression, index] -swift_additive_expression_rhs( - int swift_additive_expression: @swift_additive_expression ref, - int index: int ref, - unique int rhs: @swift_additive_expression_rhs_type ref -); +@swift_additive_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_additive_expression_def( unique int id: @swift_additive_expression, - int op: int ref + int lhs: @swift_additive_expression_lhs_type ref, + int op: int ref, + int rhs: @swift_additive_expression_rhs_type ref ); -@swift_array_literal_element_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_array_literal_element_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_array_literal, index] swift_array_literal_element( @@ -190,14 +178,7 @@ swift_array_type_def( int name: @swift_array_type_name_type ref ); -@swift_as_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_as_expression, index] -swift_as_expression_expr( - int swift_as_expression: @swift_as_expression ref, - int index: int ref, - unique int expr: @swift_as_expression_expr_type ref -); +@swift_as_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack @swift_as_expression_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -212,6 +193,7 @@ swift_as_expression_type( swift_as_expression_def( unique int id: @swift_as_expression, + int expr: @swift_as_expression_expr_type ref, int name: @swift_as_expression_name_type ref, int child: @swift_token_as_operator ref ); @@ -226,18 +208,12 @@ case @swift_assignment.operator of ; -@swift_assignment_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_assignment, index] -swift_assignment_result( - int swift_assignment: @swift_assignment ref, - int index: int ref, - unique int result: @swift_assignment_result_type ref -); +@swift_assignment_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_assignment_def( unique int id: @swift_assignment, int operator: int ref, + int result: @swift_assignment_result_type ref, int target: @swift_directly_assignable_expression ref ); @@ -281,7 +257,7 @@ swift_associatedtype_declaration_def( unique int id: @swift_associatedtype_declaration ); -@swift_attribute_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_attribute_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_attribute, index] swift_attribute_child( @@ -307,16 +283,14 @@ swift_availability_condition_def( unique int id: @swift_availability_condition ); -@swift_await_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_await_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -#keyset[swift_await_expression, index] swift_await_expression_expr( - int swift_await_expression: @swift_await_expression ref, - int index: int ref, + unique int swift_await_expression: @swift_await_expression ref, unique int expr: @swift_await_expression_expr_type ref ); -@swift_await_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_await_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_await_expression_child( unique int swift_await_expression: @swift_await_expression ref, @@ -327,14 +301,7 @@ swift_await_expression_def( unique int id: @swift_await_expression ); -@swift_bitwise_operation_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_bitwise_operation, index] -swift_bitwise_operation_lhs( - int swift_bitwise_operation: @swift_bitwise_operation ref, - int index: int ref, - unique int lhs: @swift_bitwise_operation_lhs_type ref -); +@swift_bitwise_operation_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_bitwise_operation.op of 0 = @swift_bitwise_operation_ampersand @@ -345,21 +312,16 @@ case @swift_bitwise_operation.op of ; -@swift_bitwise_operation_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_bitwise_operation, index] -swift_bitwise_operation_rhs( - int swift_bitwise_operation: @swift_bitwise_operation ref, - int index: int ref, - unique int rhs: @swift_bitwise_operation_rhs_type ref -); +@swift_bitwise_operation_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_bitwise_operation_def( unique int id: @swift_bitwise_operation, - int op: int ref + int lhs: @swift_bitwise_operation_lhs_type ref, + int op: int ref, + int rhs: @swift_bitwise_operation_rhs_type ref ); -@swift_call_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_call_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_call_expression, index] swift_call_expression_child( @@ -405,12 +367,10 @@ swift_capture_list_def( @swift_capture_list_item_name_type = @swift_token_self_expression | @swift_token_simple_identifier -@swift_capture_list_item_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_capture_list_item_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -#keyset[swift_capture_list_item, index] swift_capture_list_item_value( - int swift_capture_list_item: @swift_capture_list_item ref, - int index: int ref, + unique int swift_capture_list_item: @swift_capture_list_item ref, unique int value: @swift_capture_list_item_value_type ref ); @@ -449,14 +409,7 @@ case @swift_check_expression.op of ; -@swift_check_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_check_expression, index] -swift_check_expression_target( - int swift_check_expression: @swift_check_expression ref, - int index: int ref, - unique int target: @swift_check_expression_target_type ref -); +@swift_check_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack @swift_check_expression_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -470,7 +423,8 @@ swift_check_expression_type( swift_check_expression_def( unique int id: @swift_check_expression, int name: @swift_check_expression_name_type ref, - int op: int ref + int op: int ref, + int target: @swift_check_expression_target_type ref ); @swift_class_body_child_type = @swift_associatedtype_declaration | @swift_class_declaration | @swift_deinit_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_subscript_declaration | @swift_token_multiline_comment | @swift_typealias_declaration @@ -515,14 +469,7 @@ swift_class_declaration_def( int name: @swift_class_declaration_name_type ref ); -@swift_comparison_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_comparison_expression, index] -swift_comparison_expression_lhs( - int swift_comparison_expression: @swift_comparison_expression ref, - int index: int ref, - unique int lhs: @swift_comparison_expression_lhs_type ref -); +@swift_comparison_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_comparison_expression.op of 0 = @swift_comparison_expression_langle @@ -532,18 +479,13 @@ case @swift_comparison_expression.op of ; -@swift_comparison_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_comparison_expression, index] -swift_comparison_expression_rhs( - int swift_comparison_expression: @swift_comparison_expression ref, - int index: int ref, - unique int rhs: @swift_comparison_expression_rhs_type ref -); +@swift_comparison_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_comparison_expression_def( unique int id: @swift_comparison_expression, - int op: int ref + int lhs: @swift_comparison_expression_lhs_type ref, + int op: int ref, + int rhs: @swift_comparison_expression_rhs_type ref ); @swift_computed_getter_child_type = @swift_attribute | @swift_getter_specifier | @swift_statements @@ -598,32 +540,20 @@ swift_computed_setter_def( unique int id: @swift_computed_setter ); -@swift_conjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_conjunction_expression, index] -swift_conjunction_expression_lhs( - int swift_conjunction_expression: @swift_conjunction_expression ref, - int index: int ref, - unique int lhs: @swift_conjunction_expression_lhs_type ref -); +@swift_conjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_conjunction_expression.op of 0 = @swift_conjunction_expression_ampersandampersand ; -@swift_conjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_conjunction_expression, index] -swift_conjunction_expression_rhs( - int swift_conjunction_expression: @swift_conjunction_expression ref, - int index: int ref, - unique int rhs: @swift_conjunction_expression_rhs_type ref -); +@swift_conjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_conjunction_expression_def( unique int id: @swift_conjunction_expression, - int op: int ref + int lhs: @swift_conjunction_expression_lhs_type ref, + int op: int ref, + int rhs: @swift_conjunction_expression_rhs_type ref ); @swift_constructor_expression_constructed_type_type = @swift_array_type | @swift_dictionary_type | @swift_user_type @@ -654,16 +584,14 @@ swift_constructor_suffix_def( unique int id: @swift_constructor_suffix ); -@swift_control_transfer_statement_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_control_transfer_statement_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -#keyset[swift_control_transfer_statement, index] swift_control_transfer_statement_result( - int swift_control_transfer_statement: @swift_control_transfer_statement ref, - int index: int ref, + unique int swift_control_transfer_statement: @swift_control_transfer_statement ref, unique int result: @swift_control_transfer_statement_result_type ref ); -@swift_control_transfer_statement_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_control_transfer_statement_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_control_transfer_statement, index] swift_control_transfer_statement_child( @@ -699,7 +627,7 @@ swift_deprecated_operator_declaration_body_def( unique int id: @swift_deprecated_operator_declaration_body ); -@swift_dictionary_literal_key_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_dictionary_literal_key_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_dictionary_literal, index] swift_dictionary_literal_key( @@ -708,7 +636,7 @@ swift_dictionary_literal_key( unique int key__: @swift_dictionary_literal_key_type ref ); -@swift_dictionary_literal_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_dictionary_literal_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_dictionary_literal, index] swift_dictionary_literal_value( @@ -778,7 +706,7 @@ swift_directive_def( unique int id: @swift_directive ); -@swift_directly_assignable_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_directly_assignable_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_directly_assignable_expression_child( unique int swift_directly_assignable_expression: @swift_directly_assignable_expression ref, @@ -789,32 +717,20 @@ swift_directly_assignable_expression_def( unique int id: @swift_directly_assignable_expression ); -@swift_disjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_disjunction_expression, index] -swift_disjunction_expression_lhs( - int swift_disjunction_expression: @swift_disjunction_expression ref, - int index: int ref, - unique int lhs: @swift_disjunction_expression_lhs_type ref -); +@swift_disjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_disjunction_expression.op of 0 = @swift_disjunction_expression_pipepipe ; -@swift_disjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_disjunction_expression, index] -swift_disjunction_expression_rhs( - int swift_disjunction_expression: @swift_disjunction_expression ref, - int index: int ref, - unique int rhs: @swift_disjunction_expression_rhs_type ref -); +@swift_disjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_disjunction_expression_def( unique int id: @swift_disjunction_expression, - int op: int ref + int lhs: @swift_disjunction_expression_lhs_type ref, + int op: int ref, + int rhs: @swift_disjunction_expression_rhs_type ref ); @swift_do_statement_child_type = @swift_catch_block | @swift_statements @@ -857,7 +773,7 @@ swift_enum_entry_name( unique int name: @swift_token_simple_identifier ref ); -@swift_enum_entry_raw_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_enum_entry_raw_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_enum_entry, index] swift_enum_entry_raw_value( @@ -884,7 +800,7 @@ swift_enum_type_parameters_name( unique int name: @swift_enum_type_parameters_name_type ref ); -@swift_enum_type_parameters_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_enum_type_parameters_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_enum_type_parameters, index] swift_enum_type_parameters_child( @@ -929,14 +845,7 @@ swift_equality_constraint_def( int name: @swift_equality_constraint_name_type ref ); -@swift_equality_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_equality_expression, index] -swift_equality_expression_lhs( - int swift_equality_expression: @swift_equality_expression ref, - int index: int ref, - unique int lhs: @swift_equality_expression_lhs_type ref -); +@swift_equality_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_equality_expression.op of 0 = @swift_equality_expression_bangequal @@ -946,18 +855,13 @@ case @swift_equality_expression.op of ; -@swift_equality_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_equality_expression, index] -swift_equality_expression_rhs( - int swift_equality_expression: @swift_equality_expression ref, - int index: int ref, - unique int rhs: @swift_equality_expression_rhs_type ref -); +@swift_equality_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_equality_expression_def( unique int id: @swift_equality_expression, - int op: int ref + int lhs: @swift_equality_expression_lhs_type ref, + int op: int ref, + int rhs: @swift_equality_expression_rhs_type ref ); @swift_existential_type_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -972,14 +876,7 @@ swift_external_macro_definition_def( int child: @swift_value_arguments ref ); -@swift_for_statement_collection_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_for_statement, index] -swift_for_statement_collection( - int swift_for_statement: @swift_for_statement ref, - int index: int ref, - unique int collection: @swift_for_statement_collection_type ref -); +@swift_for_statement_collection_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack @swift_for_statement_child_type = @swift_statements | @swift_token_try_operator | @swift_type_annotation | @swift_where_clause @@ -992,6 +889,7 @@ swift_for_statement_child( swift_for_statement_def( unique int id: @swift_for_statement, + int collection: @swift_for_statement_collection_type ref, int item: @swift_pattern ref ); @@ -1004,7 +902,7 @@ swift_function_body_def( unique int id: @swift_function_body ); -@swift_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_function_declaration, index] swift_function_declaration_default_value( @@ -1091,7 +989,7 @@ swift_guard_statement_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_guard_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_guard_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause #keyset[swift_guard_statement, index] swift_guard_statement_condition( @@ -1140,7 +1038,7 @@ swift_if_statement_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_if_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_if_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause #keyset[swift_if_statement, index] swift_if_statement_condition( @@ -1184,27 +1082,15 @@ swift_import_declaration_def( unique int id: @swift_import_declaration ); -@swift_infix_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_infix_expression, index] -swift_infix_expression_lhs( - int swift_infix_expression: @swift_infix_expression ref, - int index: int ref, - unique int lhs: @swift_infix_expression_lhs_type ref -); - -@swift_infix_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_infix_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -#keyset[swift_infix_expression, index] -swift_infix_expression_rhs( - int swift_infix_expression: @swift_infix_expression ref, - int index: int ref, - unique int rhs: @swift_infix_expression_rhs_type ref -); +@swift_infix_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_infix_expression_def( unique int id: @swift_infix_expression, - int op: @swift_token_custom_operator ref + int lhs: @swift_infix_expression_lhs_type ref, + int op: @swift_token_custom_operator ref, + int rhs: @swift_infix_expression_rhs_type ref ); @swift_inheritance_constraint_constrained_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_identifier | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -1251,7 +1137,7 @@ swift_init_declaration_body( unique int body: @swift_function_body ref ); -@swift_init_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_init_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_init_declaration, index] swift_init_declaration_default_value( @@ -1291,12 +1177,10 @@ swift_interpolated_expression_reference_specifier( unique int reference_specifier: @swift_value_argument_label ref ); -@swift_interpolated_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_interpolated_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -#keyset[swift_interpolated_expression, index] swift_interpolated_expression_value( - int swift_interpolated_expression: @swift_interpolated_expression ref, - int index: int ref, + unique int swift_interpolated_expression: @swift_interpolated_expression ref, unique int value: @swift_interpolated_expression_value_type ref ); @@ -1322,7 +1206,7 @@ swift_key_path_expression_def( unique int id: @swift_key_path_expression ); -@swift_key_path_string_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_key_path_string_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_key_path_string_expression_child( unique int swift_key_path_string_expression: @swift_key_path_string_expression ref, @@ -1450,7 +1334,7 @@ swift_line_string_literal_def( unique int id: @swift_line_string_literal ); -@swift_macro_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_macro_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_macro_declaration, index] swift_macro_declaration_default_value( @@ -1477,17 +1361,11 @@ swift_macro_declaration_def( unique int id: @swift_macro_declaration ); -@swift_macro_definition_body_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_external_macro_definition | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_macro_definition, index] -swift_macro_definition_body( - int swift_macro_definition: @swift_macro_definition ref, - int index: int ref, - unique int body: @swift_macro_definition_body_type ref -); +@swift_macro_definition_body_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_external_macro_definition | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_macro_definition_def( - unique int id: @swift_macro_definition + unique int id: @swift_macro_definition, + int body: @swift_macro_definition_body_type ref ); @swift_macro_invocation_child_type = @swift_call_suffix | @swift_token_simple_identifier | @swift_type_parameters @@ -1552,14 +1430,7 @@ swift_multi_line_string_literal_def( unique int id: @swift_multi_line_string_literal ); -@swift_multiplicative_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_multiplicative_expression, index] -swift_multiplicative_expression_lhs( - int swift_multiplicative_expression: @swift_multiplicative_expression ref, - int index: int ref, - unique int lhs: @swift_multiplicative_expression_lhs_type ref -); +@swift_multiplicative_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_multiplicative_expression.op of 0 = @swift_multiplicative_expression_percent @@ -1568,18 +1439,13 @@ case @swift_multiplicative_expression.op of ; -@swift_multiplicative_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_multiplicative_expression, index] -swift_multiplicative_expression_rhs( - int swift_multiplicative_expression: @swift_multiplicative_expression ref, - int index: int ref, - unique int rhs: @swift_multiplicative_expression_rhs_type ref -); +@swift_multiplicative_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_multiplicative_expression_def( unique int id: @swift_multiplicative_expression, - int op: int ref + int lhs: @swift_multiplicative_expression_lhs_type ref, + int op: int ref, + int rhs: @swift_multiplicative_expression_rhs_type ref ); @swift_navigation_expression_element_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type @@ -1589,7 +1455,7 @@ swift_navigation_expression_element( unique int element: @swift_navigation_expression_element_type ref ); -@swift_navigation_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_navigation_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_navigation_expression, index] swift_navigation_expression_target( @@ -1610,26 +1476,14 @@ swift_navigation_suffix_def( int suffix: @swift_navigation_suffix_suffix_type ref ); -@swift_nil_coalescing_expression_if_nil_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_nil_coalescing_expression_if_nil_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -#keyset[swift_nil_coalescing_expression, index] -swift_nil_coalescing_expression_if_nil( - int swift_nil_coalescing_expression: @swift_nil_coalescing_expression ref, - int index: int ref, - unique int if_nil: @swift_nil_coalescing_expression_if_nil_type ref -); - -@swift_nil_coalescing_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_nil_coalescing_expression, index] -swift_nil_coalescing_expression_value( - int swift_nil_coalescing_expression: @swift_nil_coalescing_expression ref, - int index: int ref, - unique int value: @swift_nil_coalescing_expression_value_type ref -); +@swift_nil_coalescing_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_nil_coalescing_expression_def( - unique int id: @swift_nil_coalescing_expression + unique int id: @swift_nil_coalescing_expression, + int if_nil: @swift_nil_coalescing_expression_if_nil_type ref, + int value: @swift_nil_coalescing_expression_value_type ref ); @swift_opaque_type_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -1639,30 +1493,18 @@ swift_opaque_type_def( int child: @swift_opaque_type_child_type ref ); -@swift_open_end_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_open_end_range_expression, index] -swift_open_end_range_expression_start( - int swift_open_end_range_expression: @swift_open_end_range_expression ref, - int index: int ref, - unique int start: @swift_open_end_range_expression_start_type ref -); +@swift_open_end_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_open_end_range_expression_def( - unique int id: @swift_open_end_range_expression + unique int id: @swift_open_end_range_expression, + int start: @swift_open_end_range_expression_start_type ref ); -@swift_open_start_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_open_start_range_expression, index] -swift_open_start_range_expression_end( - int swift_open_start_range_expression: @swift_open_start_range_expression ref, - int index: int ref, - unique int end: @swift_open_start_range_expression_end_type ref -); +@swift_open_start_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_open_start_range_expression_def( - unique int id: @swift_open_start_range_expression + unique int id: @swift_open_start_range_expression, + int end: @swift_open_start_range_expression_end_type ref ); @swift_operator_declaration_child_type = @swift_deprecated_operator_declaration_body | @swift_token_bang | @swift_token_custom_operator | @swift_token_simple_identifier @@ -1678,6 +1520,17 @@ swift_operator_declaration_def( unique int id: @swift_operator_declaration ); +@swift_optional_chain_marker_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack + +swift_optional_chain_marker_child( + unique int swift_optional_chain_marker: @swift_optional_chain_marker ref, + unique int child: @swift_optional_chain_marker_child_type ref +); + +swift_optional_chain_marker_def( + unique int id: @swift_optional_chain_marker +); + @swift_optional_type_wrapped_type = @swift_array_type | @swift_dictionary_type | @swift_tuple_type | @swift_user_type swift_optional_type_def( @@ -1740,7 +1593,7 @@ swift_pattern_name( unique int name: @swift_pattern_name_type ref ); -@swift_pattern_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_pattern_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_pattern, index] swift_pattern_child( @@ -1753,7 +1606,7 @@ swift_pattern_def( unique int id: @swift_pattern ); -@swift_playground_literal_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_playground_literal_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_playground_literal, index] swift_playground_literal_child( @@ -1768,18 +1621,12 @@ swift_playground_literal_def( @swift_postfix_expression_operation_type = @swift_reserved_word | @swift_token_bang -@swift_postfix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_postfix_expression, index] -swift_postfix_expression_target( - int swift_postfix_expression: @swift_postfix_expression ref, - int index: int ref, - unique int target: @swift_postfix_expression_target_type ref -); +@swift_postfix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_postfix_expression_def( unique int id: @swift_postfix_expression, - int operation: @swift_postfix_expression_operation_type ref + int operation: @swift_postfix_expression_operation_type ref, + int target: @swift_postfix_expression_target_type ref ); @swift_precedence_group_attribute_child_type = @swift_token_boolean_literal | @swift_token_simple_identifier @@ -1821,18 +1668,12 @@ swift_precedence_group_declaration_def( @swift_prefix_expression_operation_type = @swift_reserved_word | @swift_token_bang | @swift_token_custom_operator -@swift_prefix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token__expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_prefix_expression, index] -swift_prefix_expression_target( - int swift_prefix_expression: @swift_prefix_expression ref, - int index: int ref, - unique int target: @swift_prefix_expression_target_type ref -); +@swift_prefix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token__expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_prefix_expression_def( unique int id: @swift_prefix_expression, - int operation: @swift_prefix_expression_operation_type ref + int operation: @swift_prefix_expression_operation_type ref, + int target: @swift_prefix_expression_target_type ref ); #keyset[swift_property_declaration, index] @@ -1849,7 +1690,7 @@ swift_property_declaration_name( unique int name: @swift_pattern ref ); -@swift_property_declaration_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_property_declaration_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_property_declaration, index] swift_property_declaration_value( @@ -1925,7 +1766,7 @@ swift_protocol_declaration_def( int name: @swift_token_type_identifier ref ); -@swift_protocol_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_protocol_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_default_value( @@ -1992,14 +1833,7 @@ swift_protocol_property_requirements_def( unique int id: @swift_protocol_property_requirements ); -@swift_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_range_expression, index] -swift_range_expression_end( - int swift_range_expression: @swift_range_expression ref, - int index: int ref, - unique int end: @swift_range_expression_end_type ref -); +@swift_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_range_expression.op of 0 = @swift_range_expression_dotdotdot @@ -2007,18 +1841,13 @@ case @swift_range_expression.op of ; -@swift_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_range_expression, index] -swift_range_expression_start( - int swift_range_expression: @swift_range_expression ref, - int index: int ref, - unique int start: @swift_range_expression_start_type ref -); +@swift_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_range_expression_def( unique int id: @swift_range_expression, - int op: int ref + int end: @swift_range_expression_end_type ref, + int op: int ref, + int start: @swift_range_expression_start_type ref ); #keyset[swift_raw_str_interpolation, index] @@ -2067,7 +1896,7 @@ swift_repeat_while_statement_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_repeat_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_repeat_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause #keyset[swift_repeat_while_statement, index] swift_repeat_while_statement_condition( @@ -2094,7 +1923,7 @@ swift_repeat_while_statement_def( unique int id: @swift_repeat_while_statement ); -@swift_selector_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_selector_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_selector_expression_child( unique int swift_selector_expression: @swift_selector_expression ref, @@ -2114,7 +1943,7 @@ swift_setter_specifier_def( unique int id: @swift_setter_specifier ); -@swift_source_file_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_import_declaration | @swift_infix_expression | @swift_init_declaration | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_shebang_line | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement +@swift_source_file_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_import_declaration | @swift_infix_expression | @swift_init_declaration | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_shebang_line | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement #keyset[swift_source_file, index] swift_source_file_child( @@ -2127,7 +1956,7 @@ swift_source_file_def( unique int id: @swift_source_file ); -@swift_statements_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_control_transfer_statement | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_property_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement +@swift_statements_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_control_transfer_statement | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_property_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement #keyset[swift_statements, index] swift_statements_child( @@ -2140,7 +1969,7 @@ swift_statements_def( unique int id: @swift_statements ); -@swift_subscript_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_subscript_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_subscript_declaration, index] swift_subscript_declaration_default_value( @@ -2183,7 +2012,7 @@ swift_suppressed_constraint_def( int suppressed: @swift_token_type_identifier ref ); -@swift_switch_entry_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_modifiers | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_statements | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_default_keyword | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_switch_entry_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_modifiers | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_statements | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_default_keyword | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_switch_entry, index] swift_switch_entry_child( @@ -2201,14 +2030,7 @@ swift_switch_pattern_def( int child: @swift_pattern ref ); -@swift_switch_statement_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_switch_statement, index] -swift_switch_statement_expr( - int swift_switch_statement: @swift_switch_statement ref, - int index: int ref, - unique int expr: @swift_switch_statement_expr_type ref -); +@swift_switch_statement_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_switch_statement, index] swift_switch_statement_child( @@ -2218,38 +2040,21 @@ swift_switch_statement_child( ); swift_switch_statement_def( - unique int id: @swift_switch_statement + unique int id: @swift_switch_statement, + int expr: @swift_switch_statement_expr_type ref ); -@swift_ternary_expression_condition_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_ternary_expression_condition_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -#keyset[swift_ternary_expression, index] -swift_ternary_expression_condition( - int swift_ternary_expression: @swift_ternary_expression ref, - int index: int ref, - unique int condition: @swift_ternary_expression_condition_type ref -); - -@swift_ternary_expression_if_false_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_ternary_expression, index] -swift_ternary_expression_if_false( - int swift_ternary_expression: @swift_ternary_expression ref, - int index: int ref, - unique int if_false: @swift_ternary_expression_if_false_type ref -); +@swift_ternary_expression_if_false_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -@swift_ternary_expression_if_true_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_ternary_expression, index] -swift_ternary_expression_if_true( - int swift_ternary_expression: @swift_ternary_expression ref, - int index: int ref, - unique int if_true: @swift_ternary_expression_if_true_type ref -); +@swift_ternary_expression_if_true_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_ternary_expression_def( - unique int id: @swift_ternary_expression + unique int id: @swift_ternary_expression, + int condition: @swift_ternary_expression_condition_type ref, + int if_false: @swift_ternary_expression_if_false_type ref, + int if_true: @swift_ternary_expression_if_true_type ref ); @swift_throws_clause_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -2259,17 +2064,11 @@ swift_throws_clause_def( int type__: @swift_throws_clause_type_type ref ); -@swift_try_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -#keyset[swift_try_expression, index] -swift_try_expression_expr( - int swift_try_expression: @swift_try_expression ref, - int index: int ref, - unique int expr: @swift_try_expression_expr_type ref -); +@swift_try_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_try_expression_def( unique int id: @swift_try_expression, + int expr: @swift_try_expression_expr_type ref, int child: @swift_token_try_operator ref ); @@ -2280,7 +2079,7 @@ swift_tuple_expression_name( unique int name: @swift_token_simple_identifier ref ); -@swift_tuple_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_tuple_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_tuple_expression, index] swift_tuple_expression_value( @@ -2528,12 +2327,10 @@ swift_value_argument_reference_specifier( unique int reference_specifier: @swift_value_argument_label ref ); -@swift_value_argument_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_value_argument_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -#keyset[swift_value_argument, index] swift_value_argument_value( - int swift_value_argument: @swift_value_argument ref, - int index: int ref, + unique int swift_value_argument: @swift_value_argument ref, unique int value: @swift_value_argument_value_type ref ); @@ -2573,7 +2370,7 @@ swift_value_binding_pattern_def( int mutability: int ref ); -@swift_value_pack_expansion_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_value_pack_expansion_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_value_pack_expansion_child( unique int swift_value_pack_expansion: @swift_value_pack_expansion ref, @@ -2584,7 +2381,7 @@ swift_value_pack_expansion_def( unique int id: @swift_value_pack_expansion ); -@swift_value_parameter_pack_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_value_parameter_pack_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_value_parameter_pack_child( unique int swift_value_parameter_pack: @swift_value_parameter_pack ref, @@ -2595,7 +2392,7 @@ swift_value_parameter_pack_def( unique int id: @swift_value_parameter_pack ); -@swift_where_clause_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_where_clause_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_where_clause, index] swift_where_clause_child( @@ -2615,7 +2412,7 @@ swift_while_statement_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause #keyset[swift_while_statement, index] swift_while_statement_condition( @@ -2725,7 +2522,7 @@ case @swift_token.kind of ; -@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_statement | @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_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_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 +@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_statement | @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_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 swift_ast_node_location( unique int node: @swift_ast_node ref, From 7854a534fdf66dda813a1b02fe5f1062dfcffe45 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 14:51:05 +0000 Subject: [PATCH 05/24] unified: stop operators bleeding through everywhere We make _referenceable_operator a named node. This prevents it from bleeding through to the _expression definition. It likely also makes the output easier to deal with, as bare operators used as arguments now have a named node wrapping them in the AST. Also removes a duplicated inclusion of _comparison_operator that served no purpose. --- .../extractor/tree-sitter-swift/grammar.js | 11 +- .../tree-sitter-swift/node-types.yml | 152 +++++++++--------- 2 files changed, 82 insertions(+), 81 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index a72253292e2d..5a2d84db3928 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -105,7 +105,7 @@ module.exports = grammar({ // `+(...)` is ambigously either "call the function produced by a reference to the operator `+`" or "use the unary // operator `+` on the result of the parenthetical expression." [$._additive_operator, $._prefix_unary_operator], - [$._referenceable_operator, $._prefix_unary_operator], + [$.referenceable_operator, $._prefix_unary_operator], // `{ [self, b, c] ...` could be a capture list or an array literal depending on what else happens. [$.capture_list_item, $._expression], [$.capture_list_item, $._expression, $._simple_user_type], @@ -906,7 +906,7 @@ module.exports = grammar({ $.super_expression, $.try_expression, $.await_expression, - $._referenceable_operator, + $.referenceable_operator, $.key_path_expression, $.key_path_string_expression, prec.right( @@ -1625,16 +1625,15 @@ module.exports = grammar({ _non_constructor_function_decl: ($) => seq( "func", - field("name", choice($.simple_identifier, $._referenceable_operator)) + field("name", choice($.simple_identifier, $.referenceable_operator)) ), - _referenceable_operator: ($) => + referenceable_operator: ($) => choice( $.custom_operator, $._comparison_operator, $._additive_operator, $._multiplicative_operator, $._equality_operator, - $._comparison_operator, $._assignment_and_operator, "++", "--", @@ -1806,7 +1805,7 @@ module.exports = grammar({ seq( choice("prefix", "infix", "postfix"), "operator", - $._referenceable_operator, + $.referenceable_operator, optional(seq(":", $.simple_identifier)), optional($.deprecated_operator_declaration_body) ), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 8d7f99ee205b..d03d57036df4 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -1,23 +1,23 @@ named: _expression: additive_expression: - lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: ["+", "-"] - rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] array_literal: - element*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + element*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] array_type: element+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] as_expression: $children: as_operator - expr: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + expr: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] as_operator: assignment: operator: ["%=", "*=", "+=", "-=", "/=", "="] - result: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + result: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] target: directly_assignable_expression associatedtype_declaration: $children*: [modifiers, type_constraints] @@ -25,21 +25,21 @@ named: must_inherit*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] attribute: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack] availability_condition: $children*: [identifier, integer_literal] await_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - expr?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + expr?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] bang: bin_literal: bitwise_operation: - lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: ["&", "<<", ">>", "^", "|"] - rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] boolean_literal: call_expression: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, call_suffix, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, call_suffix, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] call_suffix: $children+: [lambda_literal, value_arguments] name*: simple_identifier @@ -48,7 +48,7 @@ named: capture_list_item: $children?: ownership_modifier name: [self_expression, simple_identifier] - value?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] catch_block: $children+: [catch_keyword, statements, where_clause] error?: pattern @@ -56,7 +56,7 @@ named: check_expression: name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] op: "is" - target: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + target: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] class_body: $children*: [associatedtype_declaration, class_declaration, deinit_declaration, function_declaration, import_declaration, init_declaration, multiline_comment, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] @@ -67,9 +67,9 @@ named: name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] comment: comparison_expression: - lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: ["<", "<=", ">", ">="] - rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] computed_getter: $children+: [attribute, getter_specifier, statements] computed_modify: @@ -79,9 +79,9 @@ named: computed_setter: $children+: [attribute, setter_specifier, simple_identifier, statements] conjunction_expression: - lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: "&&" - rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] constructor_expression: $children: constructor_suffix constructed_type: [array_type, dictionary_type, user_type] @@ -89,8 +89,8 @@ named: $children+: [lambda_literal, value_arguments] name*: simple_identifier control_transfer_statement: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - result?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + result?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] custom_operator: default_keyword: deinit_declaration: @@ -100,8 +100,8 @@ named: $children*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] diagnostic: dictionary_literal: - key*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + key*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] dictionary_type: key+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -111,11 +111,11 @@ named: directive: $children*: [boolean_literal, integer_literal, simple_identifier] directly_assignable_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] disjunction_expression: - lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: "||" - rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] do_statement: $children*: [catch_block, statements] else: @@ -125,9 +125,9 @@ named: $children?: modifiers data_contents*: enum_type_parameters name+: simple_identifier - raw_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + raw_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] enum_type_parameters: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, value_pack_expansion, value_parameter_pack, wildcard_pattern] + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, value_pack_expansion, value_parameter_pack, wildcard_pattern] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] equality_constraint: $children*: attribute @@ -135,16 +135,16 @@ named: must_equal+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] equality_expression: - lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: ["!=", "!==", "==", "==="] - rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] existential_type: $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] external_macro_definition: $children: value_arguments for_statement: $children*: [statements, try_operator, type_annotation, where_clause] - collection: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + collection: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] item: pattern fully_open_range: function_body: @@ -152,8 +152,8 @@ named: function_declaration: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, parameter, property_behavior_modifier, throws, throws_clause, type_constraints, type_parameters] body: function_body - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - name+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", array_type, bang, custom_operator, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type, "|", "~"] + default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, referenceable_operator, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] function_modifier: function_type: @@ -166,7 +166,7 @@ named: guard_statement: $children+: [else, statements] bound_identifier*: simple_identifier - condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + condition+: ["(", ")", ",", ".", ":", "=", "?", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] hex_literal: identifier: @@ -174,14 +174,14 @@ named: if_statement: $children*: [else, if_statement, statements] bound_identifier*: simple_identifier - condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + condition+: ["(", ")", ",", ".", ":", "=", "?", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] import_declaration: $children+: [identifier, modifiers] infix_expression: - lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: custom_operator - rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] inheritance_constraint: $children*: attribute constrained_type+: [".", array_type, dictionary_type, existential_type, function_type, identifier, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -193,18 +193,18 @@ named: init_declaration: $children*: [attribute, bang, modifiers, parameter, throws, throws_clause, type_constraints, type_parameters] body?: function_body - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] name: "init" integer_literal: interpolated_expression: $children?: type_modifiers name?: value_argument_label reference_specifier*: value_argument_label - value?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] key_path_expression: $children*: [array_type, bang, dictionary_type, simple_identifier, type_arguments, type_identifier, value_argument] key_path_string_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] lambda_function_type: $children*: [lambda_function_type_parameters, throws, throws_clause] name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -226,10 +226,10 @@ named: text*: [line_str_text, str_escaped_char] macro_declaration: $children+: [array_type, attribute, dictionary_type, existential_type, function_type, metatype, modifiers, opaque_type, optional_type, parameter, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_constraints, type_pack_expansion, type_parameter_pack, type_parameters, user_type] - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] definition?: macro_definition macro_definition: - body: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, external_macro_definition, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + body: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, external_macro_definition, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] macro_invocation: $children+: [call_suffix, simple_identifier, type_parameters] member_modifier: @@ -245,30 +245,30 @@ named: text*: ["\"", multi_line_str_text, str_escaped_char] multiline_comment: multiplicative_expression: - lhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: ["%", "*", "/"] - rhs: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] mutation_modifier: navigation_expression: element?: [dictionary_type, existential_type, opaque_type] suffix: navigation_suffix - target+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, array_type, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack, "|", "~"] + target+: ["(", ")", additive_expression, array_literal, array_type, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack] navigation_suffix: suffix: [integer_literal, simple_identifier] nil_coalescing_expression: - if_nil: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - value: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + if_nil: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + value: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] oct_literal: opaque_type: $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] open_end_range_expression: - start: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + start: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] open_start_range_expression: - end: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + end: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] operator_declaration: - $children*: [bang, custom_operator, deprecated_operator_declaration_body, simple_identifier] + $children+: [deprecated_operator_declaration_body, referenceable_operator, simple_identifier] optional_chain_marker: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] optional_type: wrapped: [array_type, dictionary_type, tuple_type, user_type] ownership_modifier: @@ -281,14 +281,14 @@ named: parameter_modifiers: $children+: parameter_modifier pattern: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, pattern, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, wildcard_pattern] + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, pattern, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, wildcard_pattern] bound_identifier?: simple_identifier name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] playground_literal: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] postfix_expression: operation: ["++", "--", bang] - target: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + target: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] precedence_group_attribute: $children+: [boolean_literal, simple_identifier] precedence_group_attributes: @@ -297,13 +297,13 @@ named: $children+: [precedence_group_attributes, simple_identifier] prefix_expression: operation: ["&", "+", "++", "-", "--", ".", bang, custom_operator, "~"] - target: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", _expression, additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + target: [_expression, additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] property_behavior_modifier: property_declaration: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_annotation, type_constraints, value_binding_pattern, willset_didset_block] computed_value*: computed_property name+: pattern - value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] property_modifier: protocol_body: $children*: [associatedtype_declaration, deinit_declaration, init_declaration, protocol_function_declaration, protocol_property_declaration, subscript_declaration, typealias_declaration] @@ -317,8 +317,8 @@ named: name: type_identifier protocol_function_declaration: $children*: [attribute, modifiers, parameter, statements, throws, throws_clause, type_constraints, type_parameters] - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - name*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", array_type, bang, custom_operator, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type, "|", "~"] + default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, referenceable_operator, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] protocol_property_declaration: $children+: [modifiers, protocol_property_requirements, type_annotation, type_constraints] @@ -326,9 +326,9 @@ named: protocol_property_requirements: $children*: [getter_specifier, setter_specifier] range_expression: - end: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + end: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] op: ["...", "..<"] - start: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + start: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] raw_str_continuing_indicator: raw_str_end_part: raw_str_interpolation: @@ -341,56 +341,58 @@ named: interpolation*: raw_str_interpolation text+: [raw_str_end_part, raw_str_part] real_literal: + referenceable_operator: + $children?: [bang, custom_operator] regex_literal: repeat_while_statement: $children?: statements bound_identifier*: simple_identifier - condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + condition+: ["(", ")", ",", ".", ":", "=", "?", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] selector_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] self_expression: setter_specifier: $children?: mutation_modifier shebang_line: simple_identifier: source_file: - $children*: [additive_expression, array_literal, as_expression, assignment, associatedtype_declaration, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, import_declaration, infix_expression, init_declaration, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_declaration, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, operator_declaration, optional_chain_marker, playground_literal, postfix_expression, precedence_group_declaration, prefix_expression, property_declaration, protocol_declaration, range_expression, raw_string_literal, real_literal, regex_literal, repeat_while_statement, selector_expression, self_expression, shebang_line, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] + $children*: [additive_expression, array_literal, as_expression, assignment, associatedtype_declaration, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, import_declaration, infix_expression, init_declaration, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_declaration, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, operator_declaration, optional_chain_marker, playground_literal, postfix_expression, precedence_group_declaration, prefix_expression, property_declaration, protocol_declaration, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, repeat_while_statement, selector_expression, self_expression, shebang_line, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] special_literal: statement_label: statements: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, control_transfer_statement, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, property_declaration, range_expression, raw_string_literal, real_literal, regex_literal, repeat_while_statement, selector_expression, self_expression, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] + $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, control_transfer_statement, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, property_declaration, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, repeat_while_statement, selector_expression, self_expression, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] str_escaped_char: subscript_declaration: $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] - default_value*: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] super_expression: suppressed_constraint: suppressed: type_identifier switch_entry: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, default_keyword, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, modifiers, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, statements, super_expression, switch_pattern, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, default_keyword, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, modifiers, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, statements, super_expression, switch_pattern, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] switch_pattern: $children: pattern switch_statement: $children*: switch_entry - expr: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + expr: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] ternary_expression: - condition: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - if_false: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] - if_true: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + condition: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + if_false: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + if_true: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] throw_keyword: throws: throws_clause: type: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] try_expression: $children: try_operator - expr: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + expr: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] try_operator: tuple_expression: name*: simple_identifier - value+: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] tuple_type: $children?: tuple_type_item element*: tuple_type_item @@ -433,7 +435,7 @@ named: $children?: type_modifiers name?: value_argument_label reference_specifier*: value_argument_label - value?: ["!=", "!==", "%", "%=", "&", "*", "*=", "+", "++", "+=", "-", "--", "-=", "/", "/=", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "^", additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, "|", "~"] + value?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] value_argument_label: $children: simple_identifier value_arguments: @@ -441,17 +443,17 @@ named: value_binding_pattern: mutability: ["let", "var"] value_pack_expansion: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] value_parameter_pack: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] visibility_modifier: where_clause: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] + $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] where_keyword: while_statement: $children?: statements bound_identifier*: simple_identifier - condition+: ["!=", "!==", "%", "%=", "&", "(", ")", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", "<", "<<", "<=", "=", "==", "===", ">", ">=", ">>", "?", "^", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bang, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, custom_operator, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern, "|", "~"] + condition+: ["(", ")", ",", ".", ":", "=", "?", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] wildcard_pattern: willset_clause: From 5c16b0faf96f6d32c7d7eb7aeff011c00047da5f Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 14:51:19 +0000 Subject: [PATCH 06/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 12 ++ unified/ql/lib/unified.dbscheme | 163 ++++++++++++++------------ 2 files changed, 99 insertions(+), 76 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index 8155f61de562..e07d871de9de 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -2167,6 +2167,18 @@ module Swift { final override string getAPrimaryQlClass() { result = "RealLiteral" } } + /** A class representing `referenceable_operator` nodes. */ + class ReferenceableOperator extends @swift_referenceable_operator, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "ReferenceableOperator" } + + /** Gets the child of this node. */ + final AstNode getChild() { swift_referenceable_operator_child(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_referenceable_operator_child(this, result) } + } + /** A class representing `regex_literal` tokens. */ class RegexLiteral extends @swift_token_regex_literal, Token { /** Gets the name of the primary QL class for this element. */ diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index cfd37ea9db66..1b883f6730ec 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -132,7 +132,7 @@ overlayChangedFiles( ); /*- Swift dbscheme -*/ -@swift_additive_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_additive_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_additive_expression.op of 0 = @swift_additive_expression_plus @@ -140,7 +140,7 @@ case @swift_additive_expression.op of ; -@swift_additive_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_additive_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_additive_expression_def( unique int id: @swift_additive_expression, @@ -149,7 +149,7 @@ swift_additive_expression_def( int rhs: @swift_additive_expression_rhs_type ref ); -@swift_array_literal_element_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_array_literal_element_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_array_literal, index] swift_array_literal_element( @@ -178,7 +178,7 @@ swift_array_type_def( int name: @swift_array_type_name_type ref ); -@swift_as_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_as_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack @swift_as_expression_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -208,7 +208,7 @@ case @swift_assignment.operator of ; -@swift_assignment_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_assignment_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_assignment_def( unique int id: @swift_assignment, @@ -257,7 +257,7 @@ swift_associatedtype_declaration_def( unique int id: @swift_associatedtype_declaration ); -@swift_attribute_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_attribute_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_attribute, index] swift_attribute_child( @@ -283,14 +283,14 @@ swift_availability_condition_def( unique int id: @swift_availability_condition ); -@swift_await_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_await_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_await_expression_expr( unique int swift_await_expression: @swift_await_expression ref, unique int expr: @swift_await_expression_expr_type ref ); -@swift_await_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_await_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_await_expression_child( unique int swift_await_expression: @swift_await_expression ref, @@ -301,7 +301,7 @@ swift_await_expression_def( unique int id: @swift_await_expression ); -@swift_bitwise_operation_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_bitwise_operation_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_bitwise_operation.op of 0 = @swift_bitwise_operation_ampersand @@ -312,7 +312,7 @@ case @swift_bitwise_operation.op of ; -@swift_bitwise_operation_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_bitwise_operation_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_bitwise_operation_def( unique int id: @swift_bitwise_operation, @@ -321,7 +321,7 @@ swift_bitwise_operation_def( int rhs: @swift_bitwise_operation_rhs_type ref ); -@swift_call_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_call_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_call_expression, index] swift_call_expression_child( @@ -367,7 +367,7 @@ swift_capture_list_def( @swift_capture_list_item_name_type = @swift_token_self_expression | @swift_token_simple_identifier -@swift_capture_list_item_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_capture_list_item_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_capture_list_item_value( unique int swift_capture_list_item: @swift_capture_list_item ref, @@ -409,7 +409,7 @@ case @swift_check_expression.op of ; -@swift_check_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_check_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack @swift_check_expression_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -469,7 +469,7 @@ swift_class_declaration_def( int name: @swift_class_declaration_name_type ref ); -@swift_comparison_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_comparison_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_comparison_expression.op of 0 = @swift_comparison_expression_langle @@ -479,7 +479,7 @@ case @swift_comparison_expression.op of ; -@swift_comparison_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_comparison_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_comparison_expression_def( unique int id: @swift_comparison_expression, @@ -540,14 +540,14 @@ swift_computed_setter_def( unique int id: @swift_computed_setter ); -@swift_conjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_conjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_conjunction_expression.op of 0 = @swift_conjunction_expression_ampersandampersand ; -@swift_conjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_conjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_conjunction_expression_def( unique int id: @swift_conjunction_expression, @@ -584,14 +584,14 @@ swift_constructor_suffix_def( unique int id: @swift_constructor_suffix ); -@swift_control_transfer_statement_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_control_transfer_statement_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_control_transfer_statement_result( unique int swift_control_transfer_statement: @swift_control_transfer_statement ref, unique int result: @swift_control_transfer_statement_result_type ref ); -@swift_control_transfer_statement_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_control_transfer_statement_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_control_transfer_statement, index] swift_control_transfer_statement_child( @@ -627,7 +627,7 @@ swift_deprecated_operator_declaration_body_def( unique int id: @swift_deprecated_operator_declaration_body ); -@swift_dictionary_literal_key_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_dictionary_literal_key_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_dictionary_literal, index] swift_dictionary_literal_key( @@ -636,7 +636,7 @@ swift_dictionary_literal_key( unique int key__: @swift_dictionary_literal_key_type ref ); -@swift_dictionary_literal_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_dictionary_literal_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_dictionary_literal, index] swift_dictionary_literal_value( @@ -706,7 +706,7 @@ swift_directive_def( unique int id: @swift_directive ); -@swift_directly_assignable_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_directly_assignable_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_directly_assignable_expression_child( unique int swift_directly_assignable_expression: @swift_directly_assignable_expression ref, @@ -717,14 +717,14 @@ swift_directly_assignable_expression_def( unique int id: @swift_directly_assignable_expression ); -@swift_disjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_disjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_disjunction_expression.op of 0 = @swift_disjunction_expression_pipepipe ; -@swift_disjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_disjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_disjunction_expression_def( unique int id: @swift_disjunction_expression, @@ -773,7 +773,7 @@ swift_enum_entry_name( unique int name: @swift_token_simple_identifier ref ); -@swift_enum_entry_raw_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_enum_entry_raw_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_enum_entry, index] swift_enum_entry_raw_value( @@ -800,7 +800,7 @@ swift_enum_type_parameters_name( unique int name: @swift_enum_type_parameters_name_type ref ); -@swift_enum_type_parameters_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_enum_type_parameters_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_enum_type_parameters, index] swift_enum_type_parameters_child( @@ -845,7 +845,7 @@ swift_equality_constraint_def( int name: @swift_equality_constraint_name_type ref ); -@swift_equality_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_equality_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_equality_expression.op of 0 = @swift_equality_expression_bangequal @@ -855,7 +855,7 @@ case @swift_equality_expression.op of ; -@swift_equality_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_equality_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_equality_expression_def( unique int id: @swift_equality_expression, @@ -876,7 +876,7 @@ swift_external_macro_definition_def( int child: @swift_value_arguments ref ); -@swift_for_statement_collection_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_for_statement_collection_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack @swift_for_statement_child_type = @swift_statements | @swift_token_try_operator | @swift_type_annotation | @swift_where_clause @@ -902,7 +902,7 @@ swift_function_body_def( unique int id: @swift_function_body ); -@swift_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_function_declaration, index] swift_function_declaration_default_value( @@ -911,7 +911,7 @@ swift_function_declaration_default_value( unique int default_value: @swift_function_declaration_default_value_type ref ); -@swift_function_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_token_bang | @swift_token_custom_operator | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_function_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_referenceable_operator | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type #keyset[swift_function_declaration, index] swift_function_declaration_name( @@ -989,7 +989,7 @@ swift_guard_statement_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_guard_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_guard_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause #keyset[swift_guard_statement, index] swift_guard_statement_condition( @@ -1038,7 +1038,7 @@ swift_if_statement_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_if_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_if_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause #keyset[swift_if_statement, index] swift_if_statement_condition( @@ -1082,9 +1082,9 @@ swift_import_declaration_def( unique int id: @swift_import_declaration ); -@swift_infix_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_infix_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -@swift_infix_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_infix_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_infix_expression_def( unique int id: @swift_infix_expression, @@ -1137,7 +1137,7 @@ swift_init_declaration_body( unique int body: @swift_function_body ref ); -@swift_init_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_init_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_init_declaration, index] swift_init_declaration_default_value( @@ -1177,7 +1177,7 @@ swift_interpolated_expression_reference_specifier( unique int reference_specifier: @swift_value_argument_label ref ); -@swift_interpolated_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_interpolated_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_interpolated_expression_value( unique int swift_interpolated_expression: @swift_interpolated_expression ref, @@ -1206,7 +1206,7 @@ swift_key_path_expression_def( unique int id: @swift_key_path_expression ); -@swift_key_path_string_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_key_path_string_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_key_path_string_expression_child( unique int swift_key_path_string_expression: @swift_key_path_string_expression ref, @@ -1334,7 +1334,7 @@ swift_line_string_literal_def( unique int id: @swift_line_string_literal ); -@swift_macro_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_macro_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_macro_declaration, index] swift_macro_declaration_default_value( @@ -1361,7 +1361,7 @@ swift_macro_declaration_def( unique int id: @swift_macro_declaration ); -@swift_macro_definition_body_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_external_macro_definition | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_macro_definition_body_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_external_macro_definition | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_macro_definition_def( unique int id: @swift_macro_definition, @@ -1430,7 +1430,7 @@ swift_multi_line_string_literal_def( unique int id: @swift_multi_line_string_literal ); -@swift_multiplicative_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_multiplicative_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_multiplicative_expression.op of 0 = @swift_multiplicative_expression_percent @@ -1439,7 +1439,7 @@ case @swift_multiplicative_expression.op of ; -@swift_multiplicative_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_multiplicative_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_multiplicative_expression_def( unique int id: @swift_multiplicative_expression, @@ -1455,7 +1455,7 @@ swift_navigation_expression_element( unique int element: @swift_navigation_expression_element_type ref ); -@swift_navigation_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_navigation_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_navigation_expression, index] swift_navigation_expression_target( @@ -1476,9 +1476,9 @@ swift_navigation_suffix_def( int suffix: @swift_navigation_suffix_suffix_type ref ); -@swift_nil_coalescing_expression_if_nil_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_nil_coalescing_expression_if_nil_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -@swift_nil_coalescing_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_nil_coalescing_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_nil_coalescing_expression_def( unique int id: @swift_nil_coalescing_expression, @@ -1493,21 +1493,21 @@ swift_opaque_type_def( int child: @swift_opaque_type_child_type ref ); -@swift_open_end_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_open_end_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_open_end_range_expression_def( unique int id: @swift_open_end_range_expression, int start: @swift_open_end_range_expression_start_type ref ); -@swift_open_start_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_open_start_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_open_start_range_expression_def( unique int id: @swift_open_start_range_expression, int end: @swift_open_start_range_expression_end_type ref ); -@swift_operator_declaration_child_type = @swift_deprecated_operator_declaration_body | @swift_token_bang | @swift_token_custom_operator | @swift_token_simple_identifier +@swift_operator_declaration_child_type = @swift_deprecated_operator_declaration_body | @swift_referenceable_operator | @swift_token_simple_identifier #keyset[swift_operator_declaration, index] swift_operator_declaration_child( @@ -1520,7 +1520,7 @@ swift_operator_declaration_def( unique int id: @swift_operator_declaration ); -@swift_optional_chain_marker_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_optional_chain_marker_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_optional_chain_marker_child( unique int swift_optional_chain_marker: @swift_optional_chain_marker ref, @@ -1593,7 +1593,7 @@ swift_pattern_name( unique int name: @swift_pattern_name_type ref ); -@swift_pattern_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_pattern_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_pattern, index] swift_pattern_child( @@ -1606,7 +1606,7 @@ swift_pattern_def( unique int id: @swift_pattern ); -@swift_playground_literal_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_playground_literal_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_playground_literal, index] swift_playground_literal_child( @@ -1621,7 +1621,7 @@ swift_playground_literal_def( @swift_postfix_expression_operation_type = @swift_reserved_word | @swift_token_bang -@swift_postfix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_postfix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_postfix_expression_def( unique int id: @swift_postfix_expression, @@ -1668,7 +1668,7 @@ swift_precedence_group_declaration_def( @swift_prefix_expression_operation_type = @swift_reserved_word | @swift_token_bang | @swift_token_custom_operator -@swift_prefix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token__expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_prefix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token__expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_prefix_expression_def( unique int id: @swift_prefix_expression, @@ -1690,7 +1690,7 @@ swift_property_declaration_name( unique int name: @swift_pattern ref ); -@swift_property_declaration_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_property_declaration_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_property_declaration, index] swift_property_declaration_value( @@ -1766,7 +1766,7 @@ swift_protocol_declaration_def( int name: @swift_token_type_identifier ref ); -@swift_protocol_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_protocol_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_default_value( @@ -1775,7 +1775,7 @@ swift_protocol_function_declaration_default_value( unique int default_value: @swift_protocol_function_declaration_default_value_type ref ); -@swift_protocol_function_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_token_bang | @swift_token_custom_operator | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_protocol_function_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_referenceable_operator | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type #keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_name( @@ -1833,7 +1833,7 @@ swift_protocol_property_requirements_def( unique int id: @swift_protocol_property_requirements ); -@swift_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack case @swift_range_expression.op of 0 = @swift_range_expression_dotdotdot @@ -1841,7 +1841,7 @@ case @swift_range_expression.op of ; -@swift_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_range_expression_def( unique int id: @swift_range_expression, @@ -1889,6 +1889,17 @@ swift_raw_string_literal_def( unique int id: @swift_raw_string_literal ); +@swift_referenceable_operator_child_type = @swift_token_bang | @swift_token_custom_operator + +swift_referenceable_operator_child( + unique int swift_referenceable_operator: @swift_referenceable_operator ref, + unique int child: @swift_referenceable_operator_child_type ref +); + +swift_referenceable_operator_def( + unique int id: @swift_referenceable_operator +); + #keyset[swift_repeat_while_statement, index] swift_repeat_while_statement_bound_identifier( int swift_repeat_while_statement: @swift_repeat_while_statement ref, @@ -1896,7 +1907,7 @@ swift_repeat_while_statement_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_repeat_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_repeat_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause #keyset[swift_repeat_while_statement, index] swift_repeat_while_statement_condition( @@ -1923,7 +1934,7 @@ swift_repeat_while_statement_def( unique int id: @swift_repeat_while_statement ); -@swift_selector_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_selector_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_selector_expression_child( unique int swift_selector_expression: @swift_selector_expression ref, @@ -1943,7 +1954,7 @@ swift_setter_specifier_def( unique int id: @swift_setter_specifier ); -@swift_source_file_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_import_declaration | @swift_infix_expression | @swift_init_declaration | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_shebang_line | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement +@swift_source_file_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_import_declaration | @swift_infix_expression | @swift_init_declaration | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_shebang_line | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement #keyset[swift_source_file, index] swift_source_file_child( @@ -1956,7 +1967,7 @@ swift_source_file_def( unique int id: @swift_source_file ); -@swift_statements_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_control_transfer_statement | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_property_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement +@swift_statements_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_control_transfer_statement | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_property_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement #keyset[swift_statements, index] swift_statements_child( @@ -1969,7 +1980,7 @@ swift_statements_def( unique int id: @swift_statements ); -@swift_subscript_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_subscript_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_subscript_declaration, index] swift_subscript_declaration_default_value( @@ -2012,7 +2023,7 @@ swift_suppressed_constraint_def( int suppressed: @swift_token_type_identifier ref ); -@swift_switch_entry_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_modifiers | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_statements | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_default_keyword | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_switch_entry_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_modifiers | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_statements | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_default_keyword | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_switch_entry, index] swift_switch_entry_child( @@ -2030,7 +2041,7 @@ swift_switch_pattern_def( int child: @swift_pattern ref ); -@swift_switch_statement_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_switch_statement_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_switch_statement, index] swift_switch_statement_child( @@ -2044,11 +2055,11 @@ swift_switch_statement_def( int expr: @swift_switch_statement_expr_type ref ); -@swift_ternary_expression_condition_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_ternary_expression_condition_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -@swift_ternary_expression_if_false_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_ternary_expression_if_false_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack -@swift_ternary_expression_if_true_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_ternary_expression_if_true_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_ternary_expression_def( unique int id: @swift_ternary_expression, @@ -2064,7 +2075,7 @@ swift_throws_clause_def( int type__: @swift_throws_clause_type_type ref ); -@swift_try_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_try_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_try_expression_def( unique int id: @swift_try_expression, @@ -2079,7 +2090,7 @@ swift_tuple_expression_name( unique int name: @swift_token_simple_identifier ref ); -@swift_tuple_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_tuple_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_tuple_expression, index] swift_tuple_expression_value( @@ -2327,7 +2338,7 @@ swift_value_argument_reference_specifier( unique int reference_specifier: @swift_value_argument_label ref ); -@swift_value_argument_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_value_argument_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_value_argument_value( unique int swift_value_argument: @swift_value_argument ref, @@ -2370,7 +2381,7 @@ swift_value_binding_pattern_def( int mutability: int ref ); -@swift_value_pack_expansion_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_value_pack_expansion_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_value_pack_expansion_child( unique int swift_value_pack_expansion: @swift_value_pack_expansion ref, @@ -2381,7 +2392,7 @@ swift_value_pack_expansion_def( unique int id: @swift_value_pack_expansion ); -@swift_value_parameter_pack_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_value_parameter_pack_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack swift_value_parameter_pack_child( unique int swift_value_parameter_pack: @swift_value_parameter_pack ref, @@ -2392,7 +2403,7 @@ swift_value_parameter_pack_def( unique int id: @swift_value_parameter_pack ); -@swift_where_clause_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_where_clause_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack #keyset[swift_where_clause, index] swift_where_clause_child( @@ -2412,7 +2423,7 @@ swift_while_statement_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bang | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_custom_operator | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause #keyset[swift_while_statement, index] swift_while_statement_condition( @@ -2522,7 +2533,7 @@ case @swift_token.kind of ; -@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_statement | @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_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 +@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_statement | @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 swift_ast_node_location( unique int node: @swift_ast_node ref, From c0efc52cc768c4ea302c1d79a4e6869afbf3b6d5 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:01:05 +0000 Subject: [PATCH 07/24] unified: make if-condition nodes named, to stop bleed Before, the `condition` field of an if statement supposedly could contain things like parentheses and commas, due to bleeding from referenced anonymous nodes. Making the node named makes this issue go away. --- .../extractor/tree-sitter-swift/grammar.js | 10 +++++----- .../tree-sitter-swift/node-types.yml | 20 ++++++++----------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 5a2d84db3928..4442ae585a24 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1035,12 +1035,12 @@ module.exports = grammar({ PRECS["if"], seq( "if", - sep1(field("condition", $._if_condition_sequence_item), ","), + sep1(field("condition", $.if_condition), ","), $._block, optional(seq($["else"], $._else_options)) ) ), - _if_condition_sequence_item: ($) => + if_condition: ($) => choice($._if_let_binding, $._expression, $.availability_condition), _if_let_binding: ($) => seq( @@ -1053,7 +1053,7 @@ module.exports = grammar({ PRECS["if"], seq( "guard", - sep1(field("condition", $._if_condition_sequence_item), ","), + sep1(field("condition", $.if_condition), ","), $["else"], $._block ) @@ -1237,7 +1237,7 @@ module.exports = grammar({ PRECS.loop, seq( "while", - sep1(field("condition", $._if_condition_sequence_item), ","), + sep1(field("condition", $.if_condition), ","), "{", optional($.statements), "}" @@ -1254,7 +1254,7 @@ module.exports = grammar({ // Make sure we make it to the `while` before assuming this is a parameter pack. repeat($._implicit_semi), "while", - sep1(field("condition", $._if_condition_sequence_item), ",") + sep1(field("condition", $.if_condition), ",") ) ), control_transfer_statement: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index d03d57036df4..8638a9368d94 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -165,17 +165,17 @@ named: $children*: [mutation_modifier, throws, throws_clause] guard_statement: $children+: [else, statements] - bound_identifier*: simple_identifier - condition+: ["(", ")", ",", ".", ":", "=", "?", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] - name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + condition+: if_condition hex_literal: identifier: $children+: simple_identifier + if_condition: + $children*: [additive_expression, array_literal, as_expression, assignment, availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, pattern, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_annotation, type_modifiers, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] + bound_identifier?: simple_identifier + name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] if_statement: $children*: [else, if_statement, statements] - bound_identifier*: simple_identifier - condition+: ["(", ")", ",", ".", ":", "=", "?", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] - name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + condition+: if_condition import_declaration: $children+: [identifier, modifiers] infix_expression: @@ -346,9 +346,7 @@ named: regex_literal: repeat_while_statement: $children?: statements - bound_identifier*: simple_identifier - condition+: ["(", ")", ",", ".", ":", "=", "?", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] - name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + condition+: if_condition selector_expression: $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] self_expression: @@ -452,9 +450,7 @@ named: where_keyword: while_statement: $children?: statements - bound_identifier*: simple_identifier - condition+: ["(", ")", ",", ".", ":", "=", "?", additive_expression, array_literal, array_type, "as", as_expression, assignment, "async", availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, "case", check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, function_type, hex_literal, if_statement, infix_expression, integer_literal, "is", key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, metatype, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, optional_type, pattern, playground_literal, postfix_expression, prefix_expression, protocol_composition_type, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, suppressed_constraint, switch_statement, ternary_expression, try_expression, tuple_expression, tuple_type, type_annotation, type_modifiers, type_pack_expansion, type_parameter_pack, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] - name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + condition+: if_condition wildcard_pattern: willset_clause: $children*: [modifiers, simple_identifier, statements] From c7c6e45254bbcf04579ca327ba5a03b8fb1b0215 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:01:15 +0000 Subject: [PATCH 08/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 80 +++++++++-------------- unified/ql/lib/unified.dbscheme | 93 +++++++-------------------- 2 files changed, 55 insertions(+), 118 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index e07d871de9de..cbf7dad7b38f 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -1103,25 +1103,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "GuardStatement" } - /** Gets the node corresponding to the field `bound_identifier`. */ - final SimpleIdentifier getBoundIdentifier(int i) { - swift_guard_statement_bound_identifier(this, i, result) - } - /** Gets the node corresponding to the field `condition`. */ - final AstNode getCondition(int i) { swift_guard_statement_condition(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_guard_statement_name(this, i, result) } + final IfCondition getCondition(int i) { swift_guard_statement_condition(this, i, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_guard_statement_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_guard_statement_bound_identifier(this, _, result) or swift_guard_statement_condition(this, _, result) or - swift_guard_statement_name(this, _, result) or swift_guard_statement_child(this, _, result) } } @@ -1144,31 +1134,44 @@ module Swift { final override AstNode getAFieldOrChild() { swift_identifier_child(this, _, result) } } - /** A class representing `if_statement` nodes. */ - class IfStatement extends @swift_if_statement, AstNode { + /** A class representing `if_condition` nodes. */ + class IfCondition extends @swift_if_condition, AstNode { /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "IfStatement" } + final override string getAPrimaryQlClass() { result = "IfCondition" } /** Gets the node corresponding to the field `bound_identifier`. */ - final SimpleIdentifier getBoundIdentifier(int i) { - swift_if_statement_bound_identifier(this, i, result) + final SimpleIdentifier getBoundIdentifier() { + swift_if_condition_bound_identifier(this, result) } - /** Gets the node corresponding to the field `condition`. */ - final AstNode getCondition(int i) { swift_if_statement_condition(this, i, result) } - /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_if_statement_name(this, i, result) } + final AstNode getName() { swift_if_condition_name(this, result) } + + /** Gets the `i`th child of this node. */ + final AstNode getChild(int i) { swift_if_condition_child(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_if_condition_bound_identifier(this, result) or + swift_if_condition_name(this, result) or + swift_if_condition_child(this, _, result) + } + } + + /** A class representing `if_statement` nodes. */ + class IfStatement extends @swift_if_statement, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "IfStatement" } + + /** Gets the node corresponding to the field `condition`. */ + final IfCondition getCondition(int i) { swift_if_statement_condition(this, i, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_if_statement_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_if_statement_bound_identifier(this, _, result) or - swift_if_statement_condition(this, _, result) or - swift_if_statement_name(this, _, result) or - swift_if_statement_child(this, _, result) + swift_if_statement_condition(this, _, result) or swift_if_statement_child(this, _, result) } } @@ -2190,25 +2193,17 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "RepeatWhileStatement" } - /** Gets the node corresponding to the field `bound_identifier`. */ - final SimpleIdentifier getBoundIdentifier(int i) { - swift_repeat_while_statement_bound_identifier(this, i, result) - } - /** Gets the node corresponding to the field `condition`. */ - final AstNode getCondition(int i) { swift_repeat_while_statement_condition(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_repeat_while_statement_name(this, i, result) } + final IfCondition getCondition(int i) { + swift_repeat_while_statement_condition(this, i, result) + } /** Gets the child of this node. */ final Statements getChild() { swift_repeat_while_statement_child(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_repeat_while_statement_bound_identifier(this, _, result) or swift_repeat_while_statement_condition(this, _, result) or - swift_repeat_while_statement_name(this, _, result) or swift_repeat_while_statement_child(this, result) } } @@ -2813,26 +2808,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "WhileStatement" } - /** Gets the node corresponding to the field `bound_identifier`. */ - final SimpleIdentifier getBoundIdentifier(int i) { - swift_while_statement_bound_identifier(this, i, result) - } - /** Gets the node corresponding to the field `condition`. */ - final AstNode getCondition(int i) { swift_while_statement_condition(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_while_statement_name(this, i, result) } + final IfCondition getCondition(int i) { swift_while_statement_condition(this, i, result) } /** Gets the child of this node. */ final Statements getChild() { swift_while_statement_child(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_while_statement_bound_identifier(this, _, result) or - swift_while_statement_condition(this, _, result) or - swift_while_statement_name(this, _, result) or - swift_while_statement_child(this, result) + swift_while_statement_condition(this, _, result) or swift_while_statement_child(this, result) } } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 1b883f6730ec..ecd726d46311 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -982,29 +982,11 @@ swift_getter_specifier_def( unique int id: @swift_getter_specifier ); -#keyset[swift_guard_statement, index] -swift_guard_statement_bound_identifier( - int swift_guard_statement: @swift_guard_statement ref, - int index: int ref, - unique int bound_identifier: @swift_token_simple_identifier ref -); - -@swift_guard_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause - #keyset[swift_guard_statement, index] swift_guard_statement_condition( int swift_guard_statement: @swift_guard_statement ref, int index: int ref, - unique int condition: @swift_guard_statement_condition_type ref -); - -@swift_guard_statement_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - -#keyset[swift_guard_statement, index] -swift_guard_statement_name( - int swift_guard_statement: @swift_guard_statement ref, - int index: int ref, - unique int name: @swift_guard_statement_name_type ref + unique int condition: @swift_if_condition ref ); @swift_guard_statement_child_type = @swift_statements | @swift_token_else @@ -1031,29 +1013,36 @@ swift_identifier_def( unique int id: @swift_identifier ); -#keyset[swift_if_statement, index] -swift_if_statement_bound_identifier( - int swift_if_statement: @swift_if_statement ref, - int index: int ref, +swift_if_condition_bound_identifier( + unique int swift_if_condition: @swift_if_condition ref, unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_if_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_if_condition_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type -#keyset[swift_if_statement, index] -swift_if_statement_condition( - int swift_if_statement: @swift_if_statement ref, +swift_if_condition_name( + unique int swift_if_condition: @swift_if_condition ref, + unique int name: @swift_if_condition_name_type ref +); + +@swift_if_condition_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_annotation | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause + +#keyset[swift_if_condition, index] +swift_if_condition_child( + int swift_if_condition: @swift_if_condition ref, int index: int ref, - unique int condition: @swift_if_statement_condition_type ref + unique int child: @swift_if_condition_child_type ref ); -@swift_if_statement_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +swift_if_condition_def( + unique int id: @swift_if_condition +); #keyset[swift_if_statement, index] -swift_if_statement_name( +swift_if_statement_condition( int swift_if_statement: @swift_if_statement ref, int index: int ref, - unique int name: @swift_if_statement_name_type ref + unique int condition: @swift_if_condition ref ); @swift_if_statement_child_type = @swift_if_statement | @swift_statements | @swift_token_else @@ -1900,29 +1889,11 @@ swift_referenceable_operator_def( unique int id: @swift_referenceable_operator ); -#keyset[swift_repeat_while_statement, index] -swift_repeat_while_statement_bound_identifier( - int swift_repeat_while_statement: @swift_repeat_while_statement ref, - int index: int ref, - unique int bound_identifier: @swift_token_simple_identifier ref -); - -@swift_repeat_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause - #keyset[swift_repeat_while_statement, index] swift_repeat_while_statement_condition( int swift_repeat_while_statement: @swift_repeat_while_statement ref, int index: int ref, - unique int condition: @swift_repeat_while_statement_condition_type ref -); - -@swift_repeat_while_statement_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - -#keyset[swift_repeat_while_statement, index] -swift_repeat_while_statement_name( - int swift_repeat_while_statement: @swift_repeat_while_statement ref, - int index: int ref, - unique int name: @swift_repeat_while_statement_name_type ref + unique int condition: @swift_if_condition ref ); swift_repeat_while_statement_child( @@ -2416,29 +2387,11 @@ swift_where_clause_def( unique int id: @swift_where_clause ); -#keyset[swift_while_statement, index] -swift_while_statement_bound_identifier( - int swift_while_statement: @swift_while_statement ref, - int index: int ref, - unique int bound_identifier: @swift_token_simple_identifier ref -); - -@swift_while_statement_condition_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_function_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_metatype | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_optional_type | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_protocol_composition_type | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_suppressed_constraint | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_tuple_type | @swift_type_annotation | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause - #keyset[swift_while_statement, index] swift_while_statement_condition( int swift_while_statement: @swift_while_statement ref, int index: int ref, - unique int condition: @swift_while_statement_condition_type ref -); - -@swift_while_statement_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - -#keyset[swift_while_statement, index] -swift_while_statement_name( - int swift_while_statement: @swift_while_statement ref, - int index: int ref, - unique int name: @swift_while_statement_name_type ref + unique int condition: @swift_if_condition ref ); swift_while_statement_child( @@ -2533,7 +2486,7 @@ case @swift_token.kind of ; -@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_statement | @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 +@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_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 swift_ast_node_location( unique int node: @swift_ast_node ref, From 38473f9e0b972df283838a2b1dc926027eeec666 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:17:49 +0000 Subject: [PATCH 09/24] unified: make `expression` named and a supertype Supertypes are a honking great idea. We should use more of them. This massively cleans up the node types, without polluting the AST with `expression` nodes. --- .../extractor/tree-sitter-swift/grammar.js | 137 ++++++------ .../tree-sitter-swift/node-types.yml | 198 +++++++++++------- 2 files changed, 197 insertions(+), 138 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 4442ae585a24..7fa16335ade6 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -84,18 +84,19 @@ if (tree_sitter_version_supports_emoji()) { module.exports = grammar({ name: "swift", + supertypes: ($) => [$.expression], conflicts: ($) => [ // @Type(... could either be an annotation constructor invocation or an annotated expression [$.attribute], [$._attribute_argument], // Is `foo { ... }` a constructor invocation or function invocation? - [$._simple_user_type, $._expression], + [$._simple_user_type, $.expression], // To support nested types A.B not being interpreted as `(navigation_expression ... (type_identifier)) (navigation_suffix)` [$.user_type], // How to tell the difference between Foo.bar(with:and:), and Foo.bar(with: smth, and: other)? You need GLR [$.value_argument], // { (foo, bar) ... - [$._expression, $.lambda_parameter], + [$.expression, $.lambda_parameter], [$._primary_expression, $.lambda_parameter], // (start: start, end: end) [$._tuple_type_item_identifier, $.tuple_expression], @@ -107,8 +108,8 @@ module.exports = grammar({ [$._additive_operator, $._prefix_unary_operator], [$.referenceable_operator, $._prefix_unary_operator], // `{ [self, b, c] ...` could be a capture list or an array literal depending on what else happens. - [$.capture_list_item, $._expression], - [$.capture_list_item, $._expression, $._simple_user_type], + [$.capture_list_item, $.expression], + [$.capture_list_item, $.expression, $._simple_user_type], [$._primary_expression, $.capture_list_item], // a ? b : c () could be calling c(), or it could be calling a function that's produced by the result of // `(a ? b : c)`. We have a small hack to force it to be the former of these by intentionally introducing a @@ -119,10 +120,10 @@ module.exports = grammar({ // `if try foo { } ...` should award its braces to the `if`. In order to make this actually happen, we need to parse // all the options and pick the best one that doesn't error out. [$.try_expression, $._unary_expression], - [$.try_expression, $._expression], + [$.try_expression, $.expression], // await {expression} has the same special cases as `try`. [$.await_expression, $._unary_expression], - [$.await_expression, $._expression], + [$.await_expression, $.expression], // In a computed property, when you see an @attribute, it's not yet clear if that's going to be for a // locally-declared class or a getter / setter specifier. [ @@ -507,7 +508,7 @@ module.exports = grammar({ //////////////////////////////// // Expressions - https://docs.swift.org/swift-book/ReferenceManual/Expressions.html //////////////////////////////// - _expression: ($) => + expression: ($) => prec( PRECS.expr, choice( @@ -525,7 +526,7 @@ module.exports = grammar({ ) ), optional_chain_marker: ($) => - seq($._expression, alias($._immediate_quest, "?")), + seq($.expression, alias($._immediate_quest, "?")), // Unary expressions _unary_expression: ($) => choice( @@ -546,7 +547,7 @@ module.exports = grammar({ prec.left( PRECS.postfix_operations, seq( - field("target", $._expression), + field("target", $.expression), field("operation", $._postfix_unary_operator) ) ), @@ -578,7 +579,7 @@ module.exports = grammar({ "target", choice( $._navigable_type_expression, - $._expression, + $.expression, $._parenthesized_type ) ), @@ -592,7 +593,7 @@ module.exports = grammar({ PRECS.range, seq( $._range_operator, - prec.right(PRECS.range_suffix, field("end", $._expression)) + prec.right(PRECS.range_suffix, field("end", $.expression)) ) ), _range_operator: ($) => @@ -600,7 +601,7 @@ module.exports = grammar({ open_end_range_expression: ($) => prec.right( PRECS.range, - seq(field("start", $._expression), $._three_dot_operator) + seq(field("start", $.expression), $._three_dot_operator) ), prefix_expression: ($) => prec.left( @@ -610,8 +611,8 @@ module.exports = grammar({ field( "target", choice( - $._expression, - alias(choice("async", "if", "switch"), $._expression) + $.expression, + alias(choice("async", "if", "switch"), $.expression) ) ) ) @@ -619,7 +620,7 @@ module.exports = grammar({ as_expression: ($) => prec.left( PRECS.as, - seq(field("expr", $._expression), $.as_operator, field("type", $._type)) + seq(field("expr", $.expression), $.as_operator, field("type", $._type)) ), selector_expression: ($) => seq( @@ -627,7 +628,7 @@ module.exports = grammar({ "selector", "(", optional(choice("getter:", "setter:")), - $._expression, + $.expression, ")" ), // Binary expressions @@ -649,25 +650,25 @@ module.exports = grammar({ prec.left( PRECS.multiplication, seq( - field("lhs", $._expression), + field("lhs", $.expression), field("op", $._multiplicative_operator), - field("rhs", $._expression) + field("rhs", $.expression) ) ), additive_expression: ($) => prec.left( PRECS.addition, seq( - field("lhs", $._expression), + field("lhs", $.expression), field("op", $._additive_operator), - field("rhs", $._expression) + field("rhs", $.expression) ) ), range_expression: ($) => prec.right( PRECS.range, seq( - field("start", $._expression), + field("start", $.expression), field("op", $._range_operator), field("end", $._expr_hack_at_ternary_binary_suffix) ) @@ -676,7 +677,7 @@ module.exports = grammar({ prec.left( PRECS.infix_operations, seq( - field("lhs", $._expression), + field("lhs", $.expression), field("op", $.custom_operator), field("rhs", $._expr_hack_at_ternary_binary_suffix) ) @@ -685,7 +686,7 @@ module.exports = grammar({ prec.right( PRECS.nil_coalescing, seq( - field("value", $._expression), + field("value", $.expression), $._nil_coalescing_operator, field("if_nil", $._expr_hack_at_ternary_binary_suffix) ) @@ -694,7 +695,7 @@ module.exports = grammar({ prec.left( PRECS.check, seq( - field("target", $._expression), + field("target", $.expression), field("op", $._is_operator), field("type", $._type) ) @@ -702,7 +703,7 @@ module.exports = grammar({ comparison_expression: ($) => prec.left( seq( - field("lhs", $._expression), + field("lhs", $.expression), field("op", $._comparison_operator), field("rhs", $._expr_hack_at_ternary_binary_suffix) ) @@ -711,7 +712,7 @@ module.exports = grammar({ prec.left( PRECS.equality, seq( - field("lhs", $._expression), + field("lhs", $.expression), field("op", $._equality_operator), field("rhs", $._expr_hack_at_ternary_binary_suffix) ) @@ -720,7 +721,7 @@ module.exports = grammar({ prec.left( PRECS.conjunction, seq( - field("lhs", $._expression), + field("lhs", $.expression), field("op", $._conjunction_operator), field("rhs", $._expr_hack_at_ternary_binary_suffix) ) @@ -729,7 +730,7 @@ module.exports = grammar({ prec.left( PRECS.disjunction, seq( - field("lhs", $._expression), + field("lhs", $.expression), field("op", $._disjunction_operator), field("rhs", $._expr_hack_at_ternary_binary_suffix) ) @@ -737,7 +738,7 @@ module.exports = grammar({ bitwise_operation: ($) => prec.left( seq( - field("lhs", $._expression), + field("lhs", $.expression), field("op", $._bitwise_binary_operator), field("rhs", $._expr_hack_at_ternary_binary_suffix) ) @@ -802,7 +803,7 @@ module.exports = grammar({ ), seq( optional(seq(field("name", $.value_argument_label), ":")), - field("value", $._expression) + field("value", $.expression) ) ) ) @@ -818,7 +819,7 @@ module.exports = grammar({ // Prefer direct calls, e.g. `try foo()`, over indirect like `try a ? b() : c`. This allows us to have // left associativity for the direct calls, which is technically wrong but is the only way to resolve the // ambiguity of `if foo { ... }` in the correct direction. - prec.right(-2, $._expression), + prec.right(-2, $.expression), prec.left(0, $._binary_expression), prec.left(0, $.call_expression), // Similarly special case the ternary expression, where `try` may come earlier than it is actually needed. @@ -840,7 +841,7 @@ module.exports = grammar({ "expr", choice( // Prefer direct calls over indirect (same as with `try`). - prec.right(-2, $._expression), + prec.right(-2, $.expression), prec.left(0, $.call_expression), // Special case ternary to `await` the whole thing (same as with `try`). prec.dynamic(1, prec.left(-1, $.ternary_expression)) @@ -853,9 +854,9 @@ module.exports = grammar({ prec.right( PRECS.ternary, seq( - field("condition", $._expression), + field("condition", $.expression), $._quest, - field("if_true", $._expression), + field("if_true", $.expression), ":", field("if_false", $._expr_hack_at_ternary_binary_suffix) ) @@ -864,13 +865,13 @@ module.exports = grammar({ prec.left( PRECS.ternary_binary_suffix, choice( - $._expression, + $.expression, alias($.expr_hack_at_ternary_binary_call, $.call_expression) ) ), expr_hack_at_ternary_binary_call: ($) => seq( - $._expression, + $.expression, alias($.expr_hack_at_ternary_binary_call_suffix, $.call_suffix) ), expr_hack_at_ternary_binary_call_suffix: ($) => @@ -878,7 +879,7 @@ module.exports = grammar({ call_expression: ($) => prec( PRECS.call, - prec.dynamic(DYNAMIC_PRECS.call, seq($._expression, $.call_suffix)) + prec.dynamic(DYNAMIC_PRECS.call, seq($.expression, $.call_suffix)) ), macro_invocation: ($) => prec( @@ -922,7 +923,7 @@ module.exports = grammar({ sep1Opt( seq( optional(seq(field("name", $.simple_identifier), ":")), - field("value", $._expression) + field("value", $.expression) ), "," ), @@ -930,7 +931,7 @@ module.exports = grammar({ ) ), array_literal: ($) => - seq("[", optional(sep1Opt(field("element", $._expression), ",")), "]"), + seq("[", optional(sep1Opt(field("element", $.expression), ",")), "]"), dictionary_literal: ($) => seq( "[", @@ -939,7 +940,7 @@ module.exports = grammar({ "]" ), _dictionary_literal_item: ($) => - seq(field("key", $._expression), ":", field("value", $._expression)), + seq(field("key", $.expression), ":", field("value", $.expression)), special_literal: ($) => seq( $._hash_symbol, @@ -958,7 +959,7 @@ module.exports = grammar({ $._hash_symbol, choice("colorLiteral", "fileLiteral", "imageLiteral"), "(", - sep1Opt(seq($.simple_identifier, ":", $._expression), ","), + sep1Opt(seq($.simple_identifier, ":", $.expression), ","), ")" ), lambda_literal: ($) => @@ -987,7 +988,7 @@ module.exports = grammar({ seq( optional($.ownership_modifier), field("name", $.simple_identifier), - optional(seq($._equal_sign, field("value", $._expression))) + optional(seq($._equal_sign, field("value", $.expression))) ) ) ), @@ -1041,11 +1042,11 @@ module.exports = grammar({ ) ), if_condition: ($) => - choice($._if_let_binding, $._expression, $.availability_condition), + choice($._if_let_binding, $.expression, $.availability_condition), _if_let_binding: ($) => seq( $._direct_or_indirect_binding, - optional(seq($._equal_sign, $._expression)), + optional(seq($._equal_sign, $.expression)), optional($.where_clause) ), guard_statement: ($) => @@ -1063,7 +1064,7 @@ module.exports = grammar({ PRECS["switch"], seq( "switch", - field("expr", $._expression), + field("expr", $.expression), "{", repeat($.switch_entry), "}" @@ -1077,7 +1078,7 @@ module.exports = grammar({ "case", seq( $.switch_pattern, - optional(seq($.where_keyword, $._expression)) + optional(seq($.where_keyword, $.expression)) ), repeat(seq(",", $.switch_pattern)) ), @@ -1097,7 +1098,7 @@ module.exports = grammar({ optional($.where_clause), $._block ), - where_clause: ($) => prec.left(seq($.where_keyword, $._expression)), + where_clause: ($) => prec.left(seq($.where_keyword, $.expression)), key_path_expression: ($) => prec.right( PRECS.keypath, @@ -1110,7 +1111,7 @@ module.exports = grammar({ ) ), key_path_string_expression: ($) => - prec.left(seq($._hash_symbol, "keyPath", "(", $._expression, ")")), + prec.left(seq($._hash_symbol, "keyPath", "(", $.expression, ")")), _key_path_component: ($) => prec.left( choice( @@ -1166,7 +1167,7 @@ module.exports = grammar({ ), _bitwise_binary_operator: ($) => choice("&", "|", "^", "<<", ">>"), _postfix_unary_operator: ($) => choice("++", "--", $.bang), - directly_assignable_expression: ($) => $._expression, + directly_assignable_expression: ($) => $.expression, //////////////////////////////// // Statements - https://docs.swift.org/swift-book/ReferenceManual/Statements.html @@ -1182,14 +1183,14 @@ module.exports = grammar({ ), _local_statement: ($) => choice( - $._expression, + $.expression, $._local_declaration, $._labeled_statement, $.control_transfer_statement ), _top_level_statement: ($) => choice( - $._expression, + $.expression, $._global_declaration, $._labeled_statement, $._throw_statement @@ -1229,8 +1230,8 @@ module.exports = grammar({ // the opposite, though, since function calls may contain trailing code blocks, which are undesirable here. // // To fix that, we simply undo the special casing by defining our own `await_expression`. - choice($._expression, alias($.for_statement_await, $.await_expression)), - for_statement_await: ($) => seq($._await_operator, $._expression), + choice($.expression, alias($.for_statement_await, $.await_expression)), + for_statement_await: ($) => seq($._await_operator, $.expression), while_statement: ($) => prec( @@ -1264,11 +1265,11 @@ module.exports = grammar({ PRECS.control_transfer, seq( $._optionally_valueful_control_keyword, - field("result", optional($._expression)) + field("result", optional($.expression)) ) ) ), - _throw_statement: ($) => seq($.throw_keyword, $._expression), + _throw_statement: ($) => seq($.throw_keyword, $.expression), throw_keyword: ($) => "throw", _optionally_valueful_control_keyword: ($) => choice("return", "continue", "break", "yield"), @@ -1278,13 +1279,13 @@ module.exports = grammar({ seq( field("target", $.directly_assignable_expression), field("operator", $._assignment_and_operator), - field("result", $._expression) + field("result", $.expression) ) ), value_parameter_pack: ($) => - prec.left(PRECS.parameter_pack, seq("each", $._expression)), + prec.left(PRECS.parameter_pack, seq("each", $.expression)), value_pack_expansion: ($) => - prec.left(PRECS.parameter_pack, seq("repeat", $._expression)), + prec.left(PRECS.parameter_pack, seq("repeat", $.expression)), availability_condition: ($) => seq( $._hash_symbol, @@ -1414,12 +1415,12 @@ module.exports = grammar({ 1, seq( $._equal_sign, - field("value", $._expression), + field("value", $.expression), $.willset_didset_block ) ), _expression_without_willset_didset: ($) => - seq($._equal_sign, field("value", $._expression)), + seq($._equal_sign, field("value", $.expression)), willset_didset_block: ($) => choice( seq("{", $.willset_clause, optional($.didset_clause), "}"), @@ -1502,7 +1503,7 @@ module.exports = grammar({ macro_definition: ($) => seq( $._equal_sign, - field("body", choice($._expression, $.external_macro_definition)) + field("body", choice($.expression, $.external_macro_definition)) ), external_macro_definition: ($) => @@ -1611,7 +1612,7 @@ module.exports = grammar({ seq( optional($.attribute), $.parameter, - optional(seq($._equal_sign, field("default_value", $._expression))) + optional(seq($._equal_sign, field("default_value", $.expression))) ), parameter: ($) => seq( @@ -1686,7 +1687,7 @@ module.exports = grammar({ _enum_entry_suffix: ($) => choice( field("data_contents", $.enum_type_parameters), - seq($._equal_sign, field("raw_value", $._expression)) + seq($._equal_sign, field("raw_value", $.expression)) ), enum_type_parameters: ($) => seq( @@ -1698,7 +1699,7 @@ module.exports = grammar({ seq(optional($.wildcard_pattern), $.simple_identifier, ":") ), $._type, - optional(seq($._equal_sign, $._expression)) + optional(seq($._equal_sign, $.expression)) ), "," ) @@ -1849,9 +1850,9 @@ module.exports = grammar({ _attribute_argument: ($) => choice( // labeled function parameters, used in custom property wrappers - seq($.simple_identifier, ":", $._expression), + seq($.simple_identifier, ":", $.expression), // Unlabeled function parameters, simple identifiers, or `*` - $._expression, + $.expression, // References to param names (used in `@objc(foo:bar:)`) repeat1(seq($.simple_identifier, ":")), // Version restrictions (iOS 3.4.5, Swift 5.0.0) @@ -1888,13 +1889,13 @@ module.exports = grammar({ choice( $._universally_allowed_pattern, $._binding_pattern, - $._expression + $.expression ), optional($._quest) ), _non_binding_pattern_with_expr: ($) => seq( - choice($._universally_allowed_pattern, $._expression), + choice($._universally_allowed_pattern, $.expression), optional($._quest) ), _direct_or_indirect_binding: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 8638a9368d94..fcbb1a0e574a 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -1,23 +1,81 @@ +supertypes: + expression: + - additive_expression + - array_literal + - as_expression + - assignment + - await_expression + - bin_literal + - bitwise_operation + - boolean_literal + - call_expression + - check_expression + - comparison_expression + - conjunction_expression + - constructor_expression + - diagnostic + - dictionary_literal + - directive + - disjunction_expression + - equality_expression + - fully_open_range + - hex_literal + - if_statement + - infix_expression + - integer_literal + - key_path_expression + - key_path_string_expression + - lambda_literal + - line_string_literal + - macro_invocation + - multi_line_string_literal + - multiplicative_expression + - navigation_expression + - "nil" + - nil_coalescing_expression + - oct_literal + - open_end_range_expression + - open_start_range_expression + - optional_chain_marker + - playground_literal + - postfix_expression + - prefix_expression + - range_expression + - raw_string_literal + - real_literal + - referenceable_operator + - regex_literal + - selector_expression + - self_expression + - simple_identifier + - special_literal + - super_expression + - switch_statement + - ternary_expression + - try_expression + - tuple_expression + - value_pack_expansion + - value_parameter_pack + named: - _expression: additive_expression: - lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lhs: expression op: ["+", "-"] - rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + rhs: expression array_literal: - element*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + element*: expression array_type: element+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] as_expression: $children: as_operator - expr: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + expr: expression name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] as_operator: assignment: operator: ["%=", "*=", "+=", "-=", "/=", "="] - result: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + result: expression target: directly_assignable_expression associatedtype_declaration: $children*: [modifiers, type_constraints] @@ -25,21 +83,21 @@ named: must_inherit*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] attribute: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack] + $children+: [expression, user_type] availability_condition: $children*: [identifier, integer_literal] await_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - expr?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children?: expression + expr?: expression bang: bin_literal: bitwise_operation: - lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lhs: expression op: ["&", "<<", ">>", "^", "|"] - rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + rhs: expression boolean_literal: call_expression: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, call_suffix, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children+: [call_suffix, expression] call_suffix: $children+: [lambda_literal, value_arguments] name*: simple_identifier @@ -48,7 +106,7 @@ named: capture_list_item: $children?: ownership_modifier name: [self_expression, simple_identifier] - value?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + value?: expression catch_block: $children+: [catch_keyword, statements, where_clause] error?: pattern @@ -56,7 +114,7 @@ named: check_expression: name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] op: "is" - target: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + target: expression type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] class_body: $children*: [associatedtype_declaration, class_declaration, deinit_declaration, function_declaration, import_declaration, init_declaration, multiline_comment, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] @@ -67,9 +125,9 @@ named: name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] comment: comparison_expression: - lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lhs: expression op: ["<", "<=", ">", ">="] - rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + rhs: expression computed_getter: $children+: [attribute, getter_specifier, statements] computed_modify: @@ -79,9 +137,9 @@ named: computed_setter: $children+: [attribute, setter_specifier, simple_identifier, statements] conjunction_expression: - lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lhs: expression op: "&&" - rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + rhs: expression constructor_expression: $children: constructor_suffix constructed_type: [array_type, dictionary_type, user_type] @@ -89,8 +147,8 @@ named: $children+: [lambda_literal, value_arguments] name*: simple_identifier control_transfer_statement: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - result?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children*: [expression, throw_keyword] + result?: expression custom_operator: default_keyword: deinit_declaration: @@ -100,8 +158,8 @@ named: $children*: [bin_literal, boolean_literal, hex_literal, integer_literal, line_string_literal, multi_line_string_literal, oct_literal, raw_string_literal, real_literal, regex_literal, simple_identifier] diagnostic: dictionary_literal: - key*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + key*: expression + value*: expression dictionary_type: key+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -111,11 +169,11 @@ named: directive: $children*: [boolean_literal, integer_literal, simple_identifier] directly_assignable_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children: expression disjunction_expression: - lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lhs: expression op: "||" - rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + rhs: expression do_statement: $children*: [catch_block, statements] else: @@ -125,9 +183,9 @@ named: $children?: modifiers data_contents*: enum_type_parameters name+: simple_identifier - raw_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + raw_value*: expression enum_type_parameters: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, value_pack_expansion, value_parameter_pack, wildcard_pattern] + $children*: [expression, type_modifiers, wildcard_pattern] name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] equality_constraint: $children*: attribute @@ -135,16 +193,16 @@ named: must_equal+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] equality_expression: - lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lhs: expression op: ["!=", "!==", "==", "==="] - rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + rhs: expression existential_type: $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] external_macro_definition: $children: value_arguments for_statement: $children*: [statements, try_operator, type_annotation, where_clause] - collection: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + collection: expression item: pattern fully_open_range: function_body: @@ -152,7 +210,7 @@ named: function_declaration: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, parameter, property_behavior_modifier, throws, throws_clause, type_constraints, type_parameters] body: function_body - default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + default_value*: expression name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, referenceable_operator, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] function_modifier: @@ -170,7 +228,7 @@ named: identifier: $children+: simple_identifier if_condition: - $children*: [additive_expression, array_literal, as_expression, assignment, availability_condition, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, pattern, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_annotation, type_modifiers, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, where_clause, wildcard_pattern] + $children*: [availability_condition, expression, pattern, type_annotation, type_modifiers, user_type, value_binding_pattern, where_clause, wildcard_pattern] bound_identifier?: simple_identifier name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] if_statement: @@ -179,9 +237,9 @@ named: import_declaration: $children+: [identifier, modifiers] infix_expression: - lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lhs: expression op: custom_operator - rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + rhs: expression inheritance_constraint: $children*: attribute constrained_type+: [".", array_type, dictionary_type, existential_type, function_type, identifier, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -193,18 +251,18 @@ named: init_declaration: $children*: [attribute, bang, modifiers, parameter, throws, throws_clause, type_constraints, type_parameters] body?: function_body - default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + default_value*: expression name: "init" integer_literal: interpolated_expression: $children?: type_modifiers name?: value_argument_label reference_specifier*: value_argument_label - value?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + value?: expression key_path_expression: $children*: [array_type, bang, dictionary_type, simple_identifier, type_arguments, type_identifier, value_argument] key_path_string_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children: expression lambda_function_type: $children*: [lambda_function_type_parameters, throws, throws_clause] name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] @@ -226,10 +284,10 @@ named: text*: [line_str_text, str_escaped_char] macro_declaration: $children+: [array_type, attribute, dictionary_type, existential_type, function_type, metatype, modifiers, opaque_type, optional_type, parameter, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_constraints, type_pack_expansion, type_parameter_pack, type_parameters, user_type] - default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + default_value*: expression definition?: macro_definition macro_definition: - body: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, external_macro_definition, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + body: [expression, external_macro_definition] macro_invocation: $children+: [call_suffix, simple_identifier, type_parameters] member_modifier: @@ -245,30 +303,30 @@ named: text*: ["\"", multi_line_str_text, str_escaped_char] multiline_comment: multiplicative_expression: - lhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + lhs: expression op: ["%", "*", "/"] - rhs: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + rhs: expression mutation_modifier: navigation_expression: element?: [dictionary_type, existential_type, opaque_type] suffix: navigation_suffix - target+: ["(", ")", additive_expression, array_literal, array_type, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, dictionary_type, directive, disjunction_expression, equality_expression, existential_type, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, opaque_type, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, user_type, value_pack_expansion, value_parameter_pack] + target+: ["(", ")", array_type, dictionary_type, existential_type, expression, opaque_type, user_type] navigation_suffix: suffix: [integer_literal, simple_identifier] nil_coalescing_expression: - if_nil: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - value: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + if_nil: expression + value: expression oct_literal: opaque_type: $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] open_end_range_expression: - start: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + start: expression open_start_range_expression: - end: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + end: expression operator_declaration: $children+: [deprecated_operator_declaration_body, referenceable_operator, simple_identifier] optional_chain_marker: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children: expression optional_type: wrapped: [array_type, dictionary_type, tuple_type, user_type] ownership_modifier: @@ -281,14 +339,14 @@ named: parameter_modifiers: $children+: parameter_modifier pattern: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, pattern, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, type_modifiers, user_type, value_binding_pattern, value_pack_expansion, value_parameter_pack, wildcard_pattern] + $children*: [expression, pattern, type_modifiers, user_type, value_binding_pattern, wildcard_pattern] bound_identifier?: simple_identifier name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] playground_literal: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children+: expression postfix_expression: operation: ["++", "--", bang] - target: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + target: expression precedence_group_attribute: $children+: [boolean_literal, simple_identifier] precedence_group_attributes: @@ -297,13 +355,13 @@ named: $children+: [precedence_group_attributes, simple_identifier] prefix_expression: operation: ["&", "+", "++", "-", "--", ".", bang, custom_operator, "~"] - target: [_expression, additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + target: expression property_behavior_modifier: property_declaration: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_annotation, type_constraints, value_binding_pattern, willset_didset_block] computed_value*: computed_property name+: pattern - value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + value*: expression property_modifier: protocol_body: $children*: [associatedtype_declaration, deinit_declaration, init_declaration, protocol_function_declaration, protocol_property_declaration, subscript_declaration, typealias_declaration] @@ -317,7 +375,7 @@ named: name: type_identifier protocol_function_declaration: $children*: [attribute, modifiers, parameter, statements, throws, throws_clause, type_constraints, type_parameters] - default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + default_value*: expression name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, referenceable_operator, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] protocol_property_declaration: @@ -326,9 +384,9 @@ named: protocol_property_requirements: $children*: [getter_specifier, setter_specifier] range_expression: - end: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + end: expression op: ["...", "..<"] - start: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + start: expression raw_str_continuing_indicator: raw_str_end_part: raw_str_interpolation: @@ -348,49 +406,49 @@ named: $children?: statements condition+: if_condition selector_expression: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children: expression self_expression: setter_specifier: $children?: mutation_modifier shebang_line: simple_identifier: source_file: - $children*: [additive_expression, array_literal, as_expression, assignment, associatedtype_declaration, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, import_declaration, infix_expression, init_declaration, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_declaration, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, operator_declaration, optional_chain_marker, playground_literal, postfix_expression, precedence_group_declaration, prefix_expression, property_declaration, protocol_declaration, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, repeat_while_statement, selector_expression, self_expression, shebang_line, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, throw_keyword, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] + $children*: [associatedtype_declaration, class_declaration, do_statement, expression, for_statement, function_declaration, guard_statement, import_declaration, init_declaration, macro_declaration, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, repeat_while_statement, shebang_line, statement_label, throw_keyword, typealias_declaration, while_statement] special_literal: statement_label: statements: - $children*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, class_declaration, comparison_expression, conjunction_expression, constructor_expression, control_transfer_statement, diagnostic, dictionary_literal, directive, disjunction_expression, do_statement, equality_expression, for_statement, fully_open_range, function_declaration, guard_statement, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, property_declaration, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, repeat_while_statement, selector_expression, self_expression, simple_identifier, special_literal, statement_label, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, typealias_declaration, value_pack_expansion, value_parameter_pack, while_statement] + $children+: [class_declaration, control_transfer_statement, do_statement, expression, for_statement, function_declaration, guard_statement, property_declaration, repeat_while_statement, statement_label, typealias_declaration, while_statement] str_escaped_char: subscript_declaration: $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] - default_value*: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + default_value*: expression name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] super_expression: suppressed_constraint: suppressed: type_identifier switch_entry: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, default_keyword, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, modifiers, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, statements, super_expression, switch_pattern, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] + $children+: [default_keyword, expression, modifiers, statements, switch_pattern, where_keyword] switch_pattern: $children: pattern switch_statement: $children*: switch_entry - expr: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + expr: expression ternary_expression: - condition: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - if_false: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] - if_true: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + condition: expression + if_false: expression + if_true: expression throw_keyword: throws: throws_clause: type: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] try_expression: $children: try_operator - expr: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + expr: expression try_operator: tuple_expression: name*: simple_identifier - value+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + value+: expression tuple_type: $children?: tuple_type_item element*: tuple_type_item @@ -433,7 +491,7 @@ named: $children?: type_modifiers name?: value_argument_label reference_specifier*: value_argument_label - value?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, "nil", nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + value?: expression value_argument_label: $children: simple_identifier value_arguments: @@ -441,12 +499,12 @@ named: value_binding_pattern: mutability: ["let", "var"] value_pack_expansion: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children: expression value_parameter_pack: - $children?: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack] + $children: expression visibility_modifier: where_clause: - $children+: [additive_expression, array_literal, as_expression, assignment, await_expression, bin_literal, bitwise_operation, boolean_literal, call_expression, check_expression, comparison_expression, conjunction_expression, constructor_expression, diagnostic, dictionary_literal, directive, disjunction_expression, equality_expression, fully_open_range, hex_literal, if_statement, infix_expression, integer_literal, key_path_expression, key_path_string_expression, lambda_literal, line_string_literal, macro_invocation, multi_line_string_literal, multiplicative_expression, navigation_expression, nil_coalescing_expression, oct_literal, open_end_range_expression, open_start_range_expression, optional_chain_marker, playground_literal, postfix_expression, prefix_expression, range_expression, raw_string_literal, real_literal, referenceable_operator, regex_literal, selector_expression, self_expression, simple_identifier, special_literal, super_expression, switch_statement, ternary_expression, try_expression, tuple_expression, value_pack_expansion, value_parameter_pack, where_keyword] + $children+: [expression, where_keyword] where_keyword: while_statement: $children?: statements From 9abfaca98ce3dd341a3325e44c9ee4d8d23c9216 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:18:02 +0000 Subject: [PATCH 10/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 140 +++++----- unified/ql/lib/unified.dbscheme | 381 +++++++++----------------- 2 files changed, 191 insertions(+), 330 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index cbf7dad7b38f..d054ca994354 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -87,19 +87,13 @@ module Swift { ) } - /** A class representing `_expression` tokens. */ - class UnderscoreExpression extends @swift_token__expression, Token { - /** Gets the name of the primary QL class for this element. */ - final override string getAPrimaryQlClass() { result = "UnderscoreExpression" } - } - /** A class representing `additive_expression` nodes. */ class AdditiveExpression extends @swift_additive_expression, AstNode { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "AdditiveExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs() { swift_additive_expression_def(this, result, _, _) } + final Expression getLhs() { swift_additive_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -111,7 +105,7 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs() { swift_additive_expression_def(this, _, _, result) } + final Expression getRhs() { swift_additive_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -126,7 +120,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ArrayLiteral" } /** Gets the node corresponding to the field `element`. */ - final AstNode getElement(int i) { swift_array_literal_element(this, i, result) } + final Expression getElement(int i) { swift_array_literal_element(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_array_literal_element(this, _, result) } @@ -155,7 +149,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "AsExpression" } /** Gets the node corresponding to the field `expr`. */ - final AstNode getExpr() { swift_as_expression_def(this, result, _, _) } + final Expression getExpr() { swift_as_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `name`. */ final AstNode getName() { swift_as_expression_def(this, _, result, _) } @@ -204,7 +198,7 @@ module Swift { } /** Gets the node corresponding to the field `result`. */ - final AstNode getResult() { swift_assignment_def(this, _, result, _) } + final Expression getResult() { swift_assignment_def(this, _, result, _) } /** Gets the node corresponding to the field `target`. */ final DirectlyAssignableExpression getTarget() { swift_assignment_def(this, _, _, result) } @@ -277,10 +271,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "AwaitExpression" } /** Gets the node corresponding to the field `expr`. */ - final AstNode getExpr() { swift_await_expression_expr(this, result) } + final Expression getExpr() { swift_await_expression_expr(this, result) } /** Gets the child of this node. */ - final AstNode getChild() { swift_await_expression_child(this, result) } + final Expression getChild() { swift_await_expression_child(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -306,7 +300,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "BitwiseOperation" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs() { swift_bitwise_operation_def(this, result, _, _) } + final Expression getLhs() { swift_bitwise_operation_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -324,7 +318,7 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs() { swift_bitwise_operation_def(this, _, _, result) } + final Expression getRhs() { swift_bitwise_operation_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -389,7 +383,7 @@ module Swift { final AstNode getName() { swift_capture_list_item_def(this, result) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue() { swift_capture_list_item_value(this, result) } + final Expression getValue() { swift_capture_list_item_value(this, result) } /** Gets the child of this node. */ final OwnershipModifier getChild() { swift_capture_list_item_child(this, result) } @@ -441,7 +435,7 @@ module Swift { } /** Gets the node corresponding to the field `target`. */ - final AstNode getTarget() { swift_check_expression_def(this, _, _, result) } + final Expression getTarget() { swift_check_expression_def(this, _, _, result) } /** Gets the node corresponding to the field `type`. */ final AstNode getType(int i) { swift_check_expression_type(this, i, result) } @@ -515,7 +509,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ComparisonExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs() { swift_comparison_expression_def(this, result, _, _) } + final Expression getLhs() { swift_comparison_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -531,7 +525,7 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs() { swift_comparison_expression_def(this, _, _, result) } + final Expression getRhs() { swift_comparison_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -594,7 +588,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ConjunctionExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs() { swift_conjunction_expression_def(this, result, _, _) } + final Expression getLhs() { swift_conjunction_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -604,7 +598,7 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs() { swift_conjunction_expression_def(this, _, _, result) } + final Expression getRhs() { swift_conjunction_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -655,7 +649,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ControlTransferStatement" } /** Gets the node corresponding to the field `result`. */ - final AstNode getResult() { swift_control_transfer_statement_result(this, result) } + final Expression getResult() { swift_control_transfer_statement_result(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_control_transfer_statement_child(this, i, result) } @@ -726,10 +720,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "DictionaryLiteral" } /** Gets the node corresponding to the field `key`. */ - final AstNode getKey(int i) { swift_dictionary_literal_key(this, i, result) } + final Expression getKey(int i) { swift_dictionary_literal_key(this, i, result) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_dictionary_literal_value(this, i, result) } + final Expression getValue(int i) { swift_dictionary_literal_value(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -790,11 +784,11 @@ module Swift { final override string getAPrimaryQlClass() { result = "DirectlyAssignableExpression" } /** Gets the child of this node. */ - final AstNode getChild() { swift_directly_assignable_expression_child(this, result) } + final Expression getChild() { swift_directly_assignable_expression_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_directly_assignable_expression_child(this, result) + swift_directly_assignable_expression_def(this, result) } } @@ -804,7 +798,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "DisjunctionExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs() { swift_disjunction_expression_def(this, result, _, _) } + final Expression getLhs() { swift_disjunction_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -814,7 +808,7 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs() { swift_disjunction_expression_def(this, _, _, result) } + final Expression getRhs() { swift_disjunction_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -867,7 +861,7 @@ module Swift { final SimpleIdentifier getName(int i) { swift_enum_entry_name(this, i, result) } /** Gets the node corresponding to the field `raw_value`. */ - final AstNode getRawValue(int i) { swift_enum_entry_raw_value(this, i, result) } + final Expression getRawValue(int i) { swift_enum_entry_raw_value(this, i, result) } /** Gets the child of this node. */ final Modifiers getChild() { swift_enum_entry_child(this, result) } @@ -933,7 +927,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "EqualityExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs() { swift_equality_expression_def(this, result, _, _) } + final Expression getLhs() { swift_equality_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -949,7 +943,7 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs() { swift_equality_expression_def(this, _, _, result) } + final Expression getRhs() { swift_equality_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -970,6 +964,8 @@ module Swift { final override AstNode getAFieldOrChild() { swift_existential_type_def(this, result) } } + class Expression extends @swift_expression, AstNode { } + /** A class representing `external_macro_definition` nodes. */ class ExternalMacroDefinition extends @swift_external_macro_definition, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -988,7 +984,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ForStatement" } /** Gets the node corresponding to the field `collection`. */ - final AstNode 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) } @@ -1031,7 +1027,7 @@ module Swift { final FunctionBody getBody() { swift_function_declaration_def(this, result) } /** Gets the node corresponding to the field `default_value`. */ - final AstNode getDefaultValue(int i) { + final Expression getDefaultValue(int i) { swift_function_declaration_default_value(this, i, result) } @@ -1193,13 +1189,13 @@ module Swift { final override string getAPrimaryQlClass() { result = "InfixExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs() { swift_infix_expression_def(this, result, _, _) } + final Expression getLhs() { swift_infix_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final CustomOperator getOp() { swift_infix_expression_def(this, _, result, _) } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs() { swift_infix_expression_def(this, _, _, result) } + final Expression getRhs() { swift_infix_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -1266,7 +1262,9 @@ module Swift { final FunctionBody getBody() { swift_init_declaration_body(this, result) } /** Gets the node corresponding to the field `default_value`. */ - final AstNode getDefaultValue(int i) { swift_init_declaration_default_value(this, i, result) } + final Expression getDefaultValue(int i) { + swift_init_declaration_default_value(this, i, result) + } /** Gets the node corresponding to the field `name`. */ final string getName() { @@ -1304,7 +1302,7 @@ module Swift { } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue() { swift_interpolated_expression_value(this, result) } + final Expression getValue() { swift_interpolated_expression_value(this, result) } /** Gets the child of this node. */ final TypeModifiers getChild() { swift_interpolated_expression_child(this, result) } @@ -1336,12 +1334,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "KeyPathStringExpression" } /** Gets the child of this node. */ - final AstNode getChild() { swift_key_path_string_expression_child(this, result) } + final Expression getChild() { swift_key_path_string_expression_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_key_path_string_expression_child(this, result) - } + final override AstNode getAFieldOrChild() { swift_key_path_string_expression_def(this, result) } } /** A class representing `lambda_function_type` nodes. */ @@ -1462,7 +1458,9 @@ module Swift { final override string getAPrimaryQlClass() { result = "MacroDeclaration" } /** Gets the node corresponding to the field `default_value`. */ - final AstNode getDefaultValue(int i) { swift_macro_declaration_default_value(this, i, result) } + 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) } @@ -1582,7 +1580,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "MultiplicativeExpression" } /** Gets the node corresponding to the field `lhs`. */ - final AstNode getLhs() { swift_multiplicative_expression_def(this, result, _, _) } + final Expression getLhs() { swift_multiplicative_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -1596,7 +1594,7 @@ module Swift { } /** Gets the node corresponding to the field `rhs`. */ - final AstNode getRhs() { swift_multiplicative_expression_def(this, _, _, result) } + final Expression getRhs() { swift_multiplicative_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -1651,10 +1649,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "NilCoalescingExpression" } /** Gets the node corresponding to the field `if_nil`. */ - final AstNode getIfNil() { swift_nil_coalescing_expression_def(this, result, _) } + final Expression getIfNil() { swift_nil_coalescing_expression_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue() { swift_nil_coalescing_expression_def(this, _, result) } + final Expression getValue() { swift_nil_coalescing_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -1687,7 +1685,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "OpenEndRangeExpression" } /** Gets the node corresponding to the field `start`. */ - final AstNode getStart() { swift_open_end_range_expression_def(this, result) } + final Expression getStart() { swift_open_end_range_expression_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_open_end_range_expression_def(this, result) } @@ -1699,7 +1697,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "OpenStartRangeExpression" } /** Gets the node corresponding to the field `end`. */ - final AstNode getEnd() { swift_open_start_range_expression_def(this, result) } + final Expression getEnd() { swift_open_start_range_expression_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -1725,10 +1723,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "OptionalChainMarker" } /** Gets the child of this node. */ - final AstNode getChild() { swift_optional_chain_marker_child(this, result) } + final Expression getChild() { swift_optional_chain_marker_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_optional_chain_marker_child(this, result) } + final override AstNode getAFieldOrChild() { swift_optional_chain_marker_def(this, result) } } /** A class representing `optional_type` nodes. */ @@ -1821,7 +1819,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "PlaygroundLiteral" } /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_playground_literal_child(this, i, result) } + final Expression getChild(int i) { swift_playground_literal_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_playground_literal_child(this, _, result) } @@ -1836,7 +1834,7 @@ module Swift { final AstNode getOperation() { swift_postfix_expression_def(this, result, _) } /** Gets the node corresponding to the field `target`. */ - final AstNode getTarget() { swift_postfix_expression_def(this, _, result) } + final Expression getTarget() { swift_postfix_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -1897,7 +1895,7 @@ module Swift { final AstNode getOperation() { swift_prefix_expression_def(this, result, _) } /** Gets the node corresponding to the field `target`. */ - final AstNode getTarget() { swift_prefix_expression_def(this, _, result) } + final Expression getTarget() { swift_prefix_expression_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -1925,7 +1923,7 @@ module Swift { final Pattern getName(int i) { swift_property_declaration_name(this, i, result) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_property_declaration_value(this, i, result) } + final Expression getValue(int i) { swift_property_declaration_value(this, i, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_property_declaration_child(this, i, result) } @@ -2011,7 +2009,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ProtocolFunctionDeclaration" } /** Gets the node corresponding to the field `default_value`. */ - final AstNode getDefaultValue(int i) { + final Expression getDefaultValue(int i) { swift_protocol_function_declaration_default_value(this, i, result) } @@ -2073,7 +2071,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "RangeExpression" } /** Gets the node corresponding to the field `end`. */ - final AstNode getEnd() { swift_range_expression_def(this, result, _, _) } + final Expression getEnd() { swift_range_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -2085,7 +2083,7 @@ module Swift { } /** Gets the node corresponding to the field `start`. */ - final AstNode getStart() { swift_range_expression_def(this, _, _, result) } + final Expression getStart() { swift_range_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -2214,10 +2212,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "SelectorExpression" } /** Gets the child of this node. */ - final AstNode getChild() { swift_selector_expression_child(this, result) } + final Expression getChild() { swift_selector_expression_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_selector_expression_child(this, result) } + final override AstNode getAFieldOrChild() { swift_selector_expression_def(this, result) } } /** A class representing `self_expression` tokens. */ @@ -2298,7 +2296,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "SubscriptDeclaration" } /** Gets the node corresponding to the field `default_value`. */ - final AstNode getDefaultValue(int i) { + final Expression getDefaultValue(int i) { swift_subscript_declaration_default_value(this, i, result) } @@ -2368,7 +2366,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "SwitchStatement" } /** Gets the node corresponding to the field `expr`. */ - final AstNode getExpr() { swift_switch_statement_def(this, result) } + final Expression getExpr() { swift_switch_statement_def(this, result) } /** Gets the `i`th child of this node. */ final SwitchEntry getChild(int i) { swift_switch_statement_child(this, i, result) } @@ -2385,13 +2383,13 @@ module Swift { final override string getAPrimaryQlClass() { result = "TernaryExpression" } /** Gets the node corresponding to the field `condition`. */ - final AstNode getCondition() { swift_ternary_expression_def(this, result, _, _) } + final Expression getCondition() { swift_ternary_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `if_false`. */ - final AstNode getIfFalse() { swift_ternary_expression_def(this, _, result, _) } + final Expression getIfFalse() { swift_ternary_expression_def(this, _, result, _) } /** Gets the node corresponding to the field `if_true`. */ - final AstNode getIfTrue() { swift_ternary_expression_def(this, _, _, result) } + final Expression getIfTrue() { swift_ternary_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -2431,7 +2429,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "TryExpression" } /** Gets the node corresponding to the field `expr`. */ - final AstNode getExpr() { swift_try_expression_def(this, result, _) } + final Expression getExpr() { swift_try_expression_def(this, result, _) } /** Gets the child of this node. */ final TryOperator getChild() { swift_try_expression_def(this, _, result) } @@ -2457,7 +2455,7 @@ module Swift { final SimpleIdentifier getName(int i) { swift_tuple_expression_name(this, i, result) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_tuple_expression_value(this, i, result) } + final Expression getValue(int i) { swift_tuple_expression_value(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -2699,7 +2697,7 @@ module Swift { } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue() { swift_value_argument_value(this, result) } + final Expression getValue() { swift_value_argument_value(this, result) } /** Gets the child of this node. */ final TypeModifiers getChild() { swift_value_argument_child(this, result) } @@ -2761,10 +2759,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "ValuePackExpansion" } /** Gets the child of this node. */ - final AstNode getChild() { swift_value_pack_expansion_child(this, result) } + final Expression getChild() { swift_value_pack_expansion_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_value_pack_expansion_child(this, result) } + final override AstNode getAFieldOrChild() { swift_value_pack_expansion_def(this, result) } } /** A class representing `value_parameter_pack` nodes. */ @@ -2773,10 +2771,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "ValueParameterPack" } /** Gets the child of this node. */ - final AstNode getChild() { swift_value_parameter_pack_child(this, result) } + final Expression getChild() { swift_value_parameter_pack_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { swift_value_parameter_pack_child(this, result) } + final override AstNode getAFieldOrChild() { swift_value_parameter_pack_def(this, result) } } /** A class representing `visibility_modifier` tokens. */ diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index ecd726d46311..3466de92c921 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -132,30 +132,24 @@ overlayChangedFiles( ); /*- Swift dbscheme -*/ -@swift_additive_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - case @swift_additive_expression.op of 0 = @swift_additive_expression_plus | 1 = @swift_additive_expression_minus ; -@swift_additive_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_additive_expression_def( unique int id: @swift_additive_expression, - int lhs: @swift_additive_expression_lhs_type ref, + int lhs: @swift_expression ref, int op: int ref, - int rhs: @swift_additive_expression_rhs_type ref + int rhs: @swift_expression ref ); -@swift_array_literal_element_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #keyset[swift_array_literal, index] swift_array_literal_element( int swift_array_literal: @swift_array_literal ref, int index: int ref, - unique int element: @swift_array_literal_element_type ref + unique int element: @swift_expression ref ); swift_array_literal_def( @@ -178,8 +172,6 @@ swift_array_type_def( int name: @swift_array_type_name_type ref ); -@swift_as_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - @swift_as_expression_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @swift_as_expression_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -193,7 +185,7 @@ swift_as_expression_type( swift_as_expression_def( unique int id: @swift_as_expression, - int expr: @swift_as_expression_expr_type ref, + int expr: @swift_expression ref, int name: @swift_as_expression_name_type ref, int child: @swift_token_as_operator ref ); @@ -208,12 +200,10 @@ case @swift_assignment.operator of ; -@swift_assignment_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_assignment_def( unique int id: @swift_assignment, int operator: int ref, - int result: @swift_assignment_result_type ref, + int result: @swift_expression ref, int target: @swift_directly_assignable_expression ref ); @@ -257,7 +247,7 @@ swift_associatedtype_declaration_def( unique int id: @swift_associatedtype_declaration ); -@swift_attribute_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_attribute_child_type = @swift_expression | @swift_user_type #keyset[swift_attribute, index] swift_attribute_child( @@ -283,26 +273,20 @@ swift_availability_condition_def( unique int id: @swift_availability_condition ); -@swift_await_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_await_expression_expr( unique int swift_await_expression: @swift_await_expression ref, - unique int expr: @swift_await_expression_expr_type ref + unique int expr: @swift_expression ref ); -@swift_await_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_await_expression_child( unique int swift_await_expression: @swift_await_expression ref, - unique int child: @swift_await_expression_child_type ref + unique int child: @swift_expression ref ); swift_await_expression_def( unique int id: @swift_await_expression ); -@swift_bitwise_operation_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - case @swift_bitwise_operation.op of 0 = @swift_bitwise_operation_ampersand | 1 = @swift_bitwise_operation_langlelangle @@ -312,16 +296,14 @@ case @swift_bitwise_operation.op of ; -@swift_bitwise_operation_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_bitwise_operation_def( unique int id: @swift_bitwise_operation, - int lhs: @swift_bitwise_operation_lhs_type ref, + int lhs: @swift_expression ref, int op: int ref, - int rhs: @swift_bitwise_operation_rhs_type ref + int rhs: @swift_expression ref ); -@swift_call_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_call_suffix | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_call_expression_child_type = @swift_call_suffix | @swift_expression #keyset[swift_call_expression, index] swift_call_expression_child( @@ -367,11 +349,9 @@ swift_capture_list_def( @swift_capture_list_item_name_type = @swift_token_self_expression | @swift_token_simple_identifier -@swift_capture_list_item_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_capture_list_item_value( unique int swift_capture_list_item: @swift_capture_list_item ref, - unique int value: @swift_capture_list_item_value_type ref + unique int value: @swift_expression ref ); swift_capture_list_item_child( @@ -409,8 +389,6 @@ case @swift_check_expression.op of ; -@swift_check_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - @swift_check_expression_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type #keyset[swift_check_expression, index] @@ -424,7 +402,7 @@ swift_check_expression_def( unique int id: @swift_check_expression, int name: @swift_check_expression_name_type ref, int op: int ref, - int target: @swift_check_expression_target_type ref + int target: @swift_expression ref ); @swift_class_body_child_type = @swift_associatedtype_declaration | @swift_class_declaration | @swift_deinit_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_subscript_declaration | @swift_token_multiline_comment | @swift_typealias_declaration @@ -469,8 +447,6 @@ swift_class_declaration_def( int name: @swift_class_declaration_name_type ref ); -@swift_comparison_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - case @swift_comparison_expression.op of 0 = @swift_comparison_expression_langle | 1 = @swift_comparison_expression_langleequal @@ -479,13 +455,11 @@ case @swift_comparison_expression.op of ; -@swift_comparison_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_comparison_expression_def( unique int id: @swift_comparison_expression, - int lhs: @swift_comparison_expression_lhs_type ref, + int lhs: @swift_expression ref, int op: int ref, - int rhs: @swift_comparison_expression_rhs_type ref + int rhs: @swift_expression ref ); @swift_computed_getter_child_type = @swift_attribute | @swift_getter_specifier | @swift_statements @@ -540,20 +514,16 @@ swift_computed_setter_def( unique int id: @swift_computed_setter ); -@swift_conjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - case @swift_conjunction_expression.op of 0 = @swift_conjunction_expression_ampersandampersand ; -@swift_conjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_conjunction_expression_def( unique int id: @swift_conjunction_expression, - int lhs: @swift_conjunction_expression_lhs_type ref, + int lhs: @swift_expression ref, int op: int ref, - int rhs: @swift_conjunction_expression_rhs_type ref + int rhs: @swift_expression ref ); @swift_constructor_expression_constructed_type_type = @swift_array_type | @swift_dictionary_type | @swift_user_type @@ -584,14 +554,12 @@ swift_constructor_suffix_def( unique int id: @swift_constructor_suffix ); -@swift_control_transfer_statement_result_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_control_transfer_statement_result( unique int swift_control_transfer_statement: @swift_control_transfer_statement ref, - unique int result: @swift_control_transfer_statement_result_type ref + unique int result: @swift_expression ref ); -@swift_control_transfer_statement_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_control_transfer_statement_child_type = @swift_expression | @swift_token_throw_keyword #keyset[swift_control_transfer_statement, index] swift_control_transfer_statement_child( @@ -627,22 +595,18 @@ swift_deprecated_operator_declaration_body_def( unique int id: @swift_deprecated_operator_declaration_body ); -@swift_dictionary_literal_key_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #keyset[swift_dictionary_literal, index] swift_dictionary_literal_key( int swift_dictionary_literal: @swift_dictionary_literal ref, int index: int ref, - unique int key__: @swift_dictionary_literal_key_type ref + unique int key__: @swift_expression ref ); -@swift_dictionary_literal_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_dictionary_literal_value_type ref + unique int value: @swift_expression ref ); swift_dictionary_literal_def( @@ -706,31 +670,21 @@ swift_directive_def( unique int id: @swift_directive ); -@swift_directly_assignable_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -swift_directly_assignable_expression_child( - unique int swift_directly_assignable_expression: @swift_directly_assignable_expression ref, - unique int child: @swift_directly_assignable_expression_child_type ref -); - swift_directly_assignable_expression_def( - unique int id: @swift_directly_assignable_expression + unique int id: @swift_directly_assignable_expression, + int child: @swift_expression ref ); -@swift_disjunction_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - case @swift_disjunction_expression.op of 0 = @swift_disjunction_expression_pipepipe ; -@swift_disjunction_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_disjunction_expression_def( unique int id: @swift_disjunction_expression, - int lhs: @swift_disjunction_expression_lhs_type ref, + int lhs: @swift_expression ref, int op: int ref, - int rhs: @swift_disjunction_expression_rhs_type ref + int rhs: @swift_expression ref ); @swift_do_statement_child_type = @swift_catch_block | @swift_statements @@ -773,13 +727,11 @@ swift_enum_entry_name( unique int name: @swift_token_simple_identifier ref ); -@swift_enum_entry_raw_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_enum_entry_raw_value_type ref + unique int raw_value: @swift_expression ref ); swift_enum_entry_child( @@ -800,7 +752,7 @@ swift_enum_type_parameters_name( unique int name: @swift_enum_type_parameters_name_type ref ); -@swift_enum_type_parameters_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_enum_type_parameters_child_type = @swift_expression | @swift_token_wildcard_pattern | @swift_type_modifiers #keyset[swift_enum_type_parameters, index] swift_enum_type_parameters_child( @@ -845,8 +797,6 @@ swift_equality_constraint_def( int name: @swift_equality_constraint_name_type ref ); -@swift_equality_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - case @swift_equality_expression.op of 0 = @swift_equality_expression_bangequal | 1 = @swift_equality_expression_bangequalequal @@ -855,13 +805,11 @@ case @swift_equality_expression.op of ; -@swift_equality_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_equality_expression_def( unique int id: @swift_equality_expression, - int lhs: @swift_equality_expression_lhs_type ref, + int lhs: @swift_expression ref, int op: int ref, - int rhs: @swift_equality_expression_rhs_type ref + int rhs: @swift_expression ref ); @swift_existential_type_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -871,13 +819,13 @@ swift_existential_type_def( int child: @swift_existential_type_child_type ref ); +@swift_expression = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack + swift_external_macro_definition_def( unique int id: @swift_external_macro_definition, int child: @swift_value_arguments ref ); -@swift_for_statement_collection_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - @swift_for_statement_child_type = @swift_statements | @swift_token_try_operator | @swift_type_annotation | @swift_where_clause #keyset[swift_for_statement, index] @@ -889,7 +837,7 @@ swift_for_statement_child( swift_for_statement_def( unique int id: @swift_for_statement, - int collection: @swift_for_statement_collection_type ref, + int collection: @swift_expression ref, int item: @swift_pattern ref ); @@ -902,13 +850,11 @@ swift_function_body_def( unique int id: @swift_function_body ); -@swift_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_function_declaration_default_value_type ref + unique int default_value: @swift_expression ref ); @swift_function_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_referenceable_operator | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -1025,7 +971,7 @@ swift_if_condition_name( unique int name: @swift_if_condition_name_type ref ); -@swift_if_condition_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_availability_condition | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_annotation | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_where_clause +@swift_if_condition_child_type = @swift_availability_condition | @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type_annotation | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_where_clause #keyset[swift_if_condition, index] swift_if_condition_child( @@ -1071,15 +1017,11 @@ swift_import_declaration_def( unique int id: @swift_import_declaration ); -@swift_infix_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -@swift_infix_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_infix_expression_def( unique int id: @swift_infix_expression, - int lhs: @swift_infix_expression_lhs_type ref, + int lhs: @swift_expression ref, int op: @swift_token_custom_operator ref, - int rhs: @swift_infix_expression_rhs_type ref + int rhs: @swift_expression ref ); @swift_inheritance_constraint_constrained_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_identifier | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -1126,13 +1068,11 @@ swift_init_declaration_body( unique int body: @swift_function_body ref ); -@swift_init_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_init_declaration_default_value_type ref + unique int default_value: @swift_expression ref ); case @swift_init_declaration.name of @@ -1166,11 +1106,9 @@ swift_interpolated_expression_reference_specifier( unique int reference_specifier: @swift_value_argument_label ref ); -@swift_interpolated_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_interpolated_expression_value( unique int swift_interpolated_expression: @swift_interpolated_expression ref, - unique int value: @swift_interpolated_expression_value_type ref + unique int value: @swift_expression ref ); swift_interpolated_expression_child( @@ -1195,15 +1133,9 @@ swift_key_path_expression_def( unique int id: @swift_key_path_expression ); -@swift_key_path_string_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -swift_key_path_string_expression_child( - unique int swift_key_path_string_expression: @swift_key_path_string_expression ref, - unique int child: @swift_key_path_string_expression_child_type ref -); - swift_key_path_string_expression_def( - unique int id: @swift_key_path_string_expression + unique int id: @swift_key_path_string_expression, + int child: @swift_expression ref ); @swift_lambda_function_type_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -1323,13 +1255,11 @@ swift_line_string_literal_def( unique int id: @swift_line_string_literal ); -@swift_macro_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_macro_declaration_default_value_type ref + unique int default_value: @swift_expression ref ); swift_macro_declaration_definition( @@ -1350,7 +1280,7 @@ swift_macro_declaration_def( unique int id: @swift_macro_declaration ); -@swift_macro_definition_body_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_external_macro_definition | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_macro_definition_body_type = @swift_expression | @swift_external_macro_definition swift_macro_definition_def( unique int id: @swift_macro_definition, @@ -1419,8 +1349,6 @@ swift_multi_line_string_literal_def( unique int id: @swift_multi_line_string_literal ); -@swift_multiplicative_expression_lhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - case @swift_multiplicative_expression.op of 0 = @swift_multiplicative_expression_percent | 1 = @swift_multiplicative_expression_star @@ -1428,13 +1356,11 @@ case @swift_multiplicative_expression.op of ; -@swift_multiplicative_expression_rhs_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_multiplicative_expression_def( unique int id: @swift_multiplicative_expression, - int lhs: @swift_multiplicative_expression_lhs_type ref, + int lhs: @swift_expression ref, int op: int ref, - int rhs: @swift_multiplicative_expression_rhs_type ref + int rhs: @swift_expression ref ); @swift_navigation_expression_element_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type @@ -1444,7 +1370,7 @@ swift_navigation_expression_element( unique int element: @swift_navigation_expression_element_type ref ); -@swift_navigation_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_array_type | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_dictionary_type | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_existential_type | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_opaque_type | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_user_type | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_navigation_expression_target_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_expression | @swift_opaque_type | @swift_reserved_word | @swift_user_type #keyset[swift_navigation_expression, index] swift_navigation_expression_target( @@ -1465,14 +1391,10 @@ swift_navigation_suffix_def( int suffix: @swift_navigation_suffix_suffix_type ref ); -@swift_nil_coalescing_expression_if_nil_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -@swift_nil_coalescing_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_nil_coalescing_expression_def( unique int id: @swift_nil_coalescing_expression, - int if_nil: @swift_nil_coalescing_expression_if_nil_type ref, - int value: @swift_nil_coalescing_expression_value_type ref + int if_nil: @swift_expression ref, + int value: @swift_expression ref ); @swift_opaque_type_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -1482,18 +1404,14 @@ swift_opaque_type_def( int child: @swift_opaque_type_child_type ref ); -@swift_open_end_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_open_end_range_expression_def( unique int id: @swift_open_end_range_expression, - int start: @swift_open_end_range_expression_start_type ref + int start: @swift_expression ref ); -@swift_open_start_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_open_start_range_expression_def( unique int id: @swift_open_start_range_expression, - int end: @swift_open_start_range_expression_end_type ref + int end: @swift_expression ref ); @swift_operator_declaration_child_type = @swift_deprecated_operator_declaration_body | @swift_referenceable_operator | @swift_token_simple_identifier @@ -1509,15 +1427,9 @@ swift_operator_declaration_def( unique int id: @swift_operator_declaration ); -@swift_optional_chain_marker_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -swift_optional_chain_marker_child( - unique int swift_optional_chain_marker: @swift_optional_chain_marker ref, - unique int child: @swift_optional_chain_marker_child_type ref -); - swift_optional_chain_marker_def( - unique int id: @swift_optional_chain_marker + unique int id: @swift_optional_chain_marker, + int child: @swift_expression ref ); @swift_optional_type_wrapped_type = @swift_array_type | @swift_dictionary_type | @swift_tuple_type | @swift_user_type @@ -1582,7 +1494,7 @@ swift_pattern_name( unique int name: @swift_pattern_name_type ref ); -@swift_pattern_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_pattern | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_wildcard_pattern | @swift_try_expression | @swift_tuple_expression | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_pattern_child_type = @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern #keyset[swift_pattern, index] swift_pattern_child( @@ -1595,13 +1507,11 @@ swift_pattern_def( unique int id: @swift_pattern ); -@swift_playground_literal_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #keyset[swift_playground_literal, index] swift_playground_literal_child( int swift_playground_literal: @swift_playground_literal ref, int index: int ref, - unique int child: @swift_playground_literal_child_type ref + unique int child: @swift_expression ref ); swift_playground_literal_def( @@ -1610,12 +1520,10 @@ swift_playground_literal_def( @swift_postfix_expression_operation_type = @swift_reserved_word | @swift_token_bang -@swift_postfix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_postfix_expression_def( unique int id: @swift_postfix_expression, int operation: @swift_postfix_expression_operation_type ref, - int target: @swift_postfix_expression_target_type ref + int target: @swift_expression ref ); @swift_precedence_group_attribute_child_type = @swift_token_boolean_literal | @swift_token_simple_identifier @@ -1657,12 +1565,10 @@ swift_precedence_group_declaration_def( @swift_prefix_expression_operation_type = @swift_reserved_word | @swift_token_bang | @swift_token_custom_operator -@swift_prefix_expression_target_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token__expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_prefix_expression_def( unique int id: @swift_prefix_expression, int operation: @swift_prefix_expression_operation_type ref, - int target: @swift_prefix_expression_target_type ref + int target: @swift_expression ref ); #keyset[swift_property_declaration, index] @@ -1679,13 +1585,11 @@ swift_property_declaration_name( unique int name: @swift_pattern ref ); -@swift_property_declaration_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_property_declaration_value_type ref + unique int value: @swift_expression ref ); @swift_property_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier | @swift_type_annotation | @swift_type_constraints | @swift_value_binding_pattern | @swift_willset_didset_block @@ -1755,13 +1659,11 @@ swift_protocol_declaration_def( int name: @swift_token_type_identifier ref ); -@swift_protocol_function_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_protocol_function_declaration_default_value_type ref + unique int default_value: @swift_expression ref ); @swift_protocol_function_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_referenceable_operator | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -1822,21 +1724,17 @@ swift_protocol_property_requirements_def( unique int id: @swift_protocol_property_requirements ); -@swift_range_expression_end_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - case @swift_range_expression.op of 0 = @swift_range_expression_dotdotdot | 1 = @swift_range_expression_dotdotlangle ; -@swift_range_expression_start_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_range_expression_def( unique int id: @swift_range_expression, - int end: @swift_range_expression_end_type ref, + int end: @swift_expression ref, int op: int ref, - int start: @swift_range_expression_start_type ref + int start: @swift_expression ref ); #keyset[swift_raw_str_interpolation, index] @@ -1905,15 +1803,9 @@ swift_repeat_while_statement_def( unique int id: @swift_repeat_while_statement ); -@swift_selector_expression_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -swift_selector_expression_child( - unique int swift_selector_expression: @swift_selector_expression ref, - unique int child: @swift_selector_expression_child_type ref -); - swift_selector_expression_def( - unique int id: @swift_selector_expression + unique int id: @swift_selector_expression, + int child: @swift_expression ref ); swift_setter_specifier_child( @@ -1925,7 +1817,7 @@ swift_setter_specifier_def( unique int id: @swift_setter_specifier ); -@swift_source_file_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_associatedtype_declaration | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_import_declaration | @swift_infix_expression | @swift_init_declaration | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_declaration | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_operator_declaration | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_precedence_group_declaration | @swift_prefix_expression | @swift_property_declaration | @swift_protocol_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_shebang_line | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_token_throw_keyword | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement +@swift_source_file_child_type = @swift_associatedtype_declaration | @swift_class_declaration | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_import_declaration | @swift_init_declaration | @swift_macro_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_repeat_while_statement | @swift_token_shebang_line | @swift_token_statement_label | @swift_token_throw_keyword | @swift_typealias_declaration | @swift_while_statement #keyset[swift_source_file, index] swift_source_file_child( @@ -1938,7 +1830,7 @@ swift_source_file_def( unique int id: @swift_source_file ); -@swift_statements_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_class_declaration | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_control_transfer_statement | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_do_statement | @swift_equality_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_property_declaration | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_repeat_while_statement | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_statement_label | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_typealias_declaration | @swift_value_pack_expansion | @swift_value_parameter_pack | @swift_while_statement +@swift_statements_child_type = @swift_class_declaration | @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_property_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_typealias_declaration | @swift_while_statement #keyset[swift_statements, index] swift_statements_child( @@ -1951,13 +1843,11 @@ swift_statements_def( unique int id: @swift_statements ); -@swift_subscript_declaration_default_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_subscript_declaration_default_value_type ref + unique int default_value: @swift_expression ref ); @swift_subscript_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -1994,7 +1884,7 @@ swift_suppressed_constraint_def( int suppressed: @swift_token_type_identifier ref ); -@swift_switch_entry_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_modifiers | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_statements | @swift_switch_pattern | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_default_keyword | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_switch_entry_child_type = @swift_expression | @swift_modifiers | @swift_statements | @swift_switch_pattern | @swift_token_default_keyword | @swift_token_where_keyword #keyset[swift_switch_entry, index] swift_switch_entry_child( @@ -2012,8 +1902,6 @@ swift_switch_pattern_def( int child: @swift_pattern ref ); -@swift_switch_statement_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #keyset[swift_switch_statement, index] swift_switch_statement_child( int swift_switch_statement: @swift_switch_statement ref, @@ -2023,20 +1911,14 @@ swift_switch_statement_child( swift_switch_statement_def( unique int id: @swift_switch_statement, - int expr: @swift_switch_statement_expr_type ref + int expr: @swift_expression ref ); -@swift_ternary_expression_condition_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -@swift_ternary_expression_if_false_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -@swift_ternary_expression_if_true_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_ternary_expression_def( unique int id: @swift_ternary_expression, - int condition: @swift_ternary_expression_condition_type ref, - int if_false: @swift_ternary_expression_if_false_type ref, - int if_true: @swift_ternary_expression_if_true_type ref + int condition: @swift_expression ref, + int if_false: @swift_expression ref, + int if_true: @swift_expression ref ); @swift_throws_clause_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -2046,11 +1928,9 @@ swift_throws_clause_def( int type__: @swift_throws_clause_type_type ref ); -@swift_try_expression_expr_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_try_expression_def( unique int id: @swift_try_expression, - int expr: @swift_try_expression_expr_type ref, + int expr: @swift_expression ref, int child: @swift_token_try_operator ref ); @@ -2061,13 +1941,11 @@ swift_tuple_expression_name( unique int name: @swift_token_simple_identifier ref ); -@swift_tuple_expression_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - #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_tuple_expression_value_type ref + unique int value: @swift_expression ref ); swift_tuple_expression_def( @@ -2309,11 +2187,9 @@ swift_value_argument_reference_specifier( unique int reference_specifier: @swift_value_argument_label ref ); -@swift_value_argument_value_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - swift_value_argument_value( unique int swift_value_argument: @swift_value_argument ref, - unique int value: @swift_value_argument_value_type ref + unique int value: @swift_expression ref ); swift_value_argument_child( @@ -2352,29 +2228,17 @@ swift_value_binding_pattern_def( int mutability: int ref ); -@swift_value_pack_expansion_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -swift_value_pack_expansion_child( - unique int swift_value_pack_expansion: @swift_value_pack_expansion ref, - unique int child: @swift_value_pack_expansion_child_type ref -); - swift_value_pack_expansion_def( - unique int id: @swift_value_pack_expansion -); - -@swift_value_parameter_pack_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack - -swift_value_parameter_pack_child( - unique int swift_value_parameter_pack: @swift_value_parameter_pack ref, - unique int child: @swift_value_parameter_pack_child_type ref + unique int id: @swift_value_pack_expansion, + int child: @swift_expression ref ); swift_value_parameter_pack_def( - unique int id: @swift_value_parameter_pack + unique int id: @swift_value_parameter_pack, + int child: @swift_expression ref ); -@swift_where_clause_child_type = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_token_where_keyword | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack +@swift_where_clause_child_type = @swift_expression | @swift_token_where_keyword #keyset[swift_where_clause, index] swift_where_clause_child( @@ -2437,52 +2301,51 @@ swift_tokeninfo( case @swift_token.kind of 0 = @swift_reserved_word -| 1 = @swift_token__expression -| 2 = @swift_token_as_operator -| 3 = @swift_token_bang -| 4 = @swift_token_bin_literal -| 5 = @swift_token_boolean_literal -| 6 = @swift_token_catch_keyword -| 7 = @swift_token_comment -| 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 +| 1 = @swift_token_as_operator +| 2 = @swift_token_bang +| 3 = @swift_token_bin_literal +| 4 = @swift_token_boolean_literal +| 5 = @swift_token_catch_keyword +| 6 = @swift_token_comment +| 7 = @swift_token_custom_operator +| 8 = @swift_token_default_keyword +| 9 = @swift_token_diagnostic +| 10 = @swift_token_else +| 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 ; From 70f3fd1158fafd330b60492b349dcb71975b3c53 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:29:57 +0000 Subject: [PATCH 11/24] unified: make `unannotated_type` named and supertype Gets rid of a bunch of ad-hoc node type unions. --- .../extractor/tree-sitter-swift/grammar.js | 30 ++--- .../tree-sitter-swift/node-types.yml | 120 ++++++++++-------- 2 files changed, 82 insertions(+), 68 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 7fa16335ade6..01f714285c78 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -84,7 +84,7 @@ if (tree_sitter_version_supports_emoji()) { module.exports = grammar({ name: "swift", - supertypes: ($) => [$.expression], + supertypes: ($) => [$.expression, $.unannotated_type], conflicts: ($) => [ // @Type(... could either be an annotation constructor invocation or an annotated expression [$.attribute], @@ -405,9 +405,9 @@ module.exports = grammar({ _type: ($) => prec.right( PRECS.ty, - seq(optional($.type_modifiers), field("name", $._unannotated_type)) + seq(optional($.type_modifiers), field("name", $.unannotated_type)) ), - _unannotated_type: ($) => + unannotated_type: ($) => prec.right( PRECS.ty, choice( @@ -465,7 +465,7 @@ module.exports = grammar({ ), function_type: ($) => seq( - field("params", choice($.tuple_type, $._unannotated_type)), + field("params", choice($.tuple_type, $.unannotated_type)), optional($._async_keyword), optional(choice($.throws_clause, $.throws)), $._arrow_operator, @@ -484,18 +484,18 @@ module.exports = grammar({ repeat1(alias($._immediate_quest, "?")) ) ), - metatype: ($) => seq($._unannotated_type, ".", choice("Type", "Protocol")), + metatype: ($) => seq($.unannotated_type, ".", choice("Type", "Protocol")), _quest: ($) => "?", _immediate_quest: ($) => token.immediate("?"), - opaque_type: ($) => prec.right(seq("some", $._unannotated_type)), - existential_type: ($) => prec.right(seq("any", $._unannotated_type)), - type_parameter_pack: ($) => prec.left(seq("each", $._unannotated_type)), - type_pack_expansion: ($) => prec.left(seq("repeat", $._unannotated_type)), + opaque_type: ($) => prec.right(seq("some", $.unannotated_type)), + existential_type: ($) => prec.right(seq("any", $.unannotated_type)), + type_parameter_pack: ($) => prec.left(seq("each", $.unannotated_type)), + type_pack_expansion: ($) => prec.left(seq("repeat", $.unannotated_type)), protocol_composition_type: ($) => prec.left( seq( - $._unannotated_type, - repeat1(seq("&", prec.right($._unannotated_type))) + $.unannotated_type, + repeat1(seq("&", prec.right($.unannotated_type))) ) ), suppressed_constraint: ($) => @@ -1498,7 +1498,7 @@ module.exports = grammar({ _macro_signature: ($) => seq( $._function_value_parameters, - optional(seq($._arrow_operator, $._unannotated_type)) + optional(seq($._arrow_operator, $.unannotated_type)) ), macro_definition: ($) => seq( @@ -1524,7 +1524,7 @@ module.exports = grammar({ ), seq( field("declaration_kind", "extension"), - field("name", $._unannotated_type), + field("name", $.unannotated_type), optional($.type_parameters), optional(seq(":", $._inheritance_specifiers)), optional($.type_constraints), @@ -1594,7 +1594,7 @@ module.exports = grammar({ choice( $.identifier, seq( - $._unannotated_type, + $.unannotated_type, optional(seq(".", sep1($.simple_identifier, "."))) ) ), @@ -1667,7 +1667,7 @@ module.exports = grammar({ _async_modifier: ($) => token("async"), throws: ($) => choice($._throws_keyword, $._rethrows_keyword), throws_clause: ($) => - seq($._throws_keyword, "(", field("type", $._unannotated_type), ")"), + seq($._throws_keyword, "(", field("type", $.unannotated_type), ")"), enum_class_body: ($) => seq("{", repeat(choice($.enum_entry, $._type_level_declaration)), "}"), enum_entry: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index fcbb1a0e574a..3e9d6bba9685 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -56,6 +56,20 @@ supertypes: - tuple_expression - value_pack_expansion - value_parameter_pack + unannotated_type: + - array_type + - dictionary_type + - existential_type + - function_type + - metatype + - opaque_type + - optional_type + - protocol_composition_type + - suppressed_constraint + - tuple_type + - type_pack_expansion + - type_parameter_pack + - user_type named: additive_expression: @@ -65,13 +79,13 @@ named: array_literal: element*: expression array_type: - element+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] - name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + element+: [type_modifiers, unannotated_type] + name: unannotated_type as_expression: $children: as_operator expr: expression - name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name: unannotated_type + type+: [type_modifiers, unannotated_type] as_operator: assignment: operator: ["%=", "*=", "+=", "-=", "/=", "="] @@ -79,9 +93,9 @@ named: target: directly_assignable_expression associatedtype_declaration: $children*: [modifiers, type_constraints] - default_value*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] - must_inherit*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] - name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] + default_value*: [type_modifiers, unannotated_type] + must_inherit*: [type_modifiers, unannotated_type] + name+: [type_identifier, unannotated_type] attribute: $children+: [expression, user_type] availability_condition: @@ -112,17 +126,17 @@ named: error?: pattern catch_keyword: check_expression: - name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + name: unannotated_type op: "is" target: expression - type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + type+: [type_modifiers, unannotated_type] class_body: $children*: [associatedtype_declaration, class_declaration, deinit_declaration, function_declaration, import_declaration, init_declaration, multiline_comment, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] class_declaration: $children*: [attribute, inheritance_modifier, inheritance_specifier, modifiers, ownership_modifier, property_behavior_modifier, type_constraints, type_parameters] body: [class_body, enum_class_body] declaration_kind: ["actor", "class", "enum", "extension", "struct"] - name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] + name: [type_identifier, unannotated_type] comment: comparison_expression: lhs: expression @@ -161,9 +175,9 @@ named: key*: expression value*: expression dictionary_type: - key+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] - name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - value+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + key+: [type_modifiers, unannotated_type] + name+: unannotated_type + value+: [type_modifiers, unannotated_type] didset_clause: $children*: [modifiers, simple_identifier, statements] directive: @@ -186,18 +200,18 @@ named: raw_value*: expression enum_type_parameters: $children*: [expression, type_modifiers, wildcard_pattern] - name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + name*: unannotated_type equality_constraint: $children*: attribute - constrained_type+: [".", array_type, dictionary_type, existential_type, function_type, identifier, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - must_equal+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] - name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + constrained_type+: [".", identifier, simple_identifier, unannotated_type] + must_equal+: [type_modifiers, unannotated_type] + name: unannotated_type equality_expression: lhs: expression op: ["!=", "!==", "==", "==="] rhs: expression existential_type: - $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + $children: unannotated_type external_macro_definition: $children: value_arguments for_statement: @@ -211,14 +225,14 @@ named: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, parameter, property_behavior_modifier, throws, throws_clause, type_constraints, type_parameters] body: function_body default_value*: expression - name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, referenceable_operator, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name+: [referenceable_operator, simple_identifier, unannotated_type] + return_type*: ["!", type_modifiers, unannotated_type] function_modifier: function_type: $children?: [throws, throws_clause] - name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - params: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - return_type+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name: unannotated_type + params: unannotated_type + return_type+: [type_modifiers, unannotated_type] getter_specifier: $children*: [mutation_modifier, throws, throws_clause] guard_statement: @@ -230,7 +244,7 @@ named: if_condition: $children*: [availability_condition, expression, pattern, type_annotation, type_modifiers, user_type, value_binding_pattern, where_clause, wildcard_pattern] bound_identifier?: simple_identifier - name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + name?: unannotated_type if_statement: $children*: [else, if_statement, statements] condition+: if_condition @@ -242,9 +256,9 @@ named: rhs: expression inheritance_constraint: $children*: attribute - constrained_type+: [".", array_type, dictionary_type, existential_type, function_type, identifier, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - inherits_from+: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] - name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + constrained_type+: [".", identifier, simple_identifier, unannotated_type] + inherits_from+: ["!", type_modifiers, unannotated_type] + name: unannotated_type inheritance_modifier: inheritance_specifier: inherits_from: [function_type, suppressed_constraint, user_type] @@ -265,8 +279,8 @@ named: $children: expression lambda_function_type: $children*: [lambda_function_type_parameters, throws, throws_clause] - name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name?: unannotated_type + return_type*: ["!", type_modifiers, unannotated_type] lambda_function_type_parameters: $children+: lambda_parameter lambda_literal: @@ -276,14 +290,14 @@ named: lambda_parameter: $children?: [parameter_modifiers, self_expression] external_name?: simple_identifier - name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name*: [simple_identifier, unannotated_type] + type*: ["!", type_modifiers, unannotated_type] line_str_text: line_string_literal: interpolation*: interpolated_expression text*: [line_str_text, str_escaped_char] macro_declaration: - $children+: [array_type, attribute, dictionary_type, existential_type, function_type, metatype, modifiers, opaque_type, optional_type, parameter, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_constraints, type_pack_expansion, type_parameter_pack, type_parameters, user_type] + $children+: [attribute, modifiers, parameter, simple_identifier, type_constraints, type_parameters, unannotated_type] default_value*: expression definition?: macro_definition macro_definition: @@ -292,7 +306,7 @@ named: $children+: [call_suffix, simple_identifier, type_parameters] member_modifier: metatype: - $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + $children: unannotated_type modifiers: $children+: [attribute, function_modifier, inheritance_modifier, member_modifier, mutation_modifier, ownership_modifier, parameter_modifier, property_behavior_modifier, property_modifier, visibility_modifier] modify_specifier: @@ -318,7 +332,7 @@ named: value: expression oct_literal: opaque_type: - $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + $children: unannotated_type open_end_range_expression: start: expression open_start_range_expression: @@ -333,15 +347,15 @@ named: parameter: $children?: parameter_modifiers external_name?: simple_identifier - name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - type+: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name+: [simple_identifier, unannotated_type] + type+: ["!", type_modifiers, unannotated_type] parameter_modifier: parameter_modifiers: $children+: parameter_modifier pattern: $children*: [expression, pattern, type_modifiers, user_type, value_binding_pattern, wildcard_pattern] bound_identifier?: simple_identifier - name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + name?: unannotated_type playground_literal: $children+: expression postfix_expression: @@ -367,7 +381,7 @@ named: $children*: [associatedtype_declaration, deinit_declaration, init_declaration, protocol_function_declaration, protocol_property_declaration, subscript_declaration, typealias_declaration] body*: protocol_function_declaration protocol_composition_type: - $children+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + $children+: unannotated_type protocol_declaration: $children*: [attribute, inheritance_specifier, modifiers, type_constraints, type_parameters] body: protocol_body @@ -376,8 +390,8 @@ named: protocol_function_declaration: $children*: [attribute, modifiers, parameter, statements, throws, throws_clause, type_constraints, type_parameters] default_value*: expression - name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, referenceable_operator, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name*: [referenceable_operator, simple_identifier, unannotated_type] + return_type*: ["!", type_modifiers, unannotated_type] protocol_property_declaration: $children+: [modifiers, protocol_property_requirements, type_annotation, type_constraints] name: pattern @@ -422,8 +436,8 @@ named: subscript_declaration: $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] default_value*: expression - name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - return_type*: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name?: unannotated_type + return_type*: ["!", type_modifiers, unannotated_type] super_expression: suppressed_constraint: suppressed: type_identifier @@ -441,7 +455,7 @@ named: throw_keyword: throws: throws_clause: - type: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + type: unannotated_type try_expression: $children: try_operator expr: expression @@ -455,14 +469,14 @@ named: tuple_type_item: $children*: [parameter_modifiers, wildcard_pattern] element?: [dictionary_type, existential_type, opaque_type] - name*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, simple_identifier, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - type*: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name*: [simple_identifier, unannotated_type] + type*: [type_modifiers, unannotated_type] type_annotation: - name: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] - type+: ["!", array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name: unannotated_type + type+: ["!", type_modifiers, unannotated_type] type_arguments: $children*: type_modifiers - name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + name+: unannotated_type type_constraint: $children: [equality_constraint, inheritance_constraint] type_constraints: @@ -471,20 +485,20 @@ named: type_modifiers: $children+: attribute type_pack_expansion: - $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + $children: unannotated_type type_parameter: $children+: [type_identifier, type_modifiers, type_parameter_modifiers, type_parameter_pack] - name?: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + name?: unannotated_type type_parameter_modifiers: $children+: attribute type_parameter_pack: - $children: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_pack_expansion, type_parameter_pack, user_type] + $children: unannotated_type type_parameters: $children+: [type_constraints, type_parameter] typealias_declaration: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_parameters] - name+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_identifier, type_pack_expansion, type_parameter_pack, user_type] - value+: [array_type, dictionary_type, existential_type, function_type, metatype, opaque_type, optional_type, protocol_composition_type, suppressed_constraint, tuple_type, type_modifiers, type_pack_expansion, type_parameter_pack, user_type] + name+: [type_identifier, unannotated_type] + value+: [type_modifiers, unannotated_type] user_type: $children+: [type_arguments, type_identifier] value_argument: From 37e1e3c879af1c501abba126a8d6fb6793ea1f97 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:30:18 +0000 Subject: [PATCH 12/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 48 ++++---- unified/ql/lib/unified.dbscheme | 154 +++++++++----------------- 2 files changed, 80 insertions(+), 122 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index d054ca994354..e2be15932bed 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -135,7 +135,7 @@ module Swift { final AstNode getElement(int i) { swift_array_type_element(this, i, result) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_array_type_def(this, result) } + final UnannotatedType getName() { swift_array_type_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -152,7 +152,7 @@ module Swift { final Expression getExpr() { swift_as_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_as_expression_def(this, _, result, _) } + final UnannotatedType getName() { swift_as_expression_def(this, _, result, _) } /** Gets the node corresponding to the field `type`. */ final AstNode getType(int i) { swift_as_expression_type(this, i, result) } @@ -425,7 +425,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "CheckExpression" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_check_expression_def(this, result, _, _) } + final UnannotatedType getName() { swift_check_expression_def(this, result, _, _) } /** Gets the node corresponding to the field `op`. */ final string getOp() { @@ -741,7 +741,7 @@ module Swift { final AstNode getKey(int i) { swift_dictionary_type_key(this, i, result) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_dictionary_type_name(this, i, result) } + final UnannotatedType getName(int i) { swift_dictionary_type_name(this, i, result) } /** Gets the node corresponding to the field `value`. */ final AstNode getValue(int i) { swift_dictionary_type_value(this, i, result) } @@ -881,7 +881,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "EnumTypeParameters" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_enum_type_parameters_name(this, i, result) } + final UnannotatedType getName(int i) { swift_enum_type_parameters_name(this, i, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_enum_type_parameters_child(this, i, result) } @@ -907,7 +907,7 @@ module Swift { final AstNode getMustEqual(int i) { swift_equality_constraint_must_equal(this, i, result) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_equality_constraint_def(this, result) } + final UnannotatedType getName() { swift_equality_constraint_def(this, result) } /** Gets the `i`th child of this node. */ final Attribute getChild(int i) { swift_equality_constraint_child(this, i, result) } @@ -958,7 +958,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ExistentialType" } /** Gets the child of this node. */ - final AstNode getChild() { swift_existential_type_def(this, result) } + final UnannotatedType getChild() { swift_existential_type_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_existential_type_def(this, result) } @@ -1062,10 +1062,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "FunctionType" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_function_type_def(this, result, _) } + final UnannotatedType getName() { swift_function_type_def(this, result, _) } /** Gets the node corresponding to the field `params`. */ - final AstNode getParams() { swift_function_type_def(this, _, result) } + final UnannotatedType getParams() { swift_function_type_def(this, _, result) } /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType(int i) { swift_function_type_return_type(this, i, result) } @@ -1141,7 +1141,7 @@ module Swift { } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_if_condition_name(this, result) } + final UnannotatedType getName() { swift_if_condition_name(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_if_condition_child(this, i, result) } @@ -1221,7 +1221,7 @@ module Swift { } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_inheritance_constraint_def(this, result) } + final UnannotatedType getName() { swift_inheritance_constraint_def(this, result) } /** Gets the `i`th child of this node. */ final Attribute getChild(int i) { swift_inheritance_constraint_child(this, i, result) } @@ -1346,7 +1346,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "LambdaFunctionType" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_lambda_function_type_name(this, result) } + final UnannotatedType getName() { swift_lambda_function_type_name(this, result) } /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType(int i) { swift_lambda_function_type_return_type(this, i, result) } @@ -1512,7 +1512,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "Metatype" } /** Gets the child of this node. */ - final AstNode getChild() { swift_metatype_def(this, result) } + final UnannotatedType getChild() { swift_metatype_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_metatype_def(this, result) } @@ -1673,7 +1673,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "OpaqueType" } /** Gets the child of this node. */ - final AstNode getChild() { swift_opaque_type_def(this, result) } + final UnannotatedType getChild() { swift_opaque_type_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_opaque_type_def(this, result) } @@ -1800,7 +1800,7 @@ module Swift { final SimpleIdentifier getBoundIdentifier() { swift_pattern_bound_identifier(this, result) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_pattern_name(this, result) } + final UnannotatedType getName() { swift_pattern_name(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_pattern_child(this, i, result) } @@ -1966,7 +1966,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ProtocolCompositionType" } /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_protocol_composition_type_child(this, i, result) } + final UnannotatedType getChild(int i) { swift_protocol_composition_type_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { @@ -2301,7 +2301,7 @@ module Swift { } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_subscript_declaration_name(this, result) } + final UnannotatedType getName() { swift_subscript_declaration_name(this, result) } /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType(int i) { swift_subscript_declaration_return_type(this, i, result) } @@ -2417,7 +2417,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "ThrowsClause" } /** Gets the node corresponding to the field `type`. */ - final AstNode getType() { swift_throws_clause_def(this, result) } + final UnannotatedType getType() { swift_throws_clause_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_throws_clause_def(this, result) } @@ -2512,7 +2512,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypeAnnotation" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_type_annotation_def(this, result) } + final UnannotatedType getName() { swift_type_annotation_def(this, result) } /** Gets the node corresponding to the field `type`. */ final AstNode getType(int i) { swift_type_annotation_type(this, i, result) } @@ -2529,7 +2529,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypeArguments" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_type_arguments_name(this, i, result) } + final UnannotatedType getName(int i) { swift_type_arguments_name(this, i, result) } /** Gets the `i`th child of this node. */ final TypeModifiers getChild(int i) { swift_type_arguments_child(this, i, result) } @@ -2588,7 +2588,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypePackExpansion" } /** Gets the child of this node. */ - final AstNode getChild() { swift_type_pack_expansion_def(this, result) } + final UnannotatedType getChild() { swift_type_pack_expansion_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_type_pack_expansion_def(this, result) } @@ -2600,7 +2600,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypeParameter" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_type_parameter_name(this, result) } + final UnannotatedType getName() { swift_type_parameter_name(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_type_parameter_child(this, i, result) } @@ -2631,7 +2631,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypeParameterPack" } /** Gets the child of this node. */ - final AstNode getChild() { swift_type_parameter_pack_def(this, result) } + final UnannotatedType getChild() { swift_type_parameter_pack_def(this, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_type_parameter_pack_def(this, result) } @@ -2671,6 +2671,8 @@ module Swift { } } + class UnannotatedType extends @swift_unannotated_type, AstNode { } + /** A class representing `user_type` nodes. */ class UserType extends @swift_user_type, AstNode { /** Gets the name of the primary QL class for this element. */ diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 3466de92c921..d78f5fe5fc68 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -156,7 +156,7 @@ swift_array_literal_def( unique int id: @swift_array_literal ); -@swift_array_type_element_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_array_type_element_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_array_type, index] swift_array_type_element( @@ -165,16 +165,12 @@ swift_array_type_element( unique int element: @swift_array_type_element_type ref ); -@swift_array_type_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_array_type_def( unique int id: @swift_array_type, - int name: @swift_array_type_name_type ref + int name: @swift_unannotated_type ref ); -@swift_as_expression_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - -@swift_as_expression_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_as_expression_type_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_as_expression, index] swift_as_expression_type( @@ -186,7 +182,7 @@ swift_as_expression_type( swift_as_expression_def( unique int id: @swift_as_expression, int expr: @swift_expression ref, - int name: @swift_as_expression_name_type ref, + int name: @swift_unannotated_type ref, int child: @swift_token_as_operator ref ); @@ -207,7 +203,7 @@ swift_assignment_def( int target: @swift_directly_assignable_expression ref ); -@swift_associatedtype_declaration_default_value_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_associatedtype_declaration_default_value_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_associatedtype_declaration, index] swift_associatedtype_declaration_default_value( @@ -216,7 +212,7 @@ swift_associatedtype_declaration_default_value( unique int default_value: @swift_associatedtype_declaration_default_value_type ref ); -@swift_associatedtype_declaration_must_inherit_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_associatedtype_declaration_must_inherit_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_associatedtype_declaration, index] swift_associatedtype_declaration_must_inherit( @@ -225,7 +221,7 @@ swift_associatedtype_declaration_must_inherit( unique int must_inherit: @swift_associatedtype_declaration_must_inherit_type ref ); -@swift_associatedtype_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_token_type_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_associatedtype_declaration_name_type = @swift_token_type_identifier | @swift_unannotated_type #keyset[swift_associatedtype_declaration, index] swift_associatedtype_declaration_name( @@ -382,14 +378,12 @@ swift_catch_block_def( unique int id: @swift_catch_block ); -@swift_check_expression_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - case @swift_check_expression.op of 0 = @swift_check_expression_is ; -@swift_check_expression_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_check_expression_type_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_check_expression, index] swift_check_expression_type( @@ -400,7 +394,7 @@ swift_check_expression_type( swift_check_expression_def( unique int id: @swift_check_expression, - int name: @swift_check_expression_name_type ref, + int name: @swift_unannotated_type ref, int op: int ref, int target: @swift_expression ref ); @@ -429,7 +423,7 @@ case @swift_class_declaration.declaration_kind of ; -@swift_class_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_token_type_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_class_declaration_name_type = @swift_token_type_identifier | @swift_unannotated_type @swift_class_declaration_child_type = @swift_attribute | @swift_inheritance_specifier | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier | @swift_type_constraints | @swift_type_parameters @@ -613,7 +607,7 @@ swift_dictionary_literal_def( unique int id: @swift_dictionary_literal ); -@swift_dictionary_type_key_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_dictionary_type_key_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_dictionary_type, index] swift_dictionary_type_key( @@ -622,16 +616,14 @@ swift_dictionary_type_key( unique int key__: @swift_dictionary_type_key_type ref ); -@swift_dictionary_type_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - #keyset[swift_dictionary_type, index] swift_dictionary_type_name( int swift_dictionary_type: @swift_dictionary_type ref, int index: int ref, - unique int name: @swift_dictionary_type_name_type ref + unique int name: @swift_unannotated_type ref ); -@swift_dictionary_type_value_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_dictionary_type_value_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_dictionary_type, index] swift_dictionary_type_value( @@ -743,13 +735,11 @@ swift_enum_entry_def( unique int id: @swift_enum_entry ); -@swift_enum_type_parameters_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - #keyset[swift_enum_type_parameters, index] swift_enum_type_parameters_name( int swift_enum_type_parameters: @swift_enum_type_parameters ref, int index: int ref, - unique int name: @swift_enum_type_parameters_name_type ref + unique int name: @swift_unannotated_type ref ); @swift_enum_type_parameters_child_type = @swift_expression | @swift_token_wildcard_pattern | @swift_type_modifiers @@ -765,7 +755,7 @@ swift_enum_type_parameters_def( unique int id: @swift_enum_type_parameters ); -@swift_equality_constraint_constrained_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_identifier | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_reserved_word | @swift_token_simple_identifier | @swift_unannotated_type #keyset[swift_equality_constraint, index] swift_equality_constraint_constrained_type( @@ -774,7 +764,7 @@ swift_equality_constraint_constrained_type( unique int constrained_type: @swift_equality_constraint_constrained_type_type ref ); -@swift_equality_constraint_must_equal_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_equality_constraint_must_equal_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_equality_constraint, index] swift_equality_constraint_must_equal( @@ -783,8 +773,6 @@ swift_equality_constraint_must_equal( unique int must_equal: @swift_equality_constraint_must_equal_type ref ); -@swift_equality_constraint_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - #keyset[swift_equality_constraint, index] swift_equality_constraint_child( int swift_equality_constraint: @swift_equality_constraint ref, @@ -794,7 +782,7 @@ swift_equality_constraint_child( swift_equality_constraint_def( unique int id: @swift_equality_constraint, - int name: @swift_equality_constraint_name_type ref + int name: @swift_unannotated_type ref ); case @swift_equality_expression.op of @@ -812,11 +800,9 @@ swift_equality_expression_def( int rhs: @swift_expression ref ); -@swift_existential_type_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_existential_type_def( unique int id: @swift_existential_type, - int child: @swift_existential_type_child_type ref + int child: @swift_unannotated_type ref ); @swift_expression = @swift_additive_expression | @swift_array_literal | @swift_as_expression | @swift_assignment | @swift_await_expression | @swift_bitwise_operation | @swift_call_expression | @swift_check_expression | @swift_comparison_expression | @swift_conjunction_expression | @swift_constructor_expression | @swift_dictionary_literal | @swift_directive | @swift_disjunction_expression | @swift_equality_expression | @swift_if_statement | @swift_infix_expression | @swift_key_path_expression | @swift_key_path_string_expression | @swift_lambda_literal | @swift_line_string_literal | @swift_macro_invocation | @swift_multi_line_string_literal | @swift_multiplicative_expression | @swift_navigation_expression | @swift_nil_coalescing_expression | @swift_open_end_range_expression | @swift_open_start_range_expression | @swift_optional_chain_marker | @swift_playground_literal | @swift_postfix_expression | @swift_prefix_expression | @swift_range_expression | @swift_raw_string_literal | @swift_referenceable_operator | @swift_reserved_word | @swift_selector_expression | @swift_switch_statement | @swift_ternary_expression | @swift_token_bin_literal | @swift_token_boolean_literal | @swift_token_diagnostic | @swift_token_fully_open_range | @swift_token_hex_literal | @swift_token_integer_literal | @swift_token_oct_literal | @swift_token_real_literal | @swift_token_regex_literal | @swift_token_self_expression | @swift_token_simple_identifier | @swift_token_special_literal | @swift_token_super_expression | @swift_try_expression | @swift_tuple_expression | @swift_value_pack_expansion | @swift_value_parameter_pack @@ -857,7 +843,7 @@ swift_function_declaration_default_value( unique int default_value: @swift_expression ref ); -@swift_function_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_referenceable_operator | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier | @swift_unannotated_type #keyset[swift_function_declaration, index] swift_function_declaration_name( @@ -866,7 +852,7 @@ swift_function_declaration_name( unique int name: @swift_function_declaration_name_type ref ); -@swift_function_declaration_return_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_function_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_function_declaration, index] swift_function_declaration_return_type( @@ -889,11 +875,7 @@ swift_function_declaration_def( int body: @swift_function_body ref ); -@swift_function_type_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - -@swift_function_type_params_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - -@swift_function_type_return_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_function_type_return_type_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_function_type, index] swift_function_type_return_type( @@ -911,8 +893,8 @@ swift_function_type_child( swift_function_type_def( unique int id: @swift_function_type, - int name: @swift_function_type_name_type ref, - int params: @swift_function_type_params_type ref + int name: @swift_unannotated_type ref, + int params: @swift_unannotated_type ref ); @swift_getter_specifier_child_type = @swift_throws_clause | @swift_token_mutation_modifier | @swift_token_throws @@ -964,11 +946,9 @@ swift_if_condition_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_if_condition_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_if_condition_name( unique int swift_if_condition: @swift_if_condition ref, - unique int name: @swift_if_condition_name_type ref + unique int name: @swift_unannotated_type ref ); @swift_if_condition_child_type = @swift_availability_condition | @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type_annotation | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_where_clause @@ -1024,7 +1004,7 @@ swift_infix_expression_def( int rhs: @swift_expression ref ); -@swift_inheritance_constraint_constrained_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_identifier | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_inheritance_constraint_constrained_type_type = @swift_identifier | @swift_reserved_word | @swift_token_simple_identifier | @swift_unannotated_type #keyset[swift_inheritance_constraint, index] swift_inheritance_constraint_constrained_type( @@ -1033,7 +1013,7 @@ swift_inheritance_constraint_constrained_type( unique int constrained_type: @swift_inheritance_constraint_constrained_type_type ref ); -@swift_inheritance_constraint_inherits_from_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_inheritance_constraint_inherits_from_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_inheritance_constraint, index] swift_inheritance_constraint_inherits_from( @@ -1042,8 +1022,6 @@ swift_inheritance_constraint_inherits_from( unique int inherits_from: @swift_inheritance_constraint_inherits_from_type ref ); -@swift_inheritance_constraint_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - #keyset[swift_inheritance_constraint, index] swift_inheritance_constraint_child( int swift_inheritance_constraint: @swift_inheritance_constraint ref, @@ -1053,7 +1031,7 @@ swift_inheritance_constraint_child( swift_inheritance_constraint_def( unique int id: @swift_inheritance_constraint, - int name: @swift_inheritance_constraint_name_type ref + int name: @swift_unannotated_type ref ); @swift_inheritance_specifier_inherits_from_type = @swift_function_type | @swift_suppressed_constraint | @swift_user_type @@ -1138,14 +1116,12 @@ swift_key_path_string_expression_def( int child: @swift_expression ref ); -@swift_lambda_function_type_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_lambda_function_type_name( unique int swift_lambda_function_type: @swift_lambda_function_type ref, - unique int name: @swift_lambda_function_type_name_type ref + unique int name: @swift_unannotated_type ref ); -@swift_lambda_function_type_return_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_lambda_function_type_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_lambda_function_type, index] swift_lambda_function_type_return_type( @@ -1206,7 +1182,7 @@ swift_lambda_parameter_external_name( unique int external_name: @swift_token_simple_identifier ref ); -@swift_lambda_parameter_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_lambda_parameter_name_type = @swift_token_simple_identifier | @swift_unannotated_type #keyset[swift_lambda_parameter, index] swift_lambda_parameter_name( @@ -1215,7 +1191,7 @@ swift_lambda_parameter_name( unique int name: @swift_lambda_parameter_name_type ref ); -@swift_lambda_parameter_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_lambda_parameter_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_lambda_parameter, index] swift_lambda_parameter_type( @@ -1267,7 +1243,7 @@ swift_macro_declaration_definition( unique int definition: @swift_macro_definition ref ); -@swift_macro_declaration_child_type = @swift_array_type | @swift_attribute | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_modifiers | @swift_opaque_type | @swift_optional_type | @swift_parameter | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_constraints | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_type_parameters | @swift_user_type +@swift_macro_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_parameter | @swift_token_simple_identifier | @swift_type_constraints | @swift_type_parameters | @swift_unannotated_type #keyset[swift_macro_declaration, index] swift_macro_declaration_child( @@ -1300,11 +1276,9 @@ swift_macro_invocation_def( unique int id: @swift_macro_invocation ); -@swift_metatype_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_metatype_def( unique int id: @swift_metatype, - int child: @swift_metatype_child_type ref + int child: @swift_unannotated_type ref ); @swift_modifiers_child_type = @swift_attribute | @swift_token_function_modifier | @swift_token_inheritance_modifier | @swift_token_member_modifier | @swift_token_mutation_modifier | @swift_token_ownership_modifier | @swift_token_parameter_modifier | @swift_token_property_behavior_modifier | @swift_token_property_modifier | @swift_token_visibility_modifier @@ -1397,11 +1371,9 @@ swift_nil_coalescing_expression_def( int value: @swift_expression ref ); -@swift_opaque_type_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_opaque_type_def( unique int id: @swift_opaque_type, - int child: @swift_opaque_type_child_type ref + int child: @swift_unannotated_type ref ); swift_open_end_range_expression_def( @@ -1444,7 +1416,7 @@ swift_parameter_external_name( unique int external_name: @swift_token_simple_identifier ref ); -@swift_parameter_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_parameter_name_type = @swift_token_simple_identifier | @swift_unannotated_type #keyset[swift_parameter, index] swift_parameter_name( @@ -1453,7 +1425,7 @@ swift_parameter_name( unique int name: @swift_parameter_name_type ref ); -@swift_parameter_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_parameter_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_parameter, index] swift_parameter_type( @@ -1487,11 +1459,9 @@ swift_pattern_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_pattern_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_pattern_name( unique int swift_pattern: @swift_pattern ref, - unique int name: @swift_pattern_name_type ref + unique int name: @swift_unannotated_type ref ); @swift_pattern_child_type = @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern @@ -1625,13 +1595,11 @@ swift_protocol_body_def( unique int id: @swift_protocol_body ); -@swift_protocol_composition_type_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - #keyset[swift_protocol_composition_type, index] swift_protocol_composition_type_child( int swift_protocol_composition_type: @swift_protocol_composition_type ref, int index: int ref, - unique int child: @swift_protocol_composition_type_child_type ref + unique int child: @swift_unannotated_type ref ); swift_protocol_composition_type_def( @@ -1666,7 +1634,7 @@ swift_protocol_function_declaration_default_value( unique int default_value: @swift_expression ref ); -@swift_protocol_function_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_referenceable_operator | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_protocol_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier | @swift_unannotated_type #keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_name( @@ -1675,7 +1643,7 @@ swift_protocol_function_declaration_name( unique int name: @swift_protocol_function_declaration_name_type ref ); -@swift_protocol_function_declaration_return_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_protocol_function_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_return_type( @@ -1850,14 +1818,12 @@ swift_subscript_declaration_default_value( unique int default_value: @swift_expression ref ); -@swift_subscript_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_subscript_declaration_name( unique int swift_subscript_declaration: @swift_subscript_declaration ref, - unique int name: @swift_subscript_declaration_name_type ref + unique int name: @swift_unannotated_type ref ); -@swift_subscript_declaration_return_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_subscript_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_subscript_declaration, index] swift_subscript_declaration_return_type( @@ -1921,11 +1887,9 @@ swift_ternary_expression_def( int if_true: @swift_expression ref ); -@swift_throws_clause_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_throws_clause_def( unique int id: @swift_throws_clause, - int type__: @swift_throws_clause_type_type ref + int type__: @swift_unannotated_type ref ); swift_try_expression_def( @@ -1975,7 +1939,7 @@ swift_tuple_type_item_element( unique int element: @swift_tuple_type_item_element_type ref ); -@swift_tuple_type_item_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_token_simple_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_tuple_type_item_name_type = @swift_token_simple_identifier | @swift_unannotated_type #keyset[swift_tuple_type_item, index] swift_tuple_type_item_name( @@ -1984,7 +1948,7 @@ swift_tuple_type_item_name( unique int name: @swift_tuple_type_item_name_type ref ); -@swift_tuple_type_item_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_tuple_type_item_type_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_tuple_type_item, index] swift_tuple_type_item_type( @@ -2006,9 +1970,7 @@ swift_tuple_type_item_def( unique int id: @swift_tuple_type_item ); -@swift_type_annotation_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - -@swift_type_annotation_type_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_reserved_word | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_type_annotation_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_type_annotation, index] swift_type_annotation_type( @@ -2019,16 +1981,14 @@ swift_type_annotation_type( swift_type_annotation_def( unique int id: @swift_type_annotation, - int name: @swift_type_annotation_name_type ref + int name: @swift_unannotated_type ref ); -@swift_type_arguments_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - #keyset[swift_type_arguments, index] swift_type_arguments_name( int swift_type_arguments: @swift_type_arguments ref, int index: int ref, - unique int name: @swift_type_arguments_name_type ref + unique int name: @swift_unannotated_type ref ); #keyset[swift_type_arguments, index] @@ -2073,18 +2033,14 @@ swift_type_modifiers_def( unique int id: @swift_type_modifiers ); -@swift_type_pack_expansion_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_type_pack_expansion_def( unique int id: @swift_type_pack_expansion, - int child: @swift_type_pack_expansion_child_type ref + int child: @swift_unannotated_type ref ); -@swift_type_parameter_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_type_parameter_name( unique int swift_type_parameter: @swift_type_parameter ref, - unique int name: @swift_type_parameter_name_type ref + unique int name: @swift_unannotated_type ref ); @swift_type_parameter_child_type = @swift_token_type_identifier | @swift_type_modifiers | @swift_type_parameter_modifiers | @swift_type_parameter_pack @@ -2111,11 +2067,9 @@ swift_type_parameter_modifiers_def( unique int id: @swift_type_parameter_modifiers ); -@swift_type_parameter_pack_child_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type - swift_type_parameter_pack_def( unique int id: @swift_type_parameter_pack, - int child: @swift_type_parameter_pack_child_type ref + int child: @swift_unannotated_type ref ); @swift_type_parameters_child_type = @swift_type_constraints | @swift_type_parameter @@ -2131,7 +2085,7 @@ swift_type_parameters_def( unique int id: @swift_type_parameters ); -@swift_typealias_declaration_name_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_token_type_identifier | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_typealias_declaration_name_type = @swift_token_type_identifier | @swift_unannotated_type #keyset[swift_typealias_declaration, index] swift_typealias_declaration_name( @@ -2140,7 +2094,7 @@ swift_typealias_declaration_name( unique int name: @swift_typealias_declaration_name_type ref ); -@swift_typealias_declaration_value_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_modifiers | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type +@swift_typealias_declaration_value_type = @swift_type_modifiers | @swift_unannotated_type #keyset[swift_typealias_declaration, index] swift_typealias_declaration_value( @@ -2162,6 +2116,8 @@ swift_typealias_declaration_def( unique int id: @swift_typealias_declaration ); +@swift_unannotated_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type + @swift_user_type_child_type = @swift_token_type_identifier | @swift_type_arguments #keyset[swift_user_type, index] From 91a46f0340c77168b28756ae419e3ce48cbe4283 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:37:29 +0000 Subject: [PATCH 13/24] unified: stop `"!"` bleeding through You know the drill. We just make an anonymous node named instead. In this case, however, we have to be a bit more clever about how to rewrite it. We turn the sequence of a type followed by an optional ! into a _choice_ between mere type or type followed by bang (the latter being our new named node). --- .../extractor/tree-sitter-swift/grammar.js | 4 +++- .../tree-sitter-swift/node-types.yml | 23 +++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 01f714285c78..321ceb01363e 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -401,7 +401,9 @@ module.exports = grammar({ type_annotation: ($) => seq(":", field("type", $._possibly_implicitly_unwrapped_type)), _possibly_implicitly_unwrapped_type: ($) => - seq($._type, optional(token.immediate("!"))), + choice($._type, $.implicitly_unwrapped_type), + implicitly_unwrapped_type: ($) => + seq($._type, token.immediate("!")), _type: ($) => prec.right( PRECS.ty, diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 3e9d6bba9685..b77df29133b7 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -226,7 +226,7 @@ named: body: function_body default_value*: expression name+: [referenceable_operator, simple_identifier, unannotated_type] - return_type*: ["!", type_modifiers, unannotated_type] + return_type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] function_modifier: function_type: $children?: [throws, throws_clause] @@ -248,6 +248,9 @@ named: if_statement: $children*: [else, if_statement, statements] condition+: if_condition + implicitly_unwrapped_type: + $children?: type_modifiers + name: unannotated_type import_declaration: $children+: [identifier, modifiers] infix_expression: @@ -257,8 +260,8 @@ named: inheritance_constraint: $children*: attribute constrained_type+: [".", identifier, simple_identifier, unannotated_type] - inherits_from+: ["!", type_modifiers, unannotated_type] - name: unannotated_type + inherits_from+: [implicitly_unwrapped_type, type_modifiers, unannotated_type] + name?: unannotated_type inheritance_modifier: inheritance_specifier: inherits_from: [function_type, suppressed_constraint, user_type] @@ -280,7 +283,7 @@ named: lambda_function_type: $children*: [lambda_function_type_parameters, throws, throws_clause] name?: unannotated_type - return_type*: ["!", type_modifiers, unannotated_type] + return_type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] lambda_function_type_parameters: $children+: lambda_parameter lambda_literal: @@ -291,7 +294,7 @@ named: $children?: [parameter_modifiers, self_expression] external_name?: simple_identifier name*: [simple_identifier, unannotated_type] - type*: ["!", type_modifiers, unannotated_type] + type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] line_str_text: line_string_literal: interpolation*: interpolated_expression @@ -348,7 +351,7 @@ named: $children?: parameter_modifiers external_name?: simple_identifier name+: [simple_identifier, unannotated_type] - type+: ["!", type_modifiers, unannotated_type] + type+: [implicitly_unwrapped_type, type_modifiers, unannotated_type] parameter_modifier: parameter_modifiers: $children+: parameter_modifier @@ -391,7 +394,7 @@ named: $children*: [attribute, modifiers, parameter, statements, throws, throws_clause, type_constraints, type_parameters] default_value*: expression name*: [referenceable_operator, simple_identifier, unannotated_type] - return_type*: ["!", type_modifiers, unannotated_type] + return_type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] protocol_property_declaration: $children+: [modifiers, protocol_property_requirements, type_annotation, type_constraints] name: pattern @@ -437,7 +440,7 @@ named: $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] default_value*: expression name?: unannotated_type - return_type*: ["!", type_modifiers, unannotated_type] + return_type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] super_expression: suppressed_constraint: suppressed: type_identifier @@ -472,8 +475,8 @@ named: name*: [simple_identifier, unannotated_type] type*: [type_modifiers, unannotated_type] type_annotation: - name: unannotated_type - type+: ["!", type_modifiers, unannotated_type] + name?: unannotated_type + type+: [implicitly_unwrapped_type, type_modifiers, unannotated_type] type_arguments: $children*: type_modifiers name+: unannotated_type From caa9b04ad8faa88f31d558542a2eaa3aa97654e6 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 15:37:47 +0000 Subject: [PATCH 14/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 26 +++++++++++++--- unified/ql/lib/unified.dbscheme | 44 +++++++++++++++++++-------- 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index e2be15932bed..8fd4e61ed323 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -1171,6 +1171,24 @@ module Swift { } } + /** A class representing `implicitly_unwrapped_type` nodes. */ + class ImplicitlyUnwrappedType extends @swift_implicitly_unwrapped_type, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "ImplicitlyUnwrappedType" } + + /** Gets the node corresponding to the field `name`. */ + final UnannotatedType getName() { swift_implicitly_unwrapped_type_def(this, result) } + + /** Gets the child of this node. */ + final TypeModifiers getChild() { swift_implicitly_unwrapped_type_child(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_implicitly_unwrapped_type_def(this, result) or + swift_implicitly_unwrapped_type_child(this, result) + } + } + /** A class representing `import_declaration` nodes. */ class ImportDeclaration extends @swift_import_declaration, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1221,7 +1239,7 @@ module Swift { } /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_inheritance_constraint_def(this, result) } + final UnannotatedType getName() { swift_inheritance_constraint_name(this, result) } /** Gets the `i`th child of this node. */ final Attribute getChild(int i) { swift_inheritance_constraint_child(this, i, result) } @@ -1230,7 +1248,7 @@ module Swift { final override AstNode getAFieldOrChild() { swift_inheritance_constraint_constrained_type(this, _, result) or swift_inheritance_constraint_inherits_from(this, _, result) or - swift_inheritance_constraint_def(this, result) or + swift_inheritance_constraint_name(this, result) or swift_inheritance_constraint_child(this, _, result) } } @@ -2512,14 +2530,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypeAnnotation" } /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_type_annotation_def(this, result) } + final UnannotatedType getName() { swift_type_annotation_name(this, result) } /** Gets the node corresponding to the field `type`. */ final AstNode getType(int i) { swift_type_annotation_type(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_type_annotation_def(this, result) or swift_type_annotation_type(this, _, result) + swift_type_annotation_name(this, result) or swift_type_annotation_type(this, _, result) } } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index d78f5fe5fc68..748a2dfc4a59 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -852,7 +852,7 @@ swift_function_declaration_name( unique int name: @swift_function_declaration_name_type ref ); -@swift_function_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_function_declaration, index] swift_function_declaration_return_type( @@ -984,6 +984,16 @@ swift_if_statement_def( unique int id: @swift_if_statement ); +swift_implicitly_unwrapped_type_child( + unique int swift_implicitly_unwrapped_type: @swift_implicitly_unwrapped_type ref, + unique int child: @swift_type_modifiers ref +); + +swift_implicitly_unwrapped_type_def( + unique int id: @swift_implicitly_unwrapped_type, + int name: @swift_unannotated_type ref +); + @swift_import_declaration_child_type = @swift_identifier | @swift_modifiers #keyset[swift_import_declaration, index] @@ -1013,7 +1023,7 @@ swift_inheritance_constraint_constrained_type( unique int constrained_type: @swift_inheritance_constraint_constrained_type_type ref ); -@swift_inheritance_constraint_inherits_from_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_inheritance_constraint_inherits_from_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_inheritance_constraint, index] swift_inheritance_constraint_inherits_from( @@ -1022,6 +1032,11 @@ swift_inheritance_constraint_inherits_from( unique int inherits_from: @swift_inheritance_constraint_inherits_from_type ref ); +swift_inheritance_constraint_name( + unique int swift_inheritance_constraint: @swift_inheritance_constraint ref, + unique int name: @swift_unannotated_type ref +); + #keyset[swift_inheritance_constraint, index] swift_inheritance_constraint_child( int swift_inheritance_constraint: @swift_inheritance_constraint ref, @@ -1030,8 +1045,7 @@ swift_inheritance_constraint_child( ); swift_inheritance_constraint_def( - unique int id: @swift_inheritance_constraint, - int name: @swift_unannotated_type ref + unique int id: @swift_inheritance_constraint ); @swift_inheritance_specifier_inherits_from_type = @swift_function_type | @swift_suppressed_constraint | @swift_user_type @@ -1121,7 +1135,7 @@ swift_lambda_function_type_name( unique int name: @swift_unannotated_type ref ); -@swift_lambda_function_type_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_lambda_function_type_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_lambda_function_type, index] swift_lambda_function_type_return_type( @@ -1191,7 +1205,7 @@ swift_lambda_parameter_name( unique int name: @swift_lambda_parameter_name_type ref ); -@swift_lambda_parameter_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_lambda_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_lambda_parameter, index] swift_lambda_parameter_type( @@ -1425,7 +1439,7 @@ swift_parameter_name( unique int name: @swift_parameter_name_type ref ); -@swift_parameter_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_parameter, index] swift_parameter_type( @@ -1643,7 +1657,7 @@ swift_protocol_function_declaration_name( unique int name: @swift_protocol_function_declaration_name_type ref ); -@swift_protocol_function_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_return_type( @@ -1823,7 +1837,7 @@ swift_subscript_declaration_name( unique int name: @swift_unannotated_type ref ); -@swift_subscript_declaration_return_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +@swift_subscript_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_subscript_declaration, index] swift_subscript_declaration_return_type( @@ -1970,7 +1984,12 @@ swift_tuple_type_item_def( unique int id: @swift_tuple_type_item ); -@swift_type_annotation_type_type = @swift_reserved_word | @swift_type_modifiers | @swift_unannotated_type +swift_type_annotation_name( + unique int swift_type_annotation: @swift_type_annotation ref, + unique int name: @swift_unannotated_type ref +); + +@swift_type_annotation_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type #keyset[swift_type_annotation, index] swift_type_annotation_type( @@ -1980,8 +1999,7 @@ swift_type_annotation_type( ); swift_type_annotation_def( - unique int id: @swift_type_annotation, - int name: @swift_unannotated_type ref + unique int id: @swift_type_annotation ); #keyset[swift_type_arguments, index] @@ -2305,7 +2323,7 @@ case @swift_token.kind of ; -@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_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 +@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 swift_ast_node_location( unique int node: @swift_ast_node ref, From 8b977ef8e15b9779bbfa5b27d6f123aebf9a64a3 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 16:07:12 +0000 Subject: [PATCH 15/24] unified: Get rid of some `"."` bleed Adds a new type `nested_type_identifier`, which contains the choice-branch that previously allowed those tokens to bleed through into the closest parent field. --- unified/extractor/tree-sitter-swift/grammar.js | 12 +++++------- unified/extractor/tree-sitter-swift/node-types.yml | 6 ++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 321ceb01363e..bfe4c9f6ddd4 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1592,13 +1592,11 @@ module.exports = grammar({ choice($._equal_sign, $._eq_eq), field("must_equal", $._type) ), - _constrained_type: ($) => - choice( - $.identifier, - seq( - $.unannotated_type, - optional(seq(".", sep1($.simple_identifier, "."))) - ) + _constrained_type: ($) => choice($.identifier, $.nested_type_identifier), + nested_type_identifier: ($) => + seq( + $.unannotated_type, + optional(seq(".", sep1($.simple_identifier, "."))) ), _class_member_separator: ($) => choice($._semi, $.multiline_comment), _class_member_declarations: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index b77df29133b7..60ee02abfbfc 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -203,7 +203,7 @@ named: name*: unannotated_type equality_constraint: $children*: attribute - constrained_type+: [".", identifier, simple_identifier, unannotated_type] + constrained_type: [identifier, nested_type_identifier] must_equal+: [type_modifiers, unannotated_type] name: unannotated_type equality_expression: @@ -259,7 +259,7 @@ named: rhs: expression inheritance_constraint: $children*: attribute - constrained_type+: [".", identifier, simple_identifier, unannotated_type] + constrained_type: [identifier, nested_type_identifier] inherits_from+: [implicitly_unwrapped_type, type_modifiers, unannotated_type] name?: unannotated_type inheritance_modifier: @@ -330,6 +330,8 @@ named: target+: ["(", ")", array_type, dictionary_type, existential_type, expression, opaque_type, user_type] navigation_suffix: suffix: [integer_literal, simple_identifier] + nested_type_identifier: + $children+: [simple_identifier, unannotated_type] nil_coalescing_expression: if_nil: expression value: expression From a720e258aca32e2d8783b7ffc860bbddf3f6715f Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 16:07:21 +0000 Subject: [PATCH 16/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 30 ++++++++++++++-------- unified/ql/lib/unified.dbscheme | 37 ++++++++++++++------------- 2 files changed, 39 insertions(+), 28 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index 8fd4e61ed323..b71c807a2abc 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -899,24 +899,22 @@ module Swift { final override string getAPrimaryQlClass() { result = "EqualityConstraint" } /** Gets the node corresponding to the field `constrained_type`. */ - final AstNode getConstrainedType(int i) { - swift_equality_constraint_constrained_type(this, i, result) - } + final AstNode getConstrainedType() { swift_equality_constraint_def(this, result, _) } /** Gets the node corresponding to the field `must_equal`. */ final AstNode getMustEqual(int i) { swift_equality_constraint_must_equal(this, i, result) } /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_equality_constraint_def(this, result) } + final UnannotatedType getName() { swift_equality_constraint_def(this, _, result) } /** Gets the `i`th child of this node. */ final Attribute getChild(int i) { swift_equality_constraint_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_equality_constraint_constrained_type(this, _, result) or + swift_equality_constraint_def(this, result, _) or swift_equality_constraint_must_equal(this, _, result) or - swift_equality_constraint_def(this, result) or + swift_equality_constraint_def(this, _, result) or swift_equality_constraint_child(this, _, result) } } @@ -1229,9 +1227,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "InheritanceConstraint" } /** Gets the node corresponding to the field `constrained_type`. */ - final AstNode getConstrainedType(int i) { - swift_inheritance_constraint_constrained_type(this, i, result) - } + final AstNode getConstrainedType() { swift_inheritance_constraint_def(this, result) } /** Gets the node corresponding to the field `inherits_from`. */ final AstNode getInheritsFrom(int i) { @@ -1246,7 +1242,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_inheritance_constraint_constrained_type(this, _, result) or + swift_inheritance_constraint_def(this, result) or swift_inheritance_constraint_inherits_from(this, _, result) or swift_inheritance_constraint_name(this, result) or swift_inheritance_constraint_child(this, _, result) @@ -1661,6 +1657,20 @@ module Swift { final override AstNode getAFieldOrChild() { swift_navigation_suffix_def(this, result) } } + /** A class representing `nested_type_identifier` nodes. */ + class NestedTypeIdentifier extends @swift_nested_type_identifier, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "NestedTypeIdentifier" } + + /** Gets the `i`th child of this node. */ + final AstNode getChild(int i) { swift_nested_type_identifier_child(this, i, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_nested_type_identifier_child(this, _, result) + } + } + /** A class representing `nil_coalescing_expression` nodes. */ class NilCoalescingExpression extends @swift_nil_coalescing_expression, AstNode { /** Gets the name of the primary QL class for this element. */ diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 748a2dfc4a59..3b9cf0815d93 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -755,14 +755,7 @@ swift_enum_type_parameters_def( unique int id: @swift_enum_type_parameters ); -@swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_reserved_word | @swift_token_simple_identifier | @swift_unannotated_type - -#keyset[swift_equality_constraint, index] -swift_equality_constraint_constrained_type( - int swift_equality_constraint: @swift_equality_constraint ref, - int index: int ref, - unique int constrained_type: @swift_equality_constraint_constrained_type_type ref -); +@swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier @swift_equality_constraint_must_equal_type = @swift_type_modifiers | @swift_unannotated_type @@ -782,6 +775,7 @@ swift_equality_constraint_child( swift_equality_constraint_def( unique int id: @swift_equality_constraint, + int constrained_type: @swift_equality_constraint_constrained_type_type ref, int name: @swift_unannotated_type ref ); @@ -1014,14 +1008,7 @@ swift_infix_expression_def( int rhs: @swift_expression ref ); -@swift_inheritance_constraint_constrained_type_type = @swift_identifier | @swift_reserved_word | @swift_token_simple_identifier | @swift_unannotated_type - -#keyset[swift_inheritance_constraint, index] -swift_inheritance_constraint_constrained_type( - int swift_inheritance_constraint: @swift_inheritance_constraint ref, - int index: int ref, - unique int constrained_type: @swift_inheritance_constraint_constrained_type_type ref -); +@swift_inheritance_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier @swift_inheritance_constraint_inherits_from_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type @@ -1045,7 +1032,8 @@ swift_inheritance_constraint_child( ); swift_inheritance_constraint_def( - unique int id: @swift_inheritance_constraint + unique int id: @swift_inheritance_constraint, + int constrained_type: @swift_inheritance_constraint_constrained_type_type ref ); @swift_inheritance_specifier_inherits_from_type = @swift_function_type | @swift_suppressed_constraint | @swift_user_type @@ -1379,6 +1367,19 @@ swift_navigation_suffix_def( int suffix: @swift_navigation_suffix_suffix_type ref ); +@swift_nested_type_identifier_child_type = @swift_token_simple_identifier | @swift_unannotated_type + +#keyset[swift_nested_type_identifier, index] +swift_nested_type_identifier_child( + int swift_nested_type_identifier: @swift_nested_type_identifier ref, + int index: int ref, + unique int child: @swift_nested_type_identifier_child_type ref +); + +swift_nested_type_identifier_def( + unique int id: @swift_nested_type_identifier +); + swift_nil_coalescing_expression_def( unique int id: @swift_nil_coalescing_expression, int if_nil: @swift_expression ref, @@ -2323,7 +2324,7 @@ case @swift_token.kind of ; -@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 +@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 swift_ast_node_location( unique int node: @swift_ast_node ref, From 994b27bdbd8cceb54cf044499917867f7e340f22 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 19:19:30 +0000 Subject: [PATCH 17/24] unified: convert _type into a named rule Because `_type` was anonymous, its body was inlined in all of the places it appeared. Because this body contained a `name` field, this field was _also_ inlined. This caused a bunch of nodes to have spurious `name` fields, and for some of them (that already had such a field) it caused that field have multiplicity greater than one. To fix this, we make the `_type` node named, which prevents the errant field from escaping. --- .../extractor/tree-sitter-swift/grammar.js | 38 ++++----- .../tree-sitter-swift/node-types.yml | 83 ++++++++----------- 2 files changed, 54 insertions(+), 67 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index bfe4c9f6ddd4..51a680e05a1e 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -401,13 +401,13 @@ module.exports = grammar({ type_annotation: ($) => seq(":", field("type", $._possibly_implicitly_unwrapped_type)), _possibly_implicitly_unwrapped_type: ($) => - choice($._type, $.implicitly_unwrapped_type), + choice($.type, $.implicitly_unwrapped_type), implicitly_unwrapped_type: ($) => - seq($._type, token.immediate("!")), - _type: ($) => + seq($.type, token.immediate("!")), + type: ($) => prec.right( PRECS.ty, - seq(optional($.type_modifiers), field("name", $.unannotated_type)) + seq(field("modifiers", optional($.type_modifiers)), field("name", $.unannotated_type)) ), unannotated_type: ($) => prec.right( @@ -453,7 +453,7 @@ module.exports = grammar({ seq( optional($._tuple_type_item_identifier), optional($.parameter_modifiers), - field("type", $._type) + field("type", $.type) ) ), _tuple_type_item_identifier: ($) => @@ -471,11 +471,11 @@ module.exports = grammar({ optional($._async_keyword), optional(choice($.throws_clause, $.throws)), $._arrow_operator, - field("return_type", $._type) + field("return_type", $.type) ), - array_type: ($) => seq("[", field("element", $._type), "]"), + array_type: ($) => seq("[", field("element", $.type), "]"), dictionary_type: ($) => - seq("[", field("key", $._type), ":", field("value", $._type), "]"), + seq("[", field("key", $.type), ":", field("value", $.type), "]"), optional_type: ($) => prec.left( seq( @@ -622,7 +622,7 @@ module.exports = grammar({ as_expression: ($) => prec.left( PRECS.as, - seq(field("expr", $.expression), $.as_operator, field("type", $._type)) + seq(field("expr", $.expression), $.as_operator, field("type", $.type)) ), selector_expression: ($) => seq( @@ -699,7 +699,7 @@ module.exports = grammar({ seq( field("target", $.expression), field("op", $._is_operator), - field("type", $._type) + field("type", $.type) ) ), comparison_expression: ($) => @@ -777,7 +777,7 @@ module.exports = grammar({ seq("(", optional(sep1Opt($.value_argument, ",")), ")"), _fn_call_lambda_arguments: ($) => sep1($.lambda_literal, seq(field("name", $.simple_identifier), ":")), - type_arguments: ($) => prec.left(seq("<", sep1Opt($._type, ","), ">")), + type_arguments: ($) => prec.left(seq("<", sep1Opt($.type, ","), ">")), value_arguments: ($) => seq( choice( @@ -1450,7 +1450,7 @@ module.exports = grammar({ field("name", alias($.simple_identifier, $.type_identifier)), optional($.type_parameters), $._equal_sign, - field("value", $._type) + field("value", $.type) ), function_declaration: ($) => prec.right( @@ -1566,7 +1566,7 @@ module.exports = grammar({ seq( optional($.type_parameter_modifiers), $._type_parameter_possibly_packed, - optional(seq(":", $._type)) + optional(seq(":", $.type)) ), _type_parameter_possibly_packed: ($) => choice( @@ -1590,7 +1590,7 @@ module.exports = grammar({ repeat($.attribute), field("constrained_type", $._constrained_type), choice($._equal_sign, $._eq_eq), - field("must_equal", $._type) + field("must_equal", $.type) ), _constrained_type: ($) => choice($.identifier, $.nested_type_identifier), nested_type_identifier: ($) => @@ -1698,7 +1698,7 @@ module.exports = grammar({ optional( seq(optional($.wildcard_pattern), $.simple_identifier, ":") ), - $._type, + $.type, optional(seq($._equal_sign, $.expression)) ), "," @@ -1833,9 +1833,9 @@ module.exports = grammar({ optional($.modifiers), "associatedtype", field("name", alias($.simple_identifier, $.type_identifier)), - optional(seq(":", field("must_inherit", $._type))), + optional(seq(":", field("must_inherit", $.type))), optional($.type_constraints), - optional(seq($._equal_sign, field("default_value", $._type))) + optional(seq($._equal_sign, field("default_value", $.type))) ), //////////////////////////////// // Attributes - https://docs.swift.org/swift-book/ReferenceManual/Attributes.html @@ -1934,8 +1934,8 @@ module.exports = grammar({ ), _type_casting_pattern: ($) => choice( - seq("is", $._type), - seq(alias($._binding_pattern_no_expr, $.pattern), $._as, $._type) + seq("is", $.type), + seq(alias($._binding_pattern_no_expr, $.pattern), $._as, $.type) ), _binding_pattern: ($) => seq( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 60ee02abfbfc..5c4098db84f0 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -79,13 +79,11 @@ named: array_literal: element*: expression array_type: - element+: [type_modifiers, unannotated_type] - name: unannotated_type + element: type as_expression: $children: as_operator expr: expression - name: unannotated_type - type+: [type_modifiers, unannotated_type] + type: type as_operator: assignment: operator: ["%=", "*=", "+=", "-=", "/=", "="] @@ -93,9 +91,9 @@ named: target: directly_assignable_expression associatedtype_declaration: $children*: [modifiers, type_constraints] - default_value*: [type_modifiers, unannotated_type] - must_inherit*: [type_modifiers, unannotated_type] - name+: [type_identifier, unannotated_type] + default_value?: type + must_inherit?: type + name: type_identifier attribute: $children+: [expression, user_type] availability_condition: @@ -126,10 +124,9 @@ named: error?: pattern catch_keyword: check_expression: - name: unannotated_type op: "is" target: expression - type+: [type_modifiers, unannotated_type] + type: type class_body: $children*: [associatedtype_declaration, class_declaration, deinit_declaration, function_declaration, import_declaration, init_declaration, multiline_comment, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] class_declaration: @@ -175,9 +172,8 @@ named: key*: expression value*: expression dictionary_type: - key+: [type_modifiers, unannotated_type] - name+: unannotated_type - value+: [type_modifiers, unannotated_type] + key: type + value: type didset_clause: $children*: [modifiers, simple_identifier, statements] directive: @@ -199,13 +195,11 @@ named: name+: simple_identifier raw_value*: expression enum_type_parameters: - $children*: [expression, type_modifiers, wildcard_pattern] - name*: unannotated_type + $children*: [expression, type, wildcard_pattern] equality_constraint: $children*: attribute constrained_type: [identifier, nested_type_identifier] - must_equal+: [type_modifiers, unannotated_type] - name: unannotated_type + must_equal: type equality_expression: lhs: expression op: ["!=", "!==", "==", "==="] @@ -225,14 +219,13 @@ named: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, parameter, property_behavior_modifier, throws, throws_clause, type_constraints, type_parameters] body: function_body default_value*: expression - name+: [referenceable_operator, simple_identifier, unannotated_type] - return_type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] + name: [referenceable_operator, simple_identifier] + return_type?: [implicitly_unwrapped_type, type] function_modifier: function_type: $children?: [throws, throws_clause] - name: unannotated_type params: unannotated_type - return_type+: [type_modifiers, unannotated_type] + return_type: type getter_specifier: $children*: [mutation_modifier, throws, throws_clause] guard_statement: @@ -242,15 +235,13 @@ named: identifier: $children+: simple_identifier if_condition: - $children*: [availability_condition, expression, pattern, type_annotation, type_modifiers, user_type, value_binding_pattern, where_clause, wildcard_pattern] + $children*: [availability_condition, expression, pattern, type, type_annotation, user_type, value_binding_pattern, where_clause, wildcard_pattern] bound_identifier?: simple_identifier - name?: unannotated_type if_statement: $children*: [else, if_statement, statements] condition+: if_condition implicitly_unwrapped_type: - $children?: type_modifiers - name: unannotated_type + $children: type import_declaration: $children+: [identifier, modifiers] infix_expression: @@ -260,8 +251,7 @@ named: inheritance_constraint: $children*: attribute constrained_type: [identifier, nested_type_identifier] - inherits_from+: [implicitly_unwrapped_type, type_modifiers, unannotated_type] - name?: unannotated_type + inherits_from: [implicitly_unwrapped_type, type] inheritance_modifier: inheritance_specifier: inherits_from: [function_type, suppressed_constraint, user_type] @@ -282,8 +272,7 @@ named: $children: expression lambda_function_type: $children*: [lambda_function_type_parameters, throws, throws_clause] - name?: unannotated_type - return_type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] + return_type?: [implicitly_unwrapped_type, type] lambda_function_type_parameters: $children+: lambda_parameter lambda_literal: @@ -293,8 +282,8 @@ named: lambda_parameter: $children?: [parameter_modifiers, self_expression] external_name?: simple_identifier - name*: [simple_identifier, unannotated_type] - type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] + name?: simple_identifier + type?: [implicitly_unwrapped_type, type] line_str_text: line_string_literal: interpolation*: interpolated_expression @@ -352,15 +341,14 @@ named: parameter: $children?: parameter_modifiers external_name?: simple_identifier - name+: [simple_identifier, unannotated_type] - type+: [implicitly_unwrapped_type, type_modifiers, unannotated_type] + name: simple_identifier + type: [implicitly_unwrapped_type, type] parameter_modifier: parameter_modifiers: $children+: parameter_modifier pattern: - $children*: [expression, pattern, type_modifiers, user_type, value_binding_pattern, wildcard_pattern] + $children*: [expression, pattern, type, user_type, value_binding_pattern, wildcard_pattern] bound_identifier?: simple_identifier - name?: unannotated_type playground_literal: $children+: expression postfix_expression: @@ -395,8 +383,8 @@ named: protocol_function_declaration: $children*: [attribute, modifiers, parameter, statements, throws, throws_clause, type_constraints, type_parameters] default_value*: expression - name*: [referenceable_operator, simple_identifier, unannotated_type] - return_type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] + name?: [referenceable_operator, simple_identifier] + return_type?: [implicitly_unwrapped_type, type] protocol_property_declaration: $children+: [modifiers, protocol_property_requirements, type_annotation, type_constraints] name: pattern @@ -441,8 +429,7 @@ named: subscript_declaration: $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] default_value*: expression - name?: unannotated_type - return_type*: [implicitly_unwrapped_type, type_modifiers, unannotated_type] + return_type?: [implicitly_unwrapped_type, type] super_expression: suppressed_constraint: suppressed: type_identifier @@ -474,14 +461,15 @@ named: tuple_type_item: $children*: [parameter_modifiers, wildcard_pattern] element?: [dictionary_type, existential_type, opaque_type] - name*: [simple_identifier, unannotated_type] - type*: [type_modifiers, unannotated_type] + name?: simple_identifier + type?: type + type: + modifiers?: type_modifiers + name: unannotated_type type_annotation: - name?: unannotated_type - type+: [implicitly_unwrapped_type, type_modifiers, unannotated_type] + type: [implicitly_unwrapped_type, type] type_arguments: - $children*: type_modifiers - name+: unannotated_type + $children+: type type_constraint: $children: [equality_constraint, inheritance_constraint] type_constraints: @@ -492,8 +480,7 @@ named: type_pack_expansion: $children: unannotated_type type_parameter: - $children+: [type_identifier, type_modifiers, type_parameter_modifiers, type_parameter_pack] - name?: unannotated_type + $children+: [type, type_identifier, type_parameter_modifiers, type_parameter_pack] type_parameter_modifiers: $children+: attribute type_parameter_pack: @@ -502,8 +489,8 @@ named: $children+: [type_constraints, type_parameter] typealias_declaration: $children*: [attribute, inheritance_modifier, modifiers, ownership_modifier, property_behavior_modifier, type_parameters] - name+: [type_identifier, unannotated_type] - value+: [type_modifiers, unannotated_type] + name: type_identifier + value: type user_type: $children+: [type_arguments, type_identifier] value_argument: From e9822f67ee149169782eb0ddb315d06b9d8bdd77 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 19:19:37 +0000 Subject: [PATCH 18/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 228 +++++++----------- unified/ql/lib/unified.dbscheme | 328 +++++--------------------- 2 files changed, 145 insertions(+), 411 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index b71c807a2abc..201c0eac24eb 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -132,15 +132,10 @@ module Swift { final override string getAPrimaryQlClass() { result = "ArrayType" } /** Gets the node corresponding to the field `element`. */ - final AstNode getElement(int i) { swift_array_type_element(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_array_type_def(this, result) } + final Type getElement() { swift_array_type_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_array_type_element(this, _, result) or swift_array_type_def(this, result) - } + final override AstNode getAFieldOrChild() { swift_array_type_def(this, result) } } /** A class representing `as_expression` nodes. */ @@ -151,11 +146,8 @@ module Swift { /** Gets the node corresponding to the field `expr`. */ final Expression getExpr() { swift_as_expression_def(this, result, _, _) } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_as_expression_def(this, _, result, _) } - /** Gets the node corresponding to the field `type`. */ - final AstNode getType(int i) { swift_as_expression_type(this, i, result) } + final Type getType() { swift_as_expression_def(this, _, result, _) } /** Gets the child of this node. */ final AsOperator getChild() { swift_as_expression_def(this, _, _, result) } @@ -164,7 +156,6 @@ module Swift { final override AstNode getAFieldOrChild() { swift_as_expression_def(this, result, _, _) or swift_as_expression_def(this, _, result, _) or - swift_as_expression_type(this, _, result) or swift_as_expression_def(this, _, _, result) } } @@ -215,26 +206,22 @@ module Swift { final override string getAPrimaryQlClass() { result = "AssociatedtypeDeclaration" } /** Gets the node corresponding to the field `default_value`. */ - final AstNode getDefaultValue(int i) { - swift_associatedtype_declaration_default_value(this, i, result) - } + final Type getDefaultValue() { swift_associatedtype_declaration_default_value(this, result) } /** Gets the node corresponding to the field `must_inherit`. */ - final AstNode getMustInherit(int i) { - swift_associatedtype_declaration_must_inherit(this, i, result) - } + final Type getMustInherit() { swift_associatedtype_declaration_must_inherit(this, result) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_associatedtype_declaration_name(this, i, result) } + final TypeIdentifier getName() { swift_associatedtype_declaration_def(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_associatedtype_declaration_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_associatedtype_declaration_default_value(this, _, result) or - swift_associatedtype_declaration_must_inherit(this, _, result) or - swift_associatedtype_declaration_name(this, _, result) or + swift_associatedtype_declaration_default_value(this, result) or + swift_associatedtype_declaration_must_inherit(this, result) or + swift_associatedtype_declaration_def(this, result) or swift_associatedtype_declaration_child(this, _, result) } } @@ -424,27 +411,23 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "CheckExpression" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_check_expression_def(this, result, _, _) } - /** Gets the node corresponding to the field `op`. */ final string getOp() { - exists(int value | swift_check_expression_def(this, _, value, _) | + exists(int value | swift_check_expression_def(this, value, _, _) | (result = "is" and value = 0) ) } /** Gets the node corresponding to the field `target`. */ - final Expression getTarget() { swift_check_expression_def(this, _, _, result) } + final Expression getTarget() { swift_check_expression_def(this, _, result, _) } /** Gets the node corresponding to the field `type`. */ - final AstNode getType(int i) { swift_check_expression_type(this, i, result) } + final Type getType() { swift_check_expression_def(this, _, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_check_expression_def(this, result, _, _) or - swift_check_expression_def(this, _, _, result) or - swift_check_expression_type(this, _, result) + swift_check_expression_def(this, _, result, _) or + swift_check_expression_def(this, _, _, result) } } @@ -738,19 +721,14 @@ module Swift { final override string getAPrimaryQlClass() { result = "DictionaryType" } /** Gets the node corresponding to the field `key`. */ - final AstNode getKey(int i) { swift_dictionary_type_key(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName(int i) { swift_dictionary_type_name(this, i, result) } + final Type getKey() { swift_dictionary_type_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_dictionary_type_value(this, i, result) } + final Type getValue() { swift_dictionary_type_def(this, _, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_dictionary_type_key(this, _, result) or - swift_dictionary_type_name(this, _, result) or - swift_dictionary_type_value(this, _, result) + swift_dictionary_type_def(this, result, _) or swift_dictionary_type_def(this, _, result) } } @@ -880,17 +858,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "EnumTypeParameters" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName(int i) { swift_enum_type_parameters_name(this, i, result) } - /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_enum_type_parameters_child(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_enum_type_parameters_name(this, _, result) or - swift_enum_type_parameters_child(this, _, result) - } + final override AstNode getAFieldOrChild() { swift_enum_type_parameters_child(this, _, result) } } /** A class representing `equality_constraint` nodes. */ @@ -902,10 +874,7 @@ module Swift { final AstNode getConstrainedType() { swift_equality_constraint_def(this, result, _) } /** Gets the node corresponding to the field `must_equal`. */ - final AstNode getMustEqual(int i) { swift_equality_constraint_must_equal(this, i, result) } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_equality_constraint_def(this, _, result) } + final Type getMustEqual() { swift_equality_constraint_def(this, _, result) } /** Gets the `i`th child of this node. */ final Attribute getChild(int i) { swift_equality_constraint_child(this, i, result) } @@ -913,7 +882,6 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_equality_constraint_def(this, result, _) or - swift_equality_constraint_must_equal(this, _, result) or swift_equality_constraint_def(this, _, result) or swift_equality_constraint_child(this, _, result) } @@ -1022,7 +990,7 @@ module Swift { final override string getAPrimaryQlClass() { result = "FunctionDeclaration" } /** Gets the node corresponding to the field `body`. */ - final FunctionBody getBody() { swift_function_declaration_def(this, result) } + final FunctionBody getBody() { swift_function_declaration_def(this, result, _) } /** Gets the node corresponding to the field `default_value`. */ final Expression getDefaultValue(int i) { @@ -1030,20 +998,20 @@ module Swift { } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_function_declaration_name(this, i, result) } + final AstNode getName() { swift_function_declaration_def(this, _, result) } /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType(int i) { swift_function_declaration_return_type(this, i, result) } + final AstNode getReturnType() { swift_function_declaration_return_type(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_function_declaration_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_function_declaration_def(this, result) or + swift_function_declaration_def(this, result, _) or swift_function_declaration_default_value(this, _, result) or - swift_function_declaration_name(this, _, result) or - swift_function_declaration_return_type(this, _, result) or + swift_function_declaration_def(this, _, result) or + swift_function_declaration_return_type(this, result) or swift_function_declaration_child(this, _, result) } } @@ -1059,14 +1027,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "FunctionType" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_function_type_def(this, result, _) } - /** Gets the node corresponding to the field `params`. */ - final UnannotatedType getParams() { swift_function_type_def(this, _, result) } + final UnannotatedType getParams() { swift_function_type_def(this, result, _) } /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType(int i) { swift_function_type_return_type(this, i, result) } + final Type getReturnType() { swift_function_type_def(this, _, result) } /** Gets the child of this node. */ final AstNode getChild() { swift_function_type_child(this, result) } @@ -1075,7 +1040,6 @@ module Swift { final override AstNode getAFieldOrChild() { swift_function_type_def(this, result, _) or swift_function_type_def(this, _, result) or - swift_function_type_return_type(this, _, result) or swift_function_type_child(this, result) } } @@ -1138,17 +1102,12 @@ module Swift { swift_if_condition_bound_identifier(this, result) } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_if_condition_name(this, result) } - /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_if_condition_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_if_condition_bound_identifier(this, result) or - swift_if_condition_name(this, result) or - swift_if_condition_child(this, _, result) + swift_if_condition_bound_identifier(this, result) or swift_if_condition_child(this, _, result) } } @@ -1174,17 +1133,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ImplicitlyUnwrappedType" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_implicitly_unwrapped_type_def(this, result) } - /** Gets the child of this node. */ - final TypeModifiers getChild() { swift_implicitly_unwrapped_type_child(this, result) } + final Type getChild() { swift_implicitly_unwrapped_type_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_implicitly_unwrapped_type_def(this, result) or - swift_implicitly_unwrapped_type_child(this, result) - } + final override AstNode getAFieldOrChild() { swift_implicitly_unwrapped_type_def(this, result) } } /** A class representing `import_declaration` nodes. */ @@ -1227,24 +1180,18 @@ module Swift { final override string getAPrimaryQlClass() { result = "InheritanceConstraint" } /** Gets the node corresponding to the field `constrained_type`. */ - final AstNode getConstrainedType() { swift_inheritance_constraint_def(this, result) } + final AstNode getConstrainedType() { swift_inheritance_constraint_def(this, result, _) } /** Gets the node corresponding to the field `inherits_from`. */ - final AstNode getInheritsFrom(int i) { - swift_inheritance_constraint_inherits_from(this, i, result) - } - - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_inheritance_constraint_name(this, result) } + final AstNode getInheritsFrom() { swift_inheritance_constraint_def(this, _, result) } /** Gets the `i`th child of this node. */ final Attribute getChild(int i) { swift_inheritance_constraint_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_inheritance_constraint_def(this, result) or - swift_inheritance_constraint_inherits_from(this, _, result) or - swift_inheritance_constraint_name(this, result) or + swift_inheritance_constraint_def(this, result, _) or + swift_inheritance_constraint_def(this, _, result) or swift_inheritance_constraint_child(this, _, result) } } @@ -1359,19 +1306,15 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "LambdaFunctionType" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_lambda_function_type_name(this, result) } - /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType(int i) { swift_lambda_function_type_return_type(this, i, result) } + final AstNode getReturnType() { swift_lambda_function_type_return_type(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_lambda_function_type_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_lambda_function_type_name(this, result) or - swift_lambda_function_type_return_type(this, _, result) or + swift_lambda_function_type_return_type(this, result) or swift_lambda_function_type_child(this, _, result) } } @@ -1423,10 +1366,10 @@ module Swift { final SimpleIdentifier getExternalName() { swift_lambda_parameter_external_name(this, result) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_lambda_parameter_name(this, i, result) } + final SimpleIdentifier getName() { swift_lambda_parameter_name(this, result) } /** Gets the node corresponding to the field `type`. */ - final AstNode getType(int i) { swift_lambda_parameter_type(this, i, result) } + final AstNode getType() { swift_lambda_parameter_type(this, result) } /** Gets the child of this node. */ final AstNode getChild() { swift_lambda_parameter_child(this, result) } @@ -1434,8 +1377,8 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_lambda_parameter_external_name(this, result) or - swift_lambda_parameter_name(this, _, result) or - swift_lambda_parameter_type(this, _, result) or + swift_lambda_parameter_name(this, result) or + swift_lambda_parameter_type(this, result) or swift_lambda_parameter_child(this, result) } } @@ -1784,10 +1727,10 @@ module Swift { final SimpleIdentifier getExternalName() { swift_parameter_external_name(this, result) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_parameter_name(this, i, result) } + final SimpleIdentifier getName() { swift_parameter_def(this, result, _) } /** Gets the node corresponding to the field `type`. */ - final AstNode getType(int i) { swift_parameter_type(this, i, result) } + final AstNode getType() { swift_parameter_def(this, _, result) } /** Gets the child of this node. */ final ParameterModifiers getChild() { swift_parameter_child(this, result) } @@ -1795,8 +1738,8 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_parameter_external_name(this, result) or - swift_parameter_name(this, _, result) or - swift_parameter_type(this, _, result) or + swift_parameter_def(this, result, _) or + swift_parameter_def(this, _, result) or swift_parameter_child(this, result) } } @@ -1827,17 +1770,12 @@ module Swift { /** Gets the node corresponding to the field `bound_identifier`. */ final SimpleIdentifier getBoundIdentifier() { swift_pattern_bound_identifier(this, result) } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_pattern_name(this, result) } - /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_pattern_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_pattern_bound_identifier(this, result) or - swift_pattern_name(this, result) or - swift_pattern_child(this, _, result) + swift_pattern_bound_identifier(this, result) or swift_pattern_child(this, _, result) } } @@ -2042,12 +1980,10 @@ module Swift { } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_protocol_function_declaration_name(this, i, result) } + final AstNode getName() { swift_protocol_function_declaration_name(this, result) } /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType(int i) { - swift_protocol_function_declaration_return_type(this, i, result) - } + final AstNode getReturnType() { swift_protocol_function_declaration_return_type(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_protocol_function_declaration_child(this, i, result) } @@ -2055,8 +1991,8 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_protocol_function_declaration_default_value(this, _, result) or - swift_protocol_function_declaration_name(this, _, result) or - swift_protocol_function_declaration_return_type(this, _, result) or + swift_protocol_function_declaration_name(this, result) or + swift_protocol_function_declaration_return_type(this, result) or swift_protocol_function_declaration_child(this, _, result) } } @@ -2328,11 +2264,8 @@ module Swift { swift_subscript_declaration_default_value(this, i, result) } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_subscript_declaration_name(this, result) } - /** Gets the node corresponding to the field `return_type`. */ - final AstNode getReturnType(int i) { swift_subscript_declaration_return_type(this, i, result) } + final AstNode getReturnType() { swift_subscript_declaration_return_type(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_subscript_declaration_child(this, i, result) } @@ -2340,8 +2273,7 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_subscript_declaration_default_value(this, _, result) or - swift_subscript_declaration_name(this, result) or - swift_subscript_declaration_return_type(this, _, result) or + swift_subscript_declaration_return_type(this, result) or swift_subscript_declaration_child(this, _, result) } } @@ -2517,10 +2449,10 @@ module Swift { final AstNode getElement() { swift_tuple_type_item_element(this, result) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_tuple_type_item_name(this, i, result) } + final SimpleIdentifier getName() { swift_tuple_type_item_name(this, result) } /** Gets the node corresponding to the field `type`. */ - final AstNode getType(int i) { swift_tuple_type_item_type(this, i, result) } + final Type getType() { swift_tuple_type_item_type(this, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_tuple_type_item_child(this, i, result) } @@ -2528,27 +2460,39 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { swift_tuple_type_item_element(this, result) or - swift_tuple_type_item_name(this, _, result) or - swift_tuple_type_item_type(this, _, result) or + swift_tuple_type_item_name(this, result) or + swift_tuple_type_item_type(this, result) or swift_tuple_type_item_child(this, _, result) } } + /** A class representing `type` nodes. */ + class Type extends @swift_type__, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "Type" } + + /** Gets the node corresponding to the field `modifiers`. */ + final TypeModifiers getModifiers() { swift_type_modifiers(this, result) } + + /** Gets the node corresponding to the field `name`. */ + final UnannotatedType getName() { swift_type_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { + swift_type_modifiers(this, result) or swift_type_def(this, result) + } + } + /** A class representing `type_annotation` nodes. */ class TypeAnnotation extends @swift_type_annotation, AstNode { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeAnnotation" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_type_annotation_name(this, result) } - /** Gets the node corresponding to the field `type`. */ - final AstNode getType(int i) { swift_type_annotation_type(this, i, result) } + final AstNode getType() { swift_type_annotation_def(this, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_type_annotation_name(this, result) or swift_type_annotation_type(this, _, result) - } + final override AstNode getAFieldOrChild() { swift_type_annotation_def(this, result) } } /** A class representing `type_arguments` nodes. */ @@ -2556,16 +2500,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeArguments" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName(int i) { swift_type_arguments_name(this, i, result) } - /** Gets the `i`th child of this node. */ - final TypeModifiers getChild(int i) { swift_type_arguments_child(this, i, result) } + final Type getChild(int i) { swift_type_arguments_child(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_type_arguments_name(this, _, result) or swift_type_arguments_child(this, _, result) - } + final override AstNode getAFieldOrChild() { swift_type_arguments_child(this, _, result) } } /** A class representing `type_constraint` nodes. */ @@ -2627,16 +2566,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TypeParameter" } - /** Gets the node corresponding to the field `name`. */ - final UnannotatedType getName() { swift_type_parameter_name(this, result) } - /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_type_parameter_child(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_type_parameter_name(this, result) or swift_type_parameter_child(this, _, result) - } + final override AstNode getAFieldOrChild() { swift_type_parameter_child(this, _, result) } } /** A class representing `type_parameter_modifiers` nodes. */ @@ -2683,18 +2617,18 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypealiasDeclaration" } /** Gets the node corresponding to the field `name`. */ - final AstNode getName(int i) { swift_typealias_declaration_name(this, i, result) } + final TypeIdentifier getName() { swift_typealias_declaration_def(this, result, _) } /** Gets the node corresponding to the field `value`. */ - final AstNode getValue(int i) { swift_typealias_declaration_value(this, i, result) } + final Type getValue() { swift_typealias_declaration_def(this, _, result) } /** Gets the `i`th child of this node. */ final AstNode getChild(int i) { swift_typealias_declaration_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_typealias_declaration_name(this, _, result) or - swift_typealias_declaration_value(this, _, result) or + swift_typealias_declaration_def(this, result, _) or + swift_typealias_declaration_def(this, _, result) or swift_typealias_declaration_child(this, _, result) } } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 3b9cf0815d93..6a8d6cc4a9de 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -156,33 +156,15 @@ swift_array_literal_def( unique int id: @swift_array_literal ); -@swift_array_type_element_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_array_type, index] -swift_array_type_element( - int swift_array_type: @swift_array_type ref, - int index: int ref, - unique int element: @swift_array_type_element_type ref -); - swift_array_type_def( unique int id: @swift_array_type, - int name: @swift_unannotated_type ref -); - -@swift_as_expression_type_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_as_expression, index] -swift_as_expression_type( - int swift_as_expression: @swift_as_expression ref, - int index: int ref, - unique int type__: @swift_as_expression_type_type ref + int element: @swift_type__ ref ); swift_as_expression_def( unique int id: @swift_as_expression, int expr: @swift_expression ref, - int name: @swift_unannotated_type ref, + int type__: @swift_type__ ref, int child: @swift_token_as_operator ref ); @@ -203,31 +185,14 @@ swift_assignment_def( int target: @swift_directly_assignable_expression ref ); -@swift_associatedtype_declaration_default_value_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_associatedtype_declaration, index] swift_associatedtype_declaration_default_value( - int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, - int index: int ref, - unique int default_value: @swift_associatedtype_declaration_default_value_type ref + unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, + unique int default_value: @swift_type__ ref ); -@swift_associatedtype_declaration_must_inherit_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_associatedtype_declaration, index] swift_associatedtype_declaration_must_inherit( - int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, - int index: int ref, - unique int must_inherit: @swift_associatedtype_declaration_must_inherit_type ref -); - -@swift_associatedtype_declaration_name_type = @swift_token_type_identifier | @swift_unannotated_type - -#keyset[swift_associatedtype_declaration, index] -swift_associatedtype_declaration_name( - int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, - int index: int ref, - unique int name: @swift_associatedtype_declaration_name_type ref + unique int swift_associatedtype_declaration: @swift_associatedtype_declaration ref, + unique int must_inherit: @swift_type__ ref ); @swift_associatedtype_declaration_child_type = @swift_modifiers | @swift_type_constraints @@ -240,7 +205,8 @@ swift_associatedtype_declaration_child( ); swift_associatedtype_declaration_def( - unique int id: @swift_associatedtype_declaration + unique int id: @swift_associatedtype_declaration, + int name: @swift_token_type_identifier ref ); @swift_attribute_child_type = @swift_expression | @swift_user_type @@ -383,20 +349,11 @@ case @swift_check_expression.op of ; -@swift_check_expression_type_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_check_expression, index] -swift_check_expression_type( - int swift_check_expression: @swift_check_expression ref, - int index: int ref, - unique int type__: @swift_check_expression_type_type ref -); - swift_check_expression_def( unique int id: @swift_check_expression, - int name: @swift_unannotated_type ref, int op: int ref, - int target: @swift_expression ref + int target: @swift_expression ref, + int type__: @swift_type__ ref ); @swift_class_body_child_type = @swift_associatedtype_declaration | @swift_class_declaration | @swift_deinit_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_subscript_declaration | @swift_token_multiline_comment | @swift_typealias_declaration @@ -607,33 +564,10 @@ swift_dictionary_literal_def( unique int id: @swift_dictionary_literal ); -@swift_dictionary_type_key_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_dictionary_type, index] -swift_dictionary_type_key( - int swift_dictionary_type: @swift_dictionary_type ref, - int index: int ref, - unique int key__: @swift_dictionary_type_key_type ref -); - -#keyset[swift_dictionary_type, index] -swift_dictionary_type_name( - int swift_dictionary_type: @swift_dictionary_type ref, - int index: int ref, - unique int name: @swift_unannotated_type ref -); - -@swift_dictionary_type_value_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_dictionary_type, index] -swift_dictionary_type_value( - int swift_dictionary_type: @swift_dictionary_type ref, - int index: int ref, - unique int value: @swift_dictionary_type_value_type ref -); - swift_dictionary_type_def( - unique int id: @swift_dictionary_type + unique int id: @swift_dictionary_type, + int key__: @swift_type__ ref, + int value: @swift_type__ ref ); @swift_didset_clause_child_type = @swift_modifiers | @swift_statements | @swift_token_simple_identifier @@ -735,14 +669,7 @@ swift_enum_entry_def( unique int id: @swift_enum_entry ); -#keyset[swift_enum_type_parameters, index] -swift_enum_type_parameters_name( - int swift_enum_type_parameters: @swift_enum_type_parameters ref, - int index: int ref, - unique int name: @swift_unannotated_type ref -); - -@swift_enum_type_parameters_child_type = @swift_expression | @swift_token_wildcard_pattern | @swift_type_modifiers +@swift_enum_type_parameters_child_type = @swift_expression | @swift_token_wildcard_pattern | @swift_type__ #keyset[swift_enum_type_parameters, index] swift_enum_type_parameters_child( @@ -757,15 +684,6 @@ swift_enum_type_parameters_def( @swift_equality_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier -@swift_equality_constraint_must_equal_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_equality_constraint, index] -swift_equality_constraint_must_equal( - int swift_equality_constraint: @swift_equality_constraint ref, - int index: int ref, - unique int must_equal: @swift_equality_constraint_must_equal_type ref -); - #keyset[swift_equality_constraint, index] swift_equality_constraint_child( int swift_equality_constraint: @swift_equality_constraint ref, @@ -776,7 +694,7 @@ swift_equality_constraint_child( swift_equality_constraint_def( unique int id: @swift_equality_constraint, int constrained_type: @swift_equality_constraint_constrained_type_type ref, - int name: @swift_unannotated_type ref + int must_equal: @swift_type__ ref ); case @swift_equality_expression.op of @@ -837,21 +755,12 @@ swift_function_declaration_default_value( unique int default_value: @swift_expression ref ); -@swift_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier | @swift_unannotated_type - -#keyset[swift_function_declaration, index] -swift_function_declaration_name( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, - unique int name: @swift_function_declaration_name_type ref -); +@swift_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier -@swift_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type +@swift_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ -#keyset[swift_function_declaration, index] swift_function_declaration_return_type( - int swift_function_declaration: @swift_function_declaration ref, - int index: int ref, + unique int swift_function_declaration: @swift_function_declaration ref, unique int return_type: @swift_function_declaration_return_type_type ref ); @@ -866,16 +775,8 @@ swift_function_declaration_child( swift_function_declaration_def( unique int id: @swift_function_declaration, - int body: @swift_function_body ref -); - -@swift_function_type_return_type_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_function_type, index] -swift_function_type_return_type( - int swift_function_type: @swift_function_type ref, - int index: int ref, - unique int return_type: @swift_function_type_return_type_type ref + int body: @swift_function_body ref, + int name: @swift_function_declaration_name_type ref ); @swift_function_type_child_type = @swift_throws_clause | @swift_token_throws @@ -887,8 +788,8 @@ swift_function_type_child( swift_function_type_def( unique int id: @swift_function_type, - int name: @swift_unannotated_type ref, - int params: @swift_unannotated_type ref + int params: @swift_unannotated_type ref, + int return_type: @swift_type__ ref ); @swift_getter_specifier_child_type = @swift_throws_clause | @swift_token_mutation_modifier | @swift_token_throws @@ -940,12 +841,7 @@ swift_if_condition_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -swift_if_condition_name( - unique int swift_if_condition: @swift_if_condition ref, - unique int name: @swift_unannotated_type ref -); - -@swift_if_condition_child_type = @swift_availability_condition | @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type_annotation | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern | @swift_where_clause +@swift_if_condition_child_type = @swift_availability_condition | @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type__ | @swift_type_annotation | @swift_user_type | @swift_value_binding_pattern | @swift_where_clause #keyset[swift_if_condition, index] swift_if_condition_child( @@ -978,14 +874,9 @@ swift_if_statement_def( unique int id: @swift_if_statement ); -swift_implicitly_unwrapped_type_child( - unique int swift_implicitly_unwrapped_type: @swift_implicitly_unwrapped_type ref, - unique int child: @swift_type_modifiers ref -); - swift_implicitly_unwrapped_type_def( unique int id: @swift_implicitly_unwrapped_type, - int name: @swift_unannotated_type ref + int child: @swift_type__ ref ); @swift_import_declaration_child_type = @swift_identifier | @swift_modifiers @@ -1010,19 +901,7 @@ swift_infix_expression_def( @swift_inheritance_constraint_constrained_type_type = @swift_identifier | @swift_nested_type_identifier -@swift_inheritance_constraint_inherits_from_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_inheritance_constraint, index] -swift_inheritance_constraint_inherits_from( - int swift_inheritance_constraint: @swift_inheritance_constraint ref, - int index: int ref, - unique int inherits_from: @swift_inheritance_constraint_inherits_from_type ref -); - -swift_inheritance_constraint_name( - unique int swift_inheritance_constraint: @swift_inheritance_constraint ref, - unique int name: @swift_unannotated_type ref -); +@swift_inheritance_constraint_inherits_from_type = @swift_implicitly_unwrapped_type | @swift_type__ #keyset[swift_inheritance_constraint, index] swift_inheritance_constraint_child( @@ -1033,7 +912,8 @@ swift_inheritance_constraint_child( swift_inheritance_constraint_def( unique int id: @swift_inheritance_constraint, - int constrained_type: @swift_inheritance_constraint_constrained_type_type ref + int constrained_type: @swift_inheritance_constraint_constrained_type_type ref, + int inherits_from: @swift_inheritance_constraint_inherits_from_type ref ); @swift_inheritance_specifier_inherits_from_type = @swift_function_type | @swift_suppressed_constraint | @swift_user_type @@ -1118,17 +998,10 @@ swift_key_path_string_expression_def( int child: @swift_expression ref ); -swift_lambda_function_type_name( - unique int swift_lambda_function_type: @swift_lambda_function_type ref, - unique int name: @swift_unannotated_type ref -); - -@swift_lambda_function_type_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type +@swift_lambda_function_type_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ -#keyset[swift_lambda_function_type, index] swift_lambda_function_type_return_type( - int swift_lambda_function_type: @swift_lambda_function_type ref, - int index: int ref, + unique int swift_lambda_function_type: @swift_lambda_function_type ref, unique int return_type: @swift_lambda_function_type_return_type_type ref ); @@ -1184,21 +1057,15 @@ swift_lambda_parameter_external_name( unique int external_name: @swift_token_simple_identifier ref ); -@swift_lambda_parameter_name_type = @swift_token_simple_identifier | @swift_unannotated_type - -#keyset[swift_lambda_parameter, index] swift_lambda_parameter_name( - int swift_lambda_parameter: @swift_lambda_parameter ref, - int index: int ref, - unique int name: @swift_lambda_parameter_name_type ref + unique int swift_lambda_parameter: @swift_lambda_parameter ref, + unique int name: @swift_token_simple_identifier ref ); -@swift_lambda_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type +@swift_lambda_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type__ -#keyset[swift_lambda_parameter, index] swift_lambda_parameter_type( - int swift_lambda_parameter: @swift_lambda_parameter ref, - int index: int ref, + unique int swift_lambda_parameter: @swift_lambda_parameter ref, unique int type__: @swift_lambda_parameter_type_type ref ); @@ -1431,23 +1298,7 @@ swift_parameter_external_name( unique int external_name: @swift_token_simple_identifier ref ); -@swift_parameter_name_type = @swift_token_simple_identifier | @swift_unannotated_type - -#keyset[swift_parameter, index] -swift_parameter_name( - int swift_parameter: @swift_parameter ref, - int index: int ref, - unique int name: @swift_parameter_name_type ref -); - -@swift_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_parameter, index] -swift_parameter_type( - int swift_parameter: @swift_parameter ref, - int index: int ref, - unique int type__: @swift_parameter_type_type ref -); +@swift_parameter_type_type = @swift_implicitly_unwrapped_type | @swift_type__ swift_parameter_child( unique int swift_parameter: @swift_parameter ref, @@ -1455,7 +1306,9 @@ swift_parameter_child( ); swift_parameter_def( - unique int id: @swift_parameter + unique int id: @swift_parameter, + int name: @swift_token_simple_identifier ref, + int type__: @swift_parameter_type_type ref ); #keyset[swift_parameter_modifiers, index] @@ -1474,12 +1327,7 @@ swift_pattern_bound_identifier( unique int bound_identifier: @swift_token_simple_identifier ref ); -swift_pattern_name( - unique int swift_pattern: @swift_pattern ref, - unique int name: @swift_unannotated_type ref -); - -@swift_pattern_child_type = @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type_modifiers | @swift_user_type | @swift_value_binding_pattern +@swift_pattern_child_type = @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type__ | @swift_user_type | @swift_value_binding_pattern #keyset[swift_pattern, index] swift_pattern_child( @@ -1649,21 +1497,17 @@ swift_protocol_function_declaration_default_value( unique int default_value: @swift_expression ref ); -@swift_protocol_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier | @swift_unannotated_type +@swift_protocol_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier -#keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_name( - int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - int index: int ref, + unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, unique int name: @swift_protocol_function_declaration_name_type ref ); -@swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type +@swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ -#keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_return_type( - int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - int index: int ref, + unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, unique int return_type: @swift_protocol_function_declaration_return_type_type ref ); @@ -1833,17 +1677,10 @@ swift_subscript_declaration_default_value( unique int default_value: @swift_expression ref ); -swift_subscript_declaration_name( - unique int swift_subscript_declaration: @swift_subscript_declaration ref, - unique int name: @swift_unannotated_type ref -); - -@swift_subscript_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type +@swift_subscript_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ -#keyset[swift_subscript_declaration, index] swift_subscript_declaration_return_type( - int swift_subscript_declaration: @swift_subscript_declaration ref, - int index: int ref, + unique int swift_subscript_declaration: @swift_subscript_declaration ref, unique int return_type: @swift_subscript_declaration_return_type_type ref ); @@ -1954,22 +1791,14 @@ swift_tuple_type_item_element( unique int element: @swift_tuple_type_item_element_type ref ); -@swift_tuple_type_item_name_type = @swift_token_simple_identifier | @swift_unannotated_type - -#keyset[swift_tuple_type_item, index] swift_tuple_type_item_name( - int swift_tuple_type_item: @swift_tuple_type_item ref, - int index: int ref, - unique int name: @swift_tuple_type_item_name_type ref + unique int swift_tuple_type_item: @swift_tuple_type_item ref, + unique int name: @swift_token_simple_identifier ref ); -@swift_tuple_type_item_type_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_tuple_type_item, index] swift_tuple_type_item_type( - int swift_tuple_type_item: @swift_tuple_type_item ref, - int index: int ref, - unique int type__: @swift_tuple_type_item_type_type ref + unique int swift_tuple_type_item: @swift_tuple_type_item ref, + unique int type__: @swift_type__ ref ); @swift_tuple_type_item_child_type = @swift_parameter_modifiers | @swift_token_wildcard_pattern @@ -1985,36 +1814,28 @@ swift_tuple_type_item_def( unique int id: @swift_tuple_type_item ); -swift_type_annotation_name( - unique int swift_type_annotation: @swift_type_annotation ref, - unique int name: @swift_unannotated_type ref +swift_type_modifiers( + unique int swift_type__: @swift_type__ ref, + unique int modifiers: @swift_type_modifiers ref ); -@swift_type_annotation_type_type = @swift_implicitly_unwrapped_type | @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_type_annotation, index] -swift_type_annotation_type( - int swift_type_annotation: @swift_type_annotation ref, - int index: int ref, - unique int type__: @swift_type_annotation_type_type ref +swift_type_def( + unique int id: @swift_type__, + int name: @swift_unannotated_type ref ); -swift_type_annotation_def( - unique int id: @swift_type_annotation -); +@swift_type_annotation_type_type = @swift_implicitly_unwrapped_type | @swift_type__ -#keyset[swift_type_arguments, index] -swift_type_arguments_name( - int swift_type_arguments: @swift_type_arguments ref, - int index: int ref, - unique int name: @swift_unannotated_type ref +swift_type_annotation_def( + unique int id: @swift_type_annotation, + int type__: @swift_type_annotation_type_type ref ); #keyset[swift_type_arguments, index] swift_type_arguments_child( int swift_type_arguments: @swift_type_arguments ref, int index: int ref, - unique int child: @swift_type_modifiers ref + unique int child: @swift_type__ ref ); swift_type_arguments_def( @@ -2057,12 +1878,7 @@ swift_type_pack_expansion_def( int child: @swift_unannotated_type ref ); -swift_type_parameter_name( - unique int swift_type_parameter: @swift_type_parameter ref, - unique int name: @swift_unannotated_type ref -); - -@swift_type_parameter_child_type = @swift_token_type_identifier | @swift_type_modifiers | @swift_type_parameter_modifiers | @swift_type_parameter_pack +@swift_type_parameter_child_type = @swift_token_type_identifier | @swift_type__ | @swift_type_parameter_modifiers | @swift_type_parameter_pack #keyset[swift_type_parameter, index] swift_type_parameter_child( @@ -2104,24 +1920,6 @@ swift_type_parameters_def( unique int id: @swift_type_parameters ); -@swift_typealias_declaration_name_type = @swift_token_type_identifier | @swift_unannotated_type - -#keyset[swift_typealias_declaration, index] -swift_typealias_declaration_name( - int swift_typealias_declaration: @swift_typealias_declaration ref, - int index: int ref, - unique int name: @swift_typealias_declaration_name_type ref -); - -@swift_typealias_declaration_value_type = @swift_type_modifiers | @swift_unannotated_type - -#keyset[swift_typealias_declaration, index] -swift_typealias_declaration_value( - int swift_typealias_declaration: @swift_typealias_declaration ref, - int index: int ref, - unique int value: @swift_typealias_declaration_value_type ref -); - @swift_typealias_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_token_inheritance_modifier | @swift_token_ownership_modifier | @swift_token_property_behavior_modifier | @swift_type_parameters #keyset[swift_typealias_declaration, index] @@ -2132,7 +1930,9 @@ swift_typealias_declaration_child( ); swift_typealias_declaration_def( - unique int id: @swift_typealias_declaration + unique int id: @swift_typealias_declaration, + int name: @swift_token_type_identifier ref, + int value: @swift_type__ ref ); @swift_unannotated_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_function_type | @swift_metatype | @swift_opaque_type | @swift_optional_type | @swift_protocol_composition_type | @swift_suppressed_constraint | @swift_tuple_type | @swift_type_pack_expansion | @swift_type_parameter_pack | @swift_user_type @@ -2324,7 +2124,7 @@ case @swift_token.kind of ; -@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 +@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__ | @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 swift_ast_node_location( unique int node: @swift_ast_node ref, From 31386f566c9dfa7de21c928181bf20f1816572b7 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 21:03:56 +0000 Subject: [PATCH 19/24] unified: drop `element` field on `_parenthesized_type` Same pattern we've seen many times before: a field on an anonymous node gets attached to the parent node instead. I'm not 100% sure this is the right solution, but it seemed wrong to just make `_parenthesized_type` named instead (we don't usually name parentheticals). At the very least, this cleans up the spurious navigation_expression.element and tuple_type_item.element fields. --- unified/extractor/tree-sitter-swift/grammar.js | 5 +---- unified/extractor/tree-sitter-swift/node-types.yml | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 51a680e05a1e..4d20431a0708 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -567,10 +567,7 @@ module.exports = grammar({ _parenthesized_type: ($) => seq( "(", - field( - "element", - choice($.opaque_type, $.existential_type, $.dictionary_type) - ), + choice($.opaque_type, $.existential_type, $.dictionary_type), ")" ), navigation_expression: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 5c4098db84f0..7ac626492d40 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -314,7 +314,6 @@ named: rhs: expression mutation_modifier: navigation_expression: - element?: [dictionary_type, existential_type, opaque_type] suffix: navigation_suffix target+: ["(", ")", array_type, dictionary_type, existential_type, expression, opaque_type, user_type] navigation_suffix: @@ -459,8 +458,7 @@ named: $children?: tuple_type_item element*: tuple_type_item tuple_type_item: - $children*: [parameter_modifiers, wildcard_pattern] - element?: [dictionary_type, existential_type, opaque_type] + $children*: [dictionary_type, existential_type, opaque_type, parameter_modifiers, wildcard_pattern] name?: simple_identifier type?: type type: From f9e7f908963faa4c3c78126a8d4fa50d6ff432e7 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 21:04:02 +0000 Subject: [PATCH 20/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 8 -------- unified/ql/lib/unified.dbscheme | 16 +--------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index 201c0eac24eb..60172525efe1 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -1571,9 +1571,6 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "NavigationExpression" } - /** Gets the node corresponding to the field `element`. */ - final AstNode getElement() { swift_navigation_expression_element(this, result) } - /** Gets the node corresponding to the field `suffix`. */ final NavigationSuffix getSuffix() { swift_navigation_expression_def(this, result) } @@ -1582,7 +1579,6 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_navigation_expression_element(this, result) or swift_navigation_expression_def(this, result) or swift_navigation_expression_target(this, _, result) } @@ -2445,9 +2441,6 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "TupleTypeItem" } - /** Gets the node corresponding to the field `element`. */ - final AstNode getElement() { swift_tuple_type_item_element(this, result) } - /** Gets the node corresponding to the field `name`. */ final SimpleIdentifier getName() { swift_tuple_type_item_name(this, result) } @@ -2459,7 +2452,6 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_tuple_type_item_element(this, result) or swift_tuple_type_item_name(this, result) or swift_tuple_type_item_type(this, result) or swift_tuple_type_item_child(this, _, result) diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 6a8d6cc4a9de..56571e865d10 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -1206,13 +1206,6 @@ swift_multiplicative_expression_def( int rhs: @swift_expression ref ); -@swift_navigation_expression_element_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type - -swift_navigation_expression_element( - unique int swift_navigation_expression: @swift_navigation_expression ref, - unique int element: @swift_navigation_expression_element_type ref -); - @swift_navigation_expression_target_type = @swift_array_type | @swift_dictionary_type | @swift_existential_type | @swift_expression | @swift_opaque_type | @swift_reserved_word | @swift_user_type #keyset[swift_navigation_expression, index] @@ -1784,13 +1777,6 @@ swift_tuple_type_def( unique int id: @swift_tuple_type ); -@swift_tuple_type_item_element_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type - -swift_tuple_type_item_element( - unique int swift_tuple_type_item: @swift_tuple_type_item ref, - unique int element: @swift_tuple_type_item_element_type ref -); - swift_tuple_type_item_name( unique int swift_tuple_type_item: @swift_tuple_type_item ref, unique int name: @swift_token_simple_identifier ref @@ -1801,7 +1787,7 @@ swift_tuple_type_item_type( unique int type__: @swift_type__ ref ); -@swift_tuple_type_item_child_type = @swift_parameter_modifiers | @swift_token_wildcard_pattern +@swift_tuple_type_item_child_type = @swift_dictionary_type | @swift_existential_type | @swift_opaque_type | @swift_parameter_modifiers | @swift_token_wildcard_pattern #keyset[swift_tuple_type_item, index] swift_tuple_type_item_child( From 2608db9fd98a75409c3b2536342aa942b3bf0407 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 21:10:58 +0000 Subject: [PATCH 21/24] unified: Prevent field bleed-through from `_if_let_binding` Same procedure as before -- we change the anonymous node to a named node, and the problem magically goes away. --- unified/extractor/tree-sitter-swift/grammar.js | 4 ++-- unified/extractor/tree-sitter-swift/node-types.yml | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 4d20431a0708..22b5af18ffac 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -1041,8 +1041,8 @@ module.exports = grammar({ ) ), if_condition: ($) => - choice($._if_let_binding, $.expression, $.availability_condition), - _if_let_binding: ($) => + choice($.if_let_binding, $.expression, $.availability_condition), + if_let_binding: ($) => seq( $._direct_or_indirect_binding, optional(seq($._equal_sign, $.expression)), diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 7ac626492d40..7b97a68afde6 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -235,7 +235,9 @@ named: identifier: $children+: simple_identifier if_condition: - $children*: [availability_condition, expression, pattern, type, type_annotation, user_type, value_binding_pattern, where_clause, wildcard_pattern] + $children: [availability_condition, expression, if_let_binding] + if_let_binding: + $children*: [expression, pattern, type, type_annotation, user_type, value_binding_pattern, where_clause, wildcard_pattern] bound_identifier?: simple_identifier if_statement: $children*: [else, if_statement, statements] From a5a1312e51dd7ba94af1553b717f36d6157db0fc Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 21:11:06 +0000 Subject: [PATCH 22/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 19 ++++++++++++++++--- unified/ql/lib/unified.dbscheme | 27 +++++++++++++++++---------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index 60172525efe1..3ec274925a16 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -1097,17 +1097,30 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "IfCondition" } + /** Gets the child of this node. */ + final AstNode getChild() { swift_if_condition_def(this, result) } + + /** Gets a field or child node of this node. */ + final override AstNode getAFieldOrChild() { swift_if_condition_def(this, result) } + } + + /** A class representing `if_let_binding` nodes. */ + class IfLetBinding extends @swift_if_let_binding, AstNode { + /** Gets the name of the primary QL class for this element. */ + final override string getAPrimaryQlClass() { result = "IfLetBinding" } + /** Gets the node corresponding to the field `bound_identifier`. */ final SimpleIdentifier getBoundIdentifier() { - swift_if_condition_bound_identifier(this, result) + swift_if_let_binding_bound_identifier(this, result) } /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_if_condition_child(this, i, result) } + final AstNode getChild(int i) { swift_if_let_binding_child(this, i, result) } /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { - swift_if_condition_bound_identifier(this, result) or swift_if_condition_child(this, _, result) + swift_if_let_binding_bound_identifier(this, result) or + swift_if_let_binding_child(this, _, result) } } diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index 56571e865d10..a01eb65170ca 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -836,22 +836,29 @@ swift_identifier_def( unique int id: @swift_identifier ); -swift_if_condition_bound_identifier( - unique int swift_if_condition: @swift_if_condition ref, +@swift_if_condition_child_type = @swift_availability_condition | @swift_expression | @swift_if_let_binding + +swift_if_condition_def( + unique int id: @swift_if_condition, + int child: @swift_if_condition_child_type ref +); + +swift_if_let_binding_bound_identifier( + unique int swift_if_let_binding: @swift_if_let_binding ref, unique int bound_identifier: @swift_token_simple_identifier ref ); -@swift_if_condition_child_type = @swift_availability_condition | @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type__ | @swift_type_annotation | @swift_user_type | @swift_value_binding_pattern | @swift_where_clause +@swift_if_let_binding_child_type = @swift_expression | @swift_pattern | @swift_token_wildcard_pattern | @swift_type__ | @swift_type_annotation | @swift_user_type | @swift_value_binding_pattern | @swift_where_clause -#keyset[swift_if_condition, index] -swift_if_condition_child( - int swift_if_condition: @swift_if_condition ref, +#keyset[swift_if_let_binding, index] +swift_if_let_binding_child( + int swift_if_let_binding: @swift_if_let_binding ref, int index: int ref, - unique int child: @swift_if_condition_child_type ref + unique int child: @swift_if_let_binding_child_type ref ); -swift_if_condition_def( - unique int id: @swift_if_condition +swift_if_let_binding_def( + unique int id: @swift_if_let_binding ); #keyset[swift_if_statement, index] @@ -2110,7 +2117,7 @@ case @swift_token.kind of ; -@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__ | @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 +@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_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_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__ | @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 swift_ast_node_location( unique int node: @swift_ast_node ref, From ff5c0b40f161a41d0f14c4ad427640d5afd9cade Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 21:26:25 +0000 Subject: [PATCH 23/24] unified: add supertypes for various kinds of declarations Hides a bunch of huge unions under (hopefully) sensible supertypes. --- .../extractor/tree-sitter-swift/grammar.js | 40 ++++++++------ .../tree-sitter-swift/node-types.yml | 54 ++++++++++++++++--- 2 files changed, 69 insertions(+), 25 deletions(-) diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 22b5af18ffac..5dbfd7fdbbf2 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -84,7 +84,14 @@ if (tree_sitter_version_supports_emoji()) { module.exports = grammar({ name: "swift", - supertypes: ($) => [$.expression, $.unannotated_type], + supertypes: ($) => [ + $.expression, + $.unannotated_type, + $.global_declaration, + $.type_level_declaration, + $.local_declaration, + $.protocol_member_declaration, + ], conflicts: ($) => [ // @Type(... could either be an annotation constructor invocation or an annotated expression [$.attribute], @@ -1183,14 +1190,14 @@ module.exports = grammar({ _local_statement: ($) => choice( $.expression, - $._local_declaration, + $.local_declaration, $._labeled_statement, $.control_transfer_statement ), _top_level_statement: ($) => choice( $.expression, - $._global_declaration, + $.global_declaration, $._labeled_statement, $._throw_statement ), @@ -1298,7 +1305,7 @@ module.exports = grammar({ //////////////////////////////// // Declarations - https://docs.swift.org/swift-book/ReferenceManual/Declarations.html //////////////////////////////// - _global_declaration: ($) => + global_declaration: ($) => choice( $.import_declaration, $.property_declaration, @@ -1312,7 +1319,7 @@ module.exports = grammar({ $.associatedtype_declaration, $.macro_declaration ), - _type_level_declaration: ($) => + type_level_declaration: ($) => choice( $.import_declaration, $.property_declaration, @@ -1327,7 +1334,7 @@ module.exports = grammar({ $.precedence_group_declaration, $.associatedtype_declaration ), - _local_declaration: ($) => + local_declaration: ($) => choice( alias($._local_property_declaration, $.property_declaration), alias($._local_typealias_declaration, $.typealias_declaration), @@ -1598,7 +1605,7 @@ module.exports = grammar({ _class_member_separator: ($) => choice($._semi, $.multiline_comment), _class_member_declarations: ($) => seq( - sep1($._type_level_declaration, $._class_member_separator), + sep1($.type_level_declaration, $._class_member_separator), optional($._class_member_separator) ), _function_value_parameters: ($) => @@ -1666,7 +1673,7 @@ module.exports = grammar({ throws_clause: ($) => seq($._throws_keyword, "(", field("type", $.unannotated_type), ")"), enum_class_body: ($) => - seq("{", repeat(choice($.enum_entry, $._type_level_declaration)), "}"), + seq("{", repeat(choice($.enum_entry, $.type_level_declaration)), "}"), enum_entry: ($) => seq( optional($.modifiers), @@ -1718,16 +1725,10 @@ module.exports = grammar({ protocol_body: ($) => seq("{", optional($._protocol_member_declarations), "}"), _protocol_member_declarations: ($) => - seq(sep1($._protocol_member_declaration, $._semi), optional($._semi)), - _protocol_member_declaration: ($) => + seq(sep1($.protocol_member_declaration, $._semi), optional($._semi)), + protocol_member_declaration: ($) => choice( - alias( - seq( - $._bodyless_function_declaration, - optional(field("body", $.function_body)) - ), - $.protocol_function_declaration - ), + $.protocol_function_declaration, $.init_declaration, $.deinit_declaration, $.protocol_property_declaration, @@ -1735,6 +1736,11 @@ module.exports = grammar({ $.associatedtype_declaration, $.subscript_declaration ), + protocol_function_declaration: ($) => + seq( + $._bodyless_function_declaration, + optional(field("body", $.function_body)) + ), init_declaration: ($) => prec.right( seq( diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 7b97a68afde6..c4bf650944b2 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -56,6 +56,44 @@ supertypes: - tuple_expression - value_pack_expansion - value_parameter_pack + global_declaration: + - associatedtype_declaration + - class_declaration + - function_declaration + - import_declaration + - init_declaration + - macro_declaration + - operator_declaration + - precedence_group_declaration + - property_declaration + - protocol_declaration + - typealias_declaration + local_declaration: + - class_declaration + - function_declaration + - property_declaration + - typealias_declaration + protocol_member_declaration: + - associatedtype_declaration + - deinit_declaration + - init_declaration + - protocol_function_declaration + - protocol_property_declaration + - subscript_declaration + - typealias_declaration + type_level_declaration: + - associatedtype_declaration + - class_declaration + - deinit_declaration + - function_declaration + - import_declaration + - init_declaration + - operator_declaration + - precedence_group_declaration + - property_declaration + - protocol_declaration + - subscript_declaration + - typealias_declaration unannotated_type: - array_type - dictionary_type @@ -128,7 +166,7 @@ named: target: expression type: type class_body: - $children*: [associatedtype_declaration, class_declaration, deinit_declaration, function_declaration, import_declaration, init_declaration, multiline_comment, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] + $children*: [multiline_comment, type_level_declaration] class_declaration: $children*: [attribute, inheritance_modifier, inheritance_specifier, modifiers, ownership_modifier, property_behavior_modifier, type_constraints, type_parameters] body: [class_body, enum_class_body] @@ -188,7 +226,7 @@ named: $children*: [catch_block, statements] else: enum_class_body: - $children*: [associatedtype_declaration, class_declaration, deinit_declaration, enum_entry, function_declaration, import_declaration, init_declaration, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, subscript_declaration, typealias_declaration] + $children*: [enum_entry, type_level_declaration] enum_entry: $children?: modifiers data_contents*: enum_type_parameters @@ -372,8 +410,7 @@ named: value*: expression property_modifier: protocol_body: - $children*: [associatedtype_declaration, deinit_declaration, init_declaration, protocol_function_declaration, protocol_property_declaration, subscript_declaration, typealias_declaration] - body*: protocol_function_declaration + $children*: protocol_member_declaration protocol_composition_type: $children+: unannotated_type protocol_declaration: @@ -382,9 +419,10 @@ named: declaration_kind: "protocol" name: type_identifier protocol_function_declaration: - $children*: [attribute, modifiers, parameter, statements, throws, throws_clause, type_constraints, type_parameters] + $children*: [attribute, modifiers, parameter, throws, throws_clause, type_constraints, type_parameters] + body?: function_body default_value*: expression - name?: [referenceable_operator, simple_identifier] + name: [referenceable_operator, simple_identifier] return_type?: [implicitly_unwrapped_type, type] protocol_property_declaration: $children+: [modifiers, protocol_property_requirements, type_annotation, type_constraints] @@ -421,11 +459,11 @@ named: shebang_line: simple_identifier: source_file: - $children*: [associatedtype_declaration, class_declaration, do_statement, expression, for_statement, function_declaration, guard_statement, import_declaration, init_declaration, macro_declaration, operator_declaration, precedence_group_declaration, property_declaration, protocol_declaration, repeat_while_statement, shebang_line, statement_label, throw_keyword, typealias_declaration, while_statement] + $children*: [do_statement, expression, for_statement, global_declaration, guard_statement, repeat_while_statement, shebang_line, statement_label, throw_keyword, while_statement] special_literal: statement_label: statements: - $children+: [class_declaration, control_transfer_statement, do_statement, expression, for_statement, function_declaration, guard_statement, property_declaration, repeat_while_statement, statement_label, typealias_declaration, while_statement] + $children+: [control_transfer_statement, do_statement, expression, for_statement, guard_statement, local_declaration, repeat_while_statement, statement_label, while_statement] str_escaped_char: subscript_declaration: $children+: [attribute, computed_property, modifiers, parameter, type_constraints, type_parameters] From 911e59caeff7330641234c35483e0027ef96f5bd Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 21:26:32 +0000 Subject: [PATCH 24/24] unified: regenerate files --- unified/ql/lib/codeql/unified/Ast.qll | 25 ++++++++++------ unified/ql/lib/unified.dbscheme | 42 +++++++++++++-------------- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/unified/ql/lib/codeql/unified/Ast.qll b/unified/ql/lib/codeql/unified/Ast.qll index 3ec274925a16..5b9491fdb9fe 100644 --- a/unified/ql/lib/codeql/unified/Ast.qll +++ b/unified/ql/lib/codeql/unified/Ast.qll @@ -1056,6 +1056,8 @@ module Swift { final override AstNode getAFieldOrChild() { swift_getter_specifier_child(this, _, result) } } + class GlobalDeclaration extends @swift_global_declaration, AstNode { } + /** A class representing `guard_statement` nodes. */ class GuardStatement extends @swift_guard_statement, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1422,6 +1424,8 @@ module Swift { } } + class LocalDeclaration extends @swift_local_declaration, AstNode { } + /** A class representing `macro_declaration` nodes. */ class MacroDeclaration extends @swift_macro_declaration, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -1923,16 +1927,11 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ProtocolBody" } - /** Gets the node corresponding to the field `body`. */ - final ProtocolFunctionDeclaration getBody(int i) { swift_protocol_body_body(this, i, result) } - /** Gets the `i`th child of this node. */ - final AstNode getChild(int i) { swift_protocol_body_child(this, i, result) } + final ProtocolMemberDeclaration getChild(int i) { swift_protocol_body_child(this, i, result) } /** Gets a field or child node of this node. */ - final override AstNode getAFieldOrChild() { - swift_protocol_body_body(this, _, result) or swift_protocol_body_child(this, _, result) - } + final override AstNode getAFieldOrChild() { swift_protocol_body_child(this, _, result) } } /** A class representing `protocol_composition_type` nodes. */ @@ -1983,13 +1982,16 @@ module Swift { /** Gets the name of the primary QL class for this element. */ final override string getAPrimaryQlClass() { result = "ProtocolFunctionDeclaration" } + /** 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) } /** Gets the node corresponding to the field `name`. */ - final AstNode getName() { swift_protocol_function_declaration_name(this, result) } + final AstNode getName() { swift_protocol_function_declaration_def(this, result) } /** Gets the node corresponding to the field `return_type`. */ final AstNode getReturnType() { swift_protocol_function_declaration_return_type(this, result) } @@ -1999,13 +2001,16 @@ module Swift { /** Gets a field or child node of this node. */ final override AstNode getAFieldOrChild() { + swift_protocol_function_declaration_body(this, result) or swift_protocol_function_declaration_default_value(this, _, result) or - swift_protocol_function_declaration_name(this, result) or + swift_protocol_function_declaration_def(this, result) or swift_protocol_function_declaration_return_type(this, result) or swift_protocol_function_declaration_child(this, _, result) } } + class ProtocolMemberDeclaration extends @swift_protocol_member_declaration, AstNode { } + /** A class representing `protocol_property_declaration` nodes. */ class ProtocolPropertyDeclaration extends @swift_protocol_property_declaration, AstNode { /** Gets the name of the primary QL class for this element. */ @@ -2542,6 +2547,8 @@ module Swift { final override string getAPrimaryQlClass() { result = "TypeIdentifier" } } + class TypeLevelDeclaration extends @swift_type_level_declaration, AstNode { } + /** A class representing `type_modifiers` nodes. */ class TypeModifiers extends @swift_type_modifiers, AstNode { /** Gets the name of the primary QL class for this element. */ diff --git a/unified/ql/lib/unified.dbscheme b/unified/ql/lib/unified.dbscheme index a01eb65170ca..b50bc56eaa2a 100644 --- a/unified/ql/lib/unified.dbscheme +++ b/unified/ql/lib/unified.dbscheme @@ -356,7 +356,7 @@ swift_check_expression_def( int type__: @swift_type__ ref ); -@swift_class_body_child_type = @swift_associatedtype_declaration | @swift_class_declaration | @swift_deinit_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_subscript_declaration | @swift_token_multiline_comment | @swift_typealias_declaration +@swift_class_body_child_type = @swift_token_multiline_comment | @swift_type_level_declaration #keyset[swift_class_body, index] swift_class_body_child( @@ -626,7 +626,7 @@ swift_do_statement_def( unique int id: @swift_do_statement ); -@swift_enum_class_body_child_type = @swift_associatedtype_declaration | @swift_class_declaration | @swift_deinit_declaration | @swift_enum_entry | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_subscript_declaration | @swift_typealias_declaration +@swift_enum_class_body_child_type = @swift_enum_entry | @swift_type_level_declaration #keyset[swift_enum_class_body, index] swift_enum_class_body_child( @@ -805,6 +805,8 @@ swift_getter_specifier_def( unique int id: @swift_getter_specifier ); +@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 + #keyset[swift_guard_statement, index] swift_guard_statement_condition( int swift_guard_statement: @swift_guard_statement ref, @@ -1107,6 +1109,8 @@ swift_line_string_literal_def( unique int id: @swift_line_string_literal ); +@swift_local_declaration = @swift_class_declaration | @swift_function_declaration | @swift_property_declaration | @swift_typealias_declaration + #keyset[swift_macro_declaration, index] swift_macro_declaration_default_value( int swift_macro_declaration: @swift_macro_declaration ref, @@ -1438,20 +1442,11 @@ swift_property_declaration_def( unique int id: @swift_property_declaration ); -#keyset[swift_protocol_body, index] -swift_protocol_body_body( - int swift_protocol_body: @swift_protocol_body ref, - int index: int ref, - unique int body: @swift_protocol_function_declaration ref -); - -@swift_protocol_body_child_type = @swift_associatedtype_declaration | @swift_deinit_declaration | @swift_init_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_subscript_declaration | @swift_typealias_declaration - #keyset[swift_protocol_body, index] swift_protocol_body_child( int swift_protocol_body: @swift_protocol_body ref, int index: int ref, - unique int child: @swift_protocol_body_child_type ref + unique int child: @swift_protocol_member_declaration ref ); swift_protocol_body_def( @@ -1490,6 +1485,11 @@ swift_protocol_declaration_def( int name: @swift_token_type_identifier 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, @@ -1499,11 +1499,6 @@ swift_protocol_function_declaration_default_value( @swift_protocol_function_declaration_name_type = @swift_referenceable_operator | @swift_token_simple_identifier -swift_protocol_function_declaration_name( - unique int swift_protocol_function_declaration: @swift_protocol_function_declaration ref, - unique int name: @swift_protocol_function_declaration_name_type ref -); - @swift_protocol_function_declaration_return_type_type = @swift_implicitly_unwrapped_type | @swift_type__ swift_protocol_function_declaration_return_type( @@ -1511,7 +1506,7 @@ swift_protocol_function_declaration_return_type( unique int return_type: @swift_protocol_function_declaration_return_type_type ref ); -@swift_protocol_function_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_parameter | @swift_statements | @swift_throws_clause | @swift_token_throws | @swift_type_constraints | @swift_type_parameters +@swift_protocol_function_declaration_child_type = @swift_attribute | @swift_modifiers | @swift_parameter | @swift_throws_clause | @swift_token_throws | @swift_type_constraints | @swift_type_parameters #keyset[swift_protocol_function_declaration, index] swift_protocol_function_declaration_child( @@ -1521,9 +1516,12 @@ swift_protocol_function_declaration_child( ); swift_protocol_function_declaration_def( - unique int id: @swift_protocol_function_declaration + unique int id: @swift_protocol_function_declaration, + int name: @swift_protocol_function_declaration_name_type ref ); +@swift_protocol_member_declaration = @swift_associatedtype_declaration | @swift_deinit_declaration | @swift_init_declaration | @swift_protocol_function_declaration | @swift_protocol_property_declaration | @swift_subscript_declaration | @swift_typealias_declaration + @swift_protocol_property_declaration_child_type = @swift_modifiers | @swift_protocol_property_requirements | @swift_type_annotation | @swift_type_constraints #keyset[swift_protocol_property_declaration, index] @@ -1644,7 +1642,7 @@ swift_setter_specifier_def( unique int id: @swift_setter_specifier ); -@swift_source_file_child_type = @swift_associatedtype_declaration | @swift_class_declaration | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_import_declaration | @swift_init_declaration | @swift_macro_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_repeat_while_statement | @swift_token_shebang_line | @swift_token_statement_label | @swift_token_throw_keyword | @swift_typealias_declaration | @swift_while_statement +@swift_source_file_child_type = @swift_do_statement | @swift_expression | @swift_for_statement | @swift_global_declaration | @swift_guard_statement | @swift_repeat_while_statement | @swift_token_shebang_line | @swift_token_statement_label | @swift_token_throw_keyword | @swift_while_statement #keyset[swift_source_file, index] swift_source_file_child( @@ -1657,7 +1655,7 @@ swift_source_file_def( unique int id: @swift_source_file ); -@swift_statements_child_type = @swift_class_declaration | @swift_control_transfer_statement | @swift_do_statement | @swift_expression | @swift_for_statement | @swift_function_declaration | @swift_guard_statement | @swift_property_declaration | @swift_repeat_while_statement | @swift_token_statement_label | @swift_typealias_declaration | @swift_while_statement +@swift_statements_child_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_child( @@ -1855,6 +1853,8 @@ swift_type_constraints_def( unique int id: @swift_type_constraints ); +@swift_type_level_declaration = @swift_associatedtype_declaration | @swift_class_declaration | @swift_deinit_declaration | @swift_function_declaration | @swift_import_declaration | @swift_init_declaration | @swift_operator_declaration | @swift_precedence_group_declaration | @swift_property_declaration | @swift_protocol_declaration | @swift_subscript_declaration | @swift_typealias_declaration + #keyset[swift_type_modifiers, index] swift_type_modifiers_child( int swift_type_modifiers: @swift_type_modifiers ref,