mirror of
https://github.com/github/codeql.git
synced 2026-06-29 16:47:09 +02:00
unified: regenerate QL
This commit is contained in:
@@ -978,6 +978,23 @@ module Unified {
|
||||
}
|
||||
}
|
||||
|
||||
/** A class representing `or_pattern` nodes. */
|
||||
class OrPattern extends @unified_or_pattern, AstNode {
|
||||
/** Gets the name of the primary QL class for this element. */
|
||||
final override string getAPrimaryQlClass() { result = "OrPattern" }
|
||||
|
||||
/** Gets the node corresponding to the field `modifier`. */
|
||||
final Modifier getModifier(int i) { unified_or_pattern_modifier(this, i, result) }
|
||||
|
||||
/** Gets the node corresponding to the field `pattern`. */
|
||||
final Pattern getPattern(int i) { unified_or_pattern_pattern(this, i, result) }
|
||||
|
||||
/** Gets a field or child node of this node. */
|
||||
final override AstNode getAFieldOrChild() {
|
||||
unified_or_pattern_modifier(this, _, result) or unified_or_pattern_pattern(this, _, result)
|
||||
}
|
||||
}
|
||||
|
||||
/** A class representing `parameter` nodes. */
|
||||
class Parameter extends @unified_parameter, AstNode {
|
||||
/** Gets the name of the primary QL class for this element. */
|
||||
@@ -1109,14 +1126,14 @@ module Unified {
|
||||
final Modifier getModifier(int i) { unified_switch_case_modifier(this, i, result) }
|
||||
|
||||
/** Gets the node corresponding to the field `pattern`. */
|
||||
final Pattern getPattern(int i) { unified_switch_case_pattern(this, i, result) }
|
||||
final Pattern getPattern() { unified_switch_case_pattern(this, result) }
|
||||
|
||||
/** Gets a field or child node of this node. */
|
||||
final override AstNode getAFieldOrChild() {
|
||||
unified_switch_case_def(this, result) or
|
||||
unified_switch_case_guard(this, result) or
|
||||
unified_switch_case_modifier(this, _, result) or
|
||||
unified_switch_case_pattern(this, _, result)
|
||||
unified_switch_case_pattern(this, result)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1654,6 +1671,10 @@ module Unified {
|
||||
i = -1 and
|
||||
name = "getPrecedence"
|
||||
or
|
||||
result = node.(OrPattern).getModifier(i) and name = "getModifier"
|
||||
or
|
||||
result = node.(OrPattern).getPattern(i) and name = "getPattern"
|
||||
or
|
||||
result = node.(Parameter).getDefault() and i = -1 and name = "getDefault"
|
||||
or
|
||||
result = node.(Parameter).getExternalName() and i = -1 and name = "getExternalName"
|
||||
@@ -1682,7 +1703,7 @@ module Unified {
|
||||
or
|
||||
result = node.(SwitchCase).getModifier(i) and name = "getModifier"
|
||||
or
|
||||
result = node.(SwitchCase).getPattern(i) and name = "getPattern"
|
||||
result = node.(SwitchCase).getPattern() and i = -1 and name = "getPattern"
|
||||
or
|
||||
result = node.(SwitchExpr).getCase(i) and name = "getCase"
|
||||
or
|
||||
|
||||
@@ -716,6 +716,24 @@ unified_operator_syntax_declaration_def(
|
||||
int name: @unified_token_identifier ref
|
||||
);
|
||||
|
||||
#keyset[unified_or_pattern, index]
|
||||
unified_or_pattern_modifier(
|
||||
int unified_or_pattern: @unified_or_pattern ref,
|
||||
int index: int ref,
|
||||
unique int modifier: @unified_token_modifier ref
|
||||
);
|
||||
|
||||
#keyset[unified_or_pattern, index]
|
||||
unified_or_pattern_pattern(
|
||||
int unified_or_pattern: @unified_or_pattern ref,
|
||||
int index: int ref,
|
||||
unique int pattern: @unified_pattern ref
|
||||
);
|
||||
|
||||
unified_or_pattern_def(
|
||||
unique int id: @unified_or_pattern
|
||||
);
|
||||
|
||||
unified_parameter_default(
|
||||
unique int unified_parameter: @unified_parameter ref,
|
||||
unique int default: @unified_expr ref
|
||||
@@ -747,7 +765,7 @@ unified_parameter_def(
|
||||
unique int id: @unified_parameter
|
||||
);
|
||||
|
||||
@unified_pattern = @unified_bulk_importing_pattern | @unified_constructor_pattern | @unified_expr_equality_pattern | @unified_name_pattern | @unified_token_ignore_pattern | @unified_token_unsupported_node | @unified_tuple_pattern
|
||||
@unified_pattern = @unified_bulk_importing_pattern | @unified_constructor_pattern | @unified_expr_equality_pattern | @unified_name_pattern | @unified_or_pattern | @unified_token_ignore_pattern | @unified_token_unsupported_node | @unified_tuple_pattern
|
||||
|
||||
unified_pattern_element_key(
|
||||
unique int unified_pattern_element: @unified_pattern_element ref,
|
||||
@@ -795,10 +813,8 @@ unified_switch_case_modifier(
|
||||
unique int modifier: @unified_token_modifier ref
|
||||
);
|
||||
|
||||
#keyset[unified_switch_case, index]
|
||||
unified_switch_case_pattern(
|
||||
int unified_switch_case: @unified_switch_case ref,
|
||||
int index: int ref,
|
||||
unique int unified_switch_case: @unified_switch_case ref,
|
||||
unique int pattern: @unified_pattern ref
|
||||
);
|
||||
|
||||
@@ -1056,7 +1072,7 @@ unified_trivia_tokeninfo(
|
||||
string value: string ref
|
||||
);
|
||||
|
||||
@unified_ast_node = @unified_accessor_declaration | @unified_argument | @unified_array_literal | @unified_assign_expr | @unified_associated_type_declaration | @unified_base_type | @unified_binary_expr | @unified_block | @unified_bound_type_constraint | @unified_break_expr | @unified_bulk_importing_pattern | @unified_call_expr | @unified_catch_clause | @unified_class_like_declaration | @unified_compound_assign_expr | @unified_constructor_declaration | @unified_constructor_pattern | @unified_continue_expr | @unified_destructor_declaration | @unified_do_while_stmt | @unified_equality_type_constraint | @unified_expr_equality_pattern | @unified_for_each_stmt | @unified_function_declaration | @unified_function_expr | @unified_function_type_expr | @unified_generic_type_expr | @unified_guard_if_stmt | @unified_if_expr | @unified_import_declaration | @unified_initializer_declaration | @unified_key_value_pair | @unified_labeled_stmt | @unified_map_literal | @unified_member_access_expr | @unified_name_expr | @unified_name_pattern | @unified_named_type_expr | @unified_operator_syntax_declaration | @unified_parameter | @unified_pattern_element | @unified_pattern_guard_expr | @unified_return_expr | @unified_switch_case | @unified_switch_expr | @unified_throw_expr | @unified_token | @unified_top_level | @unified_trivia_token | @unified_try_expr | @unified_tuple_expr | @unified_tuple_pattern | @unified_tuple_type_element | @unified_tuple_type_expr | @unified_type_alias_declaration | @unified_type_cast_expr | @unified_type_parameter | @unified_type_test_expr | @unified_type_test_pattern | @unified_unary_expr | @unified_variable_declaration | @unified_while_stmt
|
||||
@unified_ast_node = @unified_accessor_declaration | @unified_argument | @unified_array_literal | @unified_assign_expr | @unified_associated_type_declaration | @unified_base_type | @unified_binary_expr | @unified_block | @unified_bound_type_constraint | @unified_break_expr | @unified_bulk_importing_pattern | @unified_call_expr | @unified_catch_clause | @unified_class_like_declaration | @unified_compound_assign_expr | @unified_constructor_declaration | @unified_constructor_pattern | @unified_continue_expr | @unified_destructor_declaration | @unified_do_while_stmt | @unified_equality_type_constraint | @unified_expr_equality_pattern | @unified_for_each_stmt | @unified_function_declaration | @unified_function_expr | @unified_function_type_expr | @unified_generic_type_expr | @unified_guard_if_stmt | @unified_if_expr | @unified_import_declaration | @unified_initializer_declaration | @unified_key_value_pair | @unified_labeled_stmt | @unified_map_literal | @unified_member_access_expr | @unified_name_expr | @unified_name_pattern | @unified_named_type_expr | @unified_operator_syntax_declaration | @unified_or_pattern | @unified_parameter | @unified_pattern_element | @unified_pattern_guard_expr | @unified_return_expr | @unified_switch_case | @unified_switch_expr | @unified_throw_expr | @unified_token | @unified_top_level | @unified_trivia_token | @unified_try_expr | @unified_tuple_expr | @unified_tuple_pattern | @unified_tuple_type_element | @unified_tuple_type_expr | @unified_type_alias_declaration | @unified_type_cast_expr | @unified_type_parameter | @unified_type_test_expr | @unified_type_test_pattern | @unified_unary_expr | @unified_variable_declaration | @unified_while_stmt
|
||||
|
||||
unified_ast_node_location(
|
||||
unique int node: @unified_ast_node ref,
|
||||
|
||||
Reference in New Issue
Block a user