@@ -52,6 +52,8 @@ case @diagnostic.severity of
52
52
53
53
@ruby_underscore_arg = @ruby_assignment | @ruby_binary | @ruby_conditional | @ruby_operator_assignment | @ruby_range | @ruby_unary | @ruby_underscore_primary
54
54
55
+ @ruby_underscore_call_operator = @ruby_reserved_word
56
+
55
57
@ruby_underscore_expression = @ruby_assignment | @ruby_binary | @ruby_break | @ruby_call | @ruby_next | @ruby_operator_assignment | @ruby_return | @ruby_unary | @ruby_underscore_arg | @ruby_yield
56
58
57
59
@ruby_underscore_lhs = @ruby_call | @ruby_element_reference | @ruby_scope_resolution | @ruby_token_false | @ruby_token_nil | @ruby_token_true | @ruby_underscore_variable
@@ -66,13 +68,13 @@ case @diagnostic.severity of
66
68
67
69
@ruby_underscore_pattern_expr_basic = @ruby_array_pattern | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_parenthesized_pattern | @ruby_range | @ruby_token_identifier | @ruby_underscore_pattern_constant | @ruby_underscore_pattern_primitive | @ruby_variable_reference_pattern
68
70
69
- @ruby_underscore_pattern_primitive = @ruby_delimited_symbol | @ruby_lambda | @ruby_regex | @ruby_string__ | @ruby_string_array | @ruby_symbol_array | @ruby_token_encoding | @ruby_token_false | @ruby_token_file | @ruby_token_line | @ruby_token_nil | @ruby_token_self | @ruby_token_simple_symbol | @ruby_token_true | @ruby_unary | @ruby_underscore_simple_numeric
71
+ @ruby_underscore_pattern_primitive = @ruby_delimited_symbol | @ruby_lambda | @ruby_regex | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ ruby_symbol_array | @ruby_token_encoding | @ruby_token_false | @ruby_token_file | @ruby_token_heredoc_beginning | @ruby_token_line | @ruby_token_nil | @ruby_token_self | @ruby_token_simple_symbol | @ruby_token_true | @ruby_unary | @ruby_underscore_simple_numeric
70
72
71
73
@ruby_underscore_pattern_top_expr_body = @ruby_array_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_underscore_pattern_expr
72
74
73
- @ruby_underscore_primary = @ruby_array | @ruby_begin | @ruby_break | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_delimited_symbol | @ruby_for | @ruby_hash | @ruby_if | @ruby_lambda | @ruby_method | @ruby_module | @ruby_next | @ruby_parenthesized_statements | @ruby_redo | @ruby_regex | @ruby_retry | @ruby_return | @ruby_singleton_class | @ruby_singleton_method | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_character | @ruby_token_heredoc_beginning | @ruby_token_simple_symbol | @ruby_unary | @ruby_underscore_lhs | @ruby_underscore_simple_numeric | @ruby_unless | @ruby_until | @ruby_while | @ruby_yield
75
+ @ruby_underscore_primary = @ruby_array | @ruby_begin | @ruby_break | @ruby_call | @ ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_delimited_symbol | @ruby_for | @ruby_hash | @ruby_if | @ruby_lambda | @ruby_method | @ruby_module | @ruby_next | @ruby_parenthesized_statements | @ruby_redo | @ruby_regex | @ruby_retry | @ruby_return | @ruby_singleton_class | @ruby_singleton_method | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_character | @ruby_token_heredoc_beginning | @ruby_token_simple_symbol | @ruby_unary | @ruby_underscore_lhs | @ruby_underscore_simple_numeric | @ruby_unless | @ruby_until | @ruby_while | @ruby_yield
74
76
75
- @ruby_underscore_simple_numeric = @ruby_rational | @ruby_token_complex | @ruby_token_float | @ruby_token_integer
77
+ @ruby_underscore_simple_numeric = @ruby_complex | @ruby_rational | @ruby_token_float | @ruby_token_integer
76
78
77
79
@ruby_underscore_statement = @ruby_alias | @ruby_begin_block | @ruby_end_block | @ruby_if_modifier | @ruby_rescue_modifier | @ruby_undef | @ruby_underscore_expression | @ruby_unless_modifier | @ruby_until_modifier | @ruby_while_modifier
78
80
@@ -147,7 +149,7 @@ ruby_as_pattern_def(
147
149
148
150
@ruby_assignment_left_type = @ruby_left_assignment_list | @ruby_underscore_lhs
149
151
150
- @ruby_assignment_right_type = @ruby_right_assignment_list | @ruby_splat_argument | @ruby_underscore_expression
152
+ @ruby_assignment_right_type = @ruby_rescue_modifier | @ ruby_right_assignment_list | @ruby_splat_argument | @ruby_underscore_expression
151
153
152
154
ruby_assignment_def(
153
155
unique int id: @ruby_assignment,
@@ -207,6 +209,8 @@ ruby_begin_block_def(
207
209
unique int id: @ruby_begin_block
208
210
);
209
211
212
+ @ruby_binary_left_type = @ruby_underscore_expression | @ruby_underscore_simple_numeric
213
+
210
214
case @ruby_binary.operator of
211
215
0 = @ruby_binary_bangequal
212
216
| 1 = @ruby_binary_bangtilde
@@ -238,7 +242,7 @@ case @ruby_binary.operator of
238
242
239
243
ruby_binary_def(
240
244
unique int id: @ruby_binary,
241
- int left: @ruby_underscore_expression ref,
245
+ int left: @ruby_binary_left_type ref,
242
246
int operator: int ref,
243
247
int right: @ruby_underscore_expression ref
244
248
);
@@ -279,6 +283,13 @@ ruby_block_parameter_def(
279
283
unique int id: @ruby_block_parameter
280
284
);
281
285
286
+ #keyset[ruby_block_parameters, index]
287
+ ruby_block_parameters_locals(
288
+ int ruby_block_parameters: @ruby_block_parameters ref,
289
+ int index: int ref,
290
+ unique int locals: @ruby_token_identifier ref
291
+ );
292
+
282
293
@ruby_block_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier
283
294
284
295
#keyset[ruby_block_parameters, index]
@@ -313,18 +324,25 @@ ruby_call_block(
313
324
unique int block: @ruby_call_block_type ref
314
325
);
315
326
316
- @ruby_call_method_type = @ruby_argument_list | @ruby_scope_resolution | @ruby_token_operator | @ruby_underscore_variable
327
+ @ruby_call_method_type = @ruby_token_operator | @ruby_underscore_variable
328
+
329
+ ruby_call_method(
330
+ unique int ruby_call: @ruby_call ref,
331
+ unique int method: @ruby_call_method_type ref
332
+ );
317
333
318
- @ruby_call_receiver_type = @ruby_call | @ruby_underscore_primary
334
+ ruby_call_operator(
335
+ unique int ruby_call: @ruby_call ref,
336
+ unique int operator: @ruby_underscore_call_operator ref
337
+ );
319
338
320
339
ruby_call_receiver(
321
340
unique int ruby_call: @ruby_call ref,
322
- unique int receiver: @ruby_call_receiver_type ref
341
+ unique int receiver: @ruby_underscore_primary ref
323
342
);
324
343
325
344
ruby_call_def(
326
- unique int id: @ruby_call,
327
- int method: @ruby_call_method_type ref
345
+ unique int id: @ruby_call
328
346
);
329
347
330
348
ruby_case_value(
@@ -394,6 +412,13 @@ ruby_class_def(
394
412
int name: @ruby_class_name_type ref
395
413
);
396
414
415
+ @ruby_complex_child_type = @ruby_rational | @ruby_token_float | @ruby_token_integer
416
+
417
+ ruby_complex_def(
418
+ unique int id: @ruby_complex,
419
+ int child: @ruby_complex_child_type ref
420
+ );
421
+
397
422
ruby_conditional_def(
398
423
unique int id: @ruby_conditional,
399
424
int alternative: @ruby_underscore_arg ref,
@@ -846,11 +871,13 @@ case @ruby_operator_assignment.operator of
846
871
;
847
872
848
873
874
+ @ruby_operator_assignment_right_type = @ruby_rescue_modifier | @ruby_underscore_expression
875
+
849
876
ruby_operator_assignment_def(
850
877
unique int id: @ruby_operator_assignment,
851
878
int left: @ruby_underscore_lhs ref,
852
879
int operator: int ref,
853
- int right: @ruby_underscore_expression ref
880
+ int right: @ruby_operator_assignment_right_type ref
854
881
);
855
882
856
883
ruby_optional_parameter_def(
@@ -1030,8 +1057,6 @@ ruby_right_assignment_list_def(
1030
1057
unique int id: @ruby_right_assignment_list
1031
1058
);
1032
1059
1033
- @ruby_scope_resolution_name_type = @ruby_token_constant | @ruby_token_identifier
1034
-
1035
1060
@ruby_scope_resolution_scope_type = @ruby_underscore_pattern_constant | @ruby_underscore_primary
1036
1061
1037
1062
ruby_scope_resolution_scope(
@@ -1041,7 +1066,7 @@ ruby_scope_resolution_scope(
1041
1066
1042
1067
ruby_scope_resolution_def(
1043
1068
unique int id: @ruby_scope_resolution,
1044
- int name: @ruby_scope_resolution_name_type ref
1069
+ int name: @ruby_token_constant ref
1045
1070
);
1046
1071
1047
1072
ruby_setter_def(
@@ -1289,38 +1314,37 @@ case @ruby_token.kind of
1289
1314
| 1 = @ruby_token_character
1290
1315
| 2 = @ruby_token_class_variable
1291
1316
| 3 = @ruby_token_comment
1292
- | 4 = @ruby_token_complex
1293
- | 5 = @ruby_token_constant
1294
- | 6 = @ruby_token_empty_statement
1295
- | 7 = @ruby_token_encoding
1296
- | 8 = @ruby_token_escape_sequence
1297
- | 9 = @ruby_token_false
1298
- | 10 = @ruby_token_file
1299
- | 11 = @ruby_token_float
1300
- | 12 = @ruby_token_forward_argument
1301
- | 13 = @ruby_token_forward_parameter
1302
- | 14 = @ruby_token_global_variable
1303
- | 15 = @ruby_token_hash_key_symbol
1304
- | 16 = @ruby_token_hash_splat_nil
1305
- | 17 = @ruby_token_heredoc_beginning
1306
- | 18 = @ruby_token_heredoc_content
1307
- | 19 = @ruby_token_heredoc_end
1308
- | 20 = @ruby_token_identifier
1309
- | 21 = @ruby_token_instance_variable
1310
- | 22 = @ruby_token_integer
1311
- | 23 = @ruby_token_line
1312
- | 24 = @ruby_token_nil
1313
- | 25 = @ruby_token_operator
1314
- | 26 = @ruby_token_self
1315
- | 27 = @ruby_token_simple_symbol
1316
- | 28 = @ruby_token_string_content
1317
- | 29 = @ruby_token_super
1318
- | 30 = @ruby_token_true
1319
- | 31 = @ruby_token_uninterpreted
1317
+ | 4 = @ruby_token_constant
1318
+ | 5 = @ruby_token_empty_statement
1319
+ | 6 = @ruby_token_encoding
1320
+ | 7 = @ruby_token_escape_sequence
1321
+ | 8 = @ruby_token_false
1322
+ | 9 = @ruby_token_file
1323
+ | 10 = @ruby_token_float
1324
+ | 11 = @ruby_token_forward_argument
1325
+ | 12 = @ruby_token_forward_parameter
1326
+ | 13 = @ruby_token_global_variable
1327
+ | 14 = @ruby_token_hash_key_symbol
1328
+ | 15 = @ruby_token_hash_splat_nil
1329
+ | 16 = @ruby_token_heredoc_beginning
1330
+ | 17 = @ruby_token_heredoc_content
1331
+ | 18 = @ruby_token_heredoc_end
1332
+ | 19 = @ruby_token_identifier
1333
+ | 20 = @ruby_token_instance_variable
1334
+ | 21 = @ruby_token_integer
1335
+ | 22 = @ruby_token_line
1336
+ | 23 = @ruby_token_nil
1337
+ | 24 = @ruby_token_operator
1338
+ | 25 = @ruby_token_self
1339
+ | 26 = @ruby_token_simple_symbol
1340
+ | 27 = @ruby_token_string_content
1341
+ | 28 = @ruby_token_super
1342
+ | 29 = @ruby_token_true
1343
+ | 30 = @ruby_token_uninterpreted
1320
1344
;
1321
1345
1322
1346
1323
- @ruby_ast_node = @ruby_alias | @ruby_alternative_pattern | @ruby_argument_list | @ruby_array | @ruby_array_pattern | @ruby_as_pattern | @ruby_assignment | @ruby_bare_string | @ruby_bare_symbol | @ruby_begin | @ruby_begin_block | @ruby_binary | @ruby_block | @ruby_block_argument | @ruby_block_parameter | @ruby_block_parameters | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_conditional | @ruby_delimited_symbol | @ruby_destructured_left_assignment | @ruby_destructured_parameter | @ruby_do | @ruby_do_block | @ruby_element_reference | @ruby_else | @ruby_elsif | @ruby_end_block | @ruby_ensure | @ruby_exception_variable | @ruby_exceptions | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_for | @ruby_hash | @ruby_hash_pattern | @ruby_hash_splat_argument | @ruby_hash_splat_parameter | @ruby_heredoc_body | @ruby_if | @ruby_if_guard | @ruby_if_modifier | @ruby_in | @ruby_in_clause | @ruby_interpolation | @ruby_keyword_parameter | @ruby_keyword_pattern | @ruby_lambda | @ruby_lambda_parameters | @ruby_left_assignment_list | @ruby_method | @ruby_method_parameters | @ruby_module | @ruby_next | @ruby_operator_assignment | @ruby_optional_parameter | @ruby_pair | @ruby_parenthesized_pattern | @ruby_parenthesized_statements | @ruby_pattern | @ruby_program | @ruby_range | @ruby_rational | @ruby_redo | @ruby_regex | @ruby_rescue | @ruby_rescue_modifier | @ruby_rest_assignment | @ruby_retry | @ruby_return | @ruby_right_assignment_list | @ruby_scope_resolution | @ruby_setter | @ruby_singleton_class | @ruby_singleton_method | @ruby_splat_argument | @ruby_splat_parameter | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_superclass | @ruby_symbol_array | @ruby_then | @ruby_token | @ruby_unary | @ruby_undef | @ruby_unless | @ruby_unless_guard | @ruby_unless_modifier | @ruby_until | @ruby_until_modifier | @ruby_variable_reference_pattern | @ruby_when | @ruby_while | @ruby_while_modifier | @ruby_yield
1347
+ @ruby_ast_node = @ruby_alias | @ruby_alternative_pattern | @ruby_argument_list | @ruby_array | @ruby_array_pattern | @ruby_as_pattern | @ruby_assignment | @ruby_bare_string | @ruby_bare_symbol | @ruby_begin | @ruby_begin_block | @ruby_binary | @ruby_block | @ruby_block_argument | @ruby_block_parameter | @ruby_block_parameters | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_complex | @ruby_conditional | @ruby_delimited_symbol | @ruby_destructured_left_assignment | @ruby_destructured_parameter | @ruby_do | @ruby_do_block | @ruby_element_reference | @ruby_else | @ruby_elsif | @ruby_end_block | @ruby_ensure | @ruby_exception_variable | @ruby_exceptions | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_for | @ruby_hash | @ruby_hash_pattern | @ruby_hash_splat_argument | @ruby_hash_splat_parameter | @ruby_heredoc_body | @ruby_if | @ruby_if_guard | @ruby_if_modifier | @ruby_in | @ruby_in_clause | @ruby_interpolation | @ruby_keyword_parameter | @ruby_keyword_pattern | @ruby_lambda | @ruby_lambda_parameters | @ruby_left_assignment_list | @ruby_method | @ruby_method_parameters | @ruby_module | @ruby_next | @ruby_operator_assignment | @ruby_optional_parameter | @ruby_pair | @ruby_parenthesized_pattern | @ruby_parenthesized_statements | @ruby_pattern | @ruby_program | @ruby_range | @ruby_rational | @ruby_redo | @ruby_regex | @ruby_rescue | @ruby_rescue_modifier | @ruby_rest_assignment | @ruby_retry | @ruby_return | @ruby_right_assignment_list | @ruby_scope_resolution | @ruby_setter | @ruby_singleton_class | @ruby_singleton_method | @ruby_splat_argument | @ruby_splat_parameter | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_superclass | @ruby_symbol_array | @ruby_then | @ruby_token | @ruby_unary | @ruby_undef | @ruby_unless | @ruby_unless_guard | @ruby_unless_modifier | @ruby_until | @ruby_until_modifier | @ruby_variable_reference_pattern | @ruby_when | @ruby_while | @ruby_while_modifier | @ruby_yield
1324
1348
1325
1349
@ruby_ast_node_parent = @file | @ruby_ast_node
1326
1350
0 commit comments