|
|
|
|
@@ -48,13 +48,13 @@ sourceLocationPrefix(
|
|
|
|
|
|
|
|
|
|
@underscore_arg = @assignment | @binary | @conditional | @operator_assignment | @range | @unary | @underscore_primary
|
|
|
|
|
|
|
|
|
|
@underscore_lhs = @call | @element_reference | @method_call | @scope_resolution | @token_false | @token_nil | @token_true | @underscore_variable
|
|
|
|
|
@underscore_lhs = @call | @element_reference | @scope_resolution | @token_false | @token_nil | @token_true | @underscore_variable
|
|
|
|
|
|
|
|
|
|
@underscore_method_name = @setter | @symbol | @token_class_variable | @token_constant | @token_global_variable | @token_identifier | @token_instance_variable | @token_operator
|
|
|
|
|
|
|
|
|
|
@underscore_primary = @array | @begin | @break | @case__ | @chained_string | @class | @for | @hash | @if | @lambda | @method | @module | @next | @parenthesized_statements | @rational | @redo | @regex | @retry | @return | @singleton_class | @singleton_method | @string__ | @string_array | @subshell | @symbol | @symbol_array | @token_character | @token_complex | @token_float | @token_heredoc_beginning | @token_integer | @unary | @underscore_lhs | @unless | @until | @while | @yield
|
|
|
|
|
|
|
|
|
|
@underscore_statement = @alias | @assignment | @begin_block | @binary | @break | @call | @end_block | @if_modifier | @method_call | @next | @operator_assignment | @rescue_modifier | @return | @unary | @undef | @underscore_arg | @unless_modifier | @until_modifier | @while_modifier | @yield
|
|
|
|
|
@underscore_statement = @alias | @assignment | @begin_block | @binary | @break | @call | @end_block | @if_modifier | @next | @operator_assignment | @rescue_modifier | @return | @unary | @undef | @underscore_arg | @unless_modifier | @until_modifier | @while_modifier | @yield
|
|
|
|
|
|
|
|
|
|
@underscore_variable = @token_class_variable | @token_constant | @token_global_variable | @token_identifier | @token_instance_variable | @token_self | @token_super
|
|
|
|
|
|
|
|
|
|
@@ -68,7 +68,7 @@ alias_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@argument_list_child_type = @block_argument | @break | @call | @hash_splat_argument | @method_call | @next | @pair | @return | @splat_argument | @underscore_arg | @yield
|
|
|
|
|
@argument_list_child_type = @block_argument | @break | @call | @hash_splat_argument | @next | @pair | @return | @splat_argument | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[argument_list, index]
|
|
|
|
|
argument_list_child(
|
|
|
|
|
@@ -85,7 +85,7 @@ argument_list_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@array_child_type = @block_argument | @break | @call | @hash_splat_argument | @method_call | @next | @pair | @return | @splat_argument | @underscore_arg | @yield
|
|
|
|
|
@array_child_type = @block_argument | @break | @call | @hash_splat_argument | @next | @pair | @return | @splat_argument | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[array, index]
|
|
|
|
|
array_child(
|
|
|
|
|
@@ -104,7 +104,7 @@ array_def(
|
|
|
|
|
|
|
|
|
|
@assignment_left_type = @left_assignment_list | @underscore_lhs
|
|
|
|
|
|
|
|
|
|
@assignment_right_type = @break | @call | @method_call | @next | @return | @right_assignment_list | @splat_argument | @underscore_arg | @yield
|
|
|
|
|
@assignment_right_type = @break | @call | @next | @return | @right_assignment_list | @splat_argument | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
assignment_def(
|
|
|
|
|
@@ -184,11 +184,11 @@ begin_block_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@binary_left_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@binary_left_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
@binary_operator_type = @reserved_word
|
|
|
|
|
|
|
|
|
|
@binary_right_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@binary_right_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
binary_def(
|
|
|
|
|
@@ -271,9 +271,26 @@ break_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@call_method_type = @argument_list | @token_constant | @token_identifier | @token_operator
|
|
|
|
|
call_arguments(
|
|
|
|
|
unique int call: @call ref,
|
|
|
|
|
unique int argument_list: @argument_list ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@call_receiver_type = @method_call | @underscore_primary
|
|
|
|
|
@call_block_type = @block | @do_block
|
|
|
|
|
|
|
|
|
|
call_block(
|
|
|
|
|
unique int call: @call ref,
|
|
|
|
|
unique int call_block_type: @call_block_type ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@call_method_type = @argument_list | @scope_resolution | @token_operator | @underscore_variable
|
|
|
|
|
|
|
|
|
|
@call_receiver_type = @call | @underscore_primary
|
|
|
|
|
|
|
|
|
|
call_receiver(
|
|
|
|
|
unique int call: @call ref,
|
|
|
|
|
unique int call_receiver_type: @call_receiver_type ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
call_def(
|
|
|
|
|
@@ -281,7 +298,6 @@ call_def(
|
|
|
|
|
int parent: @ast_node_parent ref,
|
|
|
|
|
int parent_index: int ref,
|
|
|
|
|
int method: @call_method_type ref,
|
|
|
|
|
int receiver: @call_receiver_type ref,
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@@ -426,7 +442,7 @@ do_block_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@element_reference_child_type = @block_argument | @break | @call | @hash_splat_argument | @method_call | @next | @pair | @return | @splat_argument | @underscore_arg | @yield
|
|
|
|
|
@element_reference_child_type = @block_argument | @break | @call | @hash_splat_argument | @next | @pair | @return | @splat_argument | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[element_reference, index]
|
|
|
|
|
element_reference_child(
|
|
|
|
|
@@ -638,7 +654,7 @@ if_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@if_modifier_condition_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@if_modifier_condition_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
if_modifier_def(
|
|
|
|
|
@@ -755,29 +771,6 @@ method_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
method_call_arguments(
|
|
|
|
|
unique int method_call: @method_call ref,
|
|
|
|
|
unique int argument_list: @argument_list ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@method_call_block_type = @block | @do_block
|
|
|
|
|
|
|
|
|
|
method_call_block(
|
|
|
|
|
unique int method_call: @method_call ref,
|
|
|
|
|
unique int method_call_block_type: @method_call_block_type ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@method_call_method_type = @call | @scope_resolution | @underscore_variable
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
method_call_def(
|
|
|
|
|
unique int id: @method_call,
|
|
|
|
|
int parent: @ast_node_parent ref,
|
|
|
|
|
int parent_index: int ref,
|
|
|
|
|
int method: @method_call_method_type ref,
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@method_parameters_child_type = @block_parameter | @destructured_parameter | @hash_splat_parameter | @keyword_parameter | @optional_parameter | @splat_parameter | @token_identifier
|
|
|
|
|
|
|
|
|
|
#keyset[method_parameters, index]
|
|
|
|
|
@@ -830,7 +823,7 @@ next_def(
|
|
|
|
|
|
|
|
|
|
@operator_assignment_operator_type = @reserved_word
|
|
|
|
|
|
|
|
|
|
@operator_assignment_right_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@operator_assignment_right_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
operator_assignment_def(
|
|
|
|
|
@@ -989,7 +982,7 @@ rescue_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@rescue_modifier_handler_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@rescue_modifier_handler_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
rescue_modifier_def(
|
|
|
|
|
@@ -1197,7 +1190,7 @@ subshell_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@superclass_child_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@superclass_child_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
superclass_def(
|
|
|
|
|
@@ -1257,7 +1250,7 @@ then_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@unary_operand_type = @break | @call | @method_call | @next | @parenthesized_statements | @return | @token_float | @token_integer | @underscore_arg | @yield
|
|
|
|
|
@unary_operand_type = @break | @call | @next | @parenthesized_statements | @return | @token_float | @token_integer | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
@unary_operator_type = @reserved_word
|
|
|
|
|
|
|
|
|
|
@@ -1307,7 +1300,7 @@ unless_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@unless_modifier_condition_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@unless_modifier_condition_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
unless_modifier_def(
|
|
|
|
|
@@ -1329,7 +1322,7 @@ until_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@until_modifier_condition_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@until_modifier_condition_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
until_modifier_def(
|
|
|
|
|
@@ -1371,7 +1364,7 @@ while_def(
|
|
|
|
|
int loc: @location ref
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
@while_modifier_condition_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
@while_modifier_condition_type = @break | @call | @next | @return | @underscore_arg | @yield
|
|
|
|
|
|
|
|
|
|
#keyset[parent, parent_index]
|
|
|
|
|
while_modifier_def(
|
|
|
|
|
@@ -1436,7 +1429,7 @@ case @token.kind of
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ast_node = @alias | @argument_list | @array | @assignment | @bare_string | @bare_symbol | @begin | @begin_block | @binary | @block | @block_argument | @block_parameter | @block_parameters | @break | @call | @case__ | @chained_string | @class | @conditional | @destructured_left_assignment | @destructured_parameter | @do | @do_block | @element_reference | @else | @elsif | @end_block | @ensure | @exception_variable | @exceptions | @for | @hash | @hash_splat_argument | @hash_splat_parameter | @heredoc_body | @if | @if_modifier | @in | @interpolation | @keyword_parameter | @lambda | @lambda_parameters | @left_assignment_list | @method | @method_call | @method_parameters | @module | @next | @operator_assignment | @optional_parameter | @pair | @parenthesized_statements | @pattern | @program | @range | @rational | @redo | @regex | @rescue | @rescue_modifier | @rest_assignment | @retry | @return | @right_assignment_list | @scope_resolution | @setter | @singleton_class | @singleton_method | @splat_argument | @splat_parameter | @string__ | @string_array | @subshell | @superclass | @symbol | @symbol_array | @then | @token | @unary | @undef | @unless | @unless_modifier | @until | @until_modifier | @when | @while | @while_modifier | @yield
|
|
|
|
|
@ast_node = @alias | @argument_list | @array | @assignment | @bare_string | @bare_symbol | @begin | @begin_block | @binary | @block | @block_argument | @block_parameter | @block_parameters | @break | @call | @case__ | @chained_string | @class | @conditional | @destructured_left_assignment | @destructured_parameter | @do | @do_block | @element_reference | @else | @elsif | @end_block | @ensure | @exception_variable | @exceptions | @for | @hash | @hash_splat_argument | @hash_splat_parameter | @heredoc_body | @if | @if_modifier | @in | @interpolation | @keyword_parameter | @lambda | @lambda_parameters | @left_assignment_list | @method | @method_parameters | @module | @next | @operator_assignment | @optional_parameter | @pair | @parenthesized_statements | @pattern | @program | @range | @rational | @redo | @regex | @rescue | @rescue_modifier | @rest_assignment | @retry | @return | @right_assignment_list | @scope_resolution | @setter | @singleton_class | @singleton_method | @splat_argument | @splat_parameter | @string__ | @string_array | @subshell | @superclass | @symbol | @symbol_array | @then | @token | @unary | @undef | @unless | @unless_modifier | @until | @until_modifier | @when | @while | @while_modifier | @yield
|
|
|
|
|
|
|
|
|
|
@ast_node_parent = @ast_node | @file
|
|
|
|
|
|
|
|
|
|
|