u-struct 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +5 -5
  3. data/.rubocop.yml +129 -0
  4. data/.rubocop_todo.yml +10 -0
  5. data/.tool-versions +1 -0
  6. data/CHANGELOG.md +115 -27
  7. data/Gemfile +14 -3
  8. data/README.md +166 -62
  9. data/Rakefile +5 -5
  10. data/bin/console +3 -3
  11. data/bin/prepare_coverage +7 -9
  12. data/bin/run_ci +17 -0
  13. data/bin/tapioca +28 -0
  14. data/examples/rgb/number.rb +1 -1
  15. data/examples/rgb_1.rb +3 -3
  16. data/examples/rgb_2.rb +2 -2
  17. data/examples/rgb_3.rb +1 -1
  18. data/lib/micro/struct/factory/create_struct.rb +12 -5
  19. data/lib/micro/struct/factory/members.rb +1 -0
  20. data/lib/micro/struct/factory.rb +10 -5
  21. data/lib/micro/struct/features.rb +18 -23
  22. data/lib/micro/struct/normalize_names.rb +4 -3
  23. data/lib/micro/struct/version.rb +2 -1
  24. data/lib/micro/struct.rb +32 -5
  25. data/lib/u-struct.rb +2 -0
  26. data/rbi/micro/struct/factory/create_struct.rbi +60 -0
  27. data/rbi/micro/struct/factory/members.rbi +67 -0
  28. data/rbi/micro/struct/factory.rbi +41 -0
  29. data/rbi/micro/struct/features.rbi +41 -0
  30. data/rbi/micro/struct/normalize_names.rbi +20 -0
  31. data/rbi/micro/struct/version.rbi +3 -0
  32. data/rbi/micro/struct.rbi +68 -0
  33. data/sorbet/config +8 -0
  34. data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
  35. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  36. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +11 -0
  37. data/sorbet/rbi/gems/docile@1.4.0.rbi +54 -0
  38. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  39. data/sorbet/rbi/gems/minitest@5.15.0.rbi +345 -0
  40. data/sorbet/rbi/gems/parser@3.1.0.0.rbi +1196 -0
  41. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  42. data/sorbet/rbi/gems/rake@13.0.6.rbi +806 -0
  43. data/sorbet/rbi/gems/rbi@0.0.9.rbi +1602 -0
  44. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +89 -0
  45. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +577 -0
  46. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +8 -0
  47. data/sorbet/rbi/gems/spoom@1.1.8.rbi +1252 -0
  48. data/sorbet/rbi/gems/tapioca@0.6.2.rbi +1232 -0
  49. data/sorbet/rbi/gems/thor@1.2.1.rbi +844 -0
  50. data/sorbet/rbi/gems/unparser@0.6.3.rbi +8 -0
  51. data/sorbet/rbi/gems/webrick@1.7.0.rbi +601 -0
  52. data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +199 -0
  53. data/sorbet/rbi/gems/yard@0.9.27.rbi +4112 -0
  54. data/sorbet/tapioca/config.yml +13 -0
  55. data/sorbet/tapioca/require.rb +4 -0
  56. data/u-struct.gemspec +3 -3
  57. metadata +37 -3
  58. data/bin/test +0 -8
@@ -0,0 +1,1196 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `parser` gem.
5
+ # Please instead update this file by running `bin/tapioca gem parser`.
6
+
7
+ module Parser; end
8
+ module Parser::AST; end
9
+
10
+ class Parser::AST::Node < ::AST::Node
11
+ def assign_properties(properties); end
12
+ def loc; end
13
+ def location; end
14
+ end
15
+
16
+ class Parser::AST::Processor < ::AST::Processor
17
+ def on_alias(node); end
18
+ def on_and(node); end
19
+ def on_and_asgn(node); end
20
+ def on_arg(node); end
21
+ def on_arg_expr(node); end
22
+ def on_args(node); end
23
+ def on_argument(node); end
24
+ def on_array(node); end
25
+ def on_array_pattern(node); end
26
+ def on_array_pattern_with_tail(node); end
27
+ def on_back_ref(node); end
28
+ def on_begin(node); end
29
+ def on_block(node); end
30
+ def on_block_pass(node); end
31
+ def on_blockarg(node); end
32
+ def on_blockarg_expr(node); end
33
+ def on_break(node); end
34
+ def on_case(node); end
35
+ def on_case_match(node); end
36
+ def on_casgn(node); end
37
+ def on_class(node); end
38
+ def on_const(node); end
39
+ def on_const_pattern(node); end
40
+ def on_csend(node); end
41
+ def on_cvar(node); end
42
+ def on_cvasgn(node); end
43
+ def on_def(node); end
44
+ def on_defined?(node); end
45
+ def on_defs(node); end
46
+ def on_dstr(node); end
47
+ def on_dsym(node); end
48
+ def on_eflipflop(node); end
49
+ def on_empty_else(node); end
50
+ def on_ensure(node); end
51
+ def on_erange(node); end
52
+ def on_find_pattern(node); end
53
+ def on_for(node); end
54
+ def on_forward_arg(node); end
55
+ def on_gvar(node); end
56
+ def on_gvasgn(node); end
57
+ def on_hash(node); end
58
+ def on_hash_pattern(node); end
59
+ def on_if(node); end
60
+ def on_if_guard(node); end
61
+ def on_iflipflop(node); end
62
+ def on_in_match(node); end
63
+ def on_in_pattern(node); end
64
+ def on_index(node); end
65
+ def on_indexasgn(node); end
66
+ def on_irange(node); end
67
+ def on_ivar(node); end
68
+ def on_ivasgn(node); end
69
+ def on_kwarg(node); end
70
+ def on_kwargs(node); end
71
+ def on_kwbegin(node); end
72
+ def on_kwoptarg(node); end
73
+ def on_kwrestarg(node); end
74
+ def on_kwsplat(node); end
75
+ def on_lambda(node); end
76
+ def on_lvar(node); end
77
+ def on_lvasgn(node); end
78
+ def on_masgn(node); end
79
+ def on_match_alt(node); end
80
+ def on_match_as(node); end
81
+ def on_match_current_line(node); end
82
+ def on_match_pattern(node); end
83
+ def on_match_pattern_p(node); end
84
+ def on_match_rest(node); end
85
+ def on_match_var(node); end
86
+ def on_match_with_lvasgn(node); end
87
+ def on_mlhs(node); end
88
+ def on_module(node); end
89
+ def on_next(node); end
90
+ def on_not(node); end
91
+ def on_nth_ref(node); end
92
+ def on_numblock(node); end
93
+ def on_op_asgn(node); end
94
+ def on_optarg(node); end
95
+ def on_or(node); end
96
+ def on_or_asgn(node); end
97
+ def on_pair(node); end
98
+ def on_pin(node); end
99
+ def on_postexe(node); end
100
+ def on_preexe(node); end
101
+ def on_procarg0(node); end
102
+ def on_redo(node); end
103
+ def on_regexp(node); end
104
+ def on_resbody(node); end
105
+ def on_rescue(node); end
106
+ def on_restarg(node); end
107
+ def on_restarg_expr(node); end
108
+ def on_retry(node); end
109
+ def on_return(node); end
110
+ def on_sclass(node); end
111
+ def on_send(node); end
112
+ def on_shadowarg(node); end
113
+ def on_splat(node); end
114
+ def on_super(node); end
115
+ def on_undef(node); end
116
+ def on_unless_guard(node); end
117
+ def on_until(node); end
118
+ def on_until_post(node); end
119
+ def on_var(node); end
120
+ def on_vasgn(node); end
121
+ def on_when(node); end
122
+ def on_while(node); end
123
+ def on_while_post(node); end
124
+ def on_xstr(node); end
125
+ def on_yield(node); end
126
+ def process_argument_node(node); end
127
+ def process_regular_node(node); end
128
+ def process_var_asgn_node(node); end
129
+ def process_variable_node(node); end
130
+ end
131
+
132
+ class Parser::Base < ::Racc::Parser
133
+ def initialize(builder = T.unsafe(nil)); end
134
+
135
+ def builder; end
136
+ def context; end
137
+ def current_arg_stack; end
138
+ def diagnostics; end
139
+ def lexer; end
140
+ def max_numparam_stack; end
141
+ def parse(source_buffer); end
142
+ def parse_with_comments(source_buffer); end
143
+ def pattern_hash_keys; end
144
+ def pattern_variables; end
145
+ def reset; end
146
+ def source_buffer; end
147
+ def static_env; end
148
+ def tokenize(source_buffer, recover = T.unsafe(nil)); end
149
+
150
+ private
151
+
152
+ def check_kwarg_name(name_t); end
153
+ def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end
154
+ def next_token; end
155
+ def on_error(error_token_id, error_value, value_stack); end
156
+
157
+ class << self
158
+ def default_parser; end
159
+ def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end
160
+ def parse_file(filename); end
161
+ def parse_file_with_comments(filename); end
162
+ def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end
163
+
164
+ private
165
+
166
+ def setup_source_buffer(file, line, string, encoding); end
167
+ end
168
+ end
169
+
170
+ module Parser::Builders; end
171
+
172
+ class Parser::Builders::Default
173
+ def initialize; end
174
+
175
+ def __ENCODING__(__ENCODING__t); end
176
+ def __FILE__(__FILE__t); end
177
+ def __LINE__(__LINE__t); end
178
+ def accessible(node); end
179
+ def alias(alias_t, to, from); end
180
+ def arg(name_t); end
181
+ def arg_expr(expr); end
182
+ def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end
183
+ def array(begin_t, elements, end_t); end
184
+ def array_pattern(lbrack_t, elements, rbrack_t); end
185
+ def assign(lhs, eql_t, rhs); end
186
+ def assignable(node); end
187
+ def associate(begin_t, pairs, end_t); end
188
+ def attr_asgn(receiver, dot_t, selector_t); end
189
+ def back_ref(token); end
190
+ def begin(begin_t, body, end_t); end
191
+ def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end
192
+ def begin_keyword(begin_t, body, end_t); end
193
+ def binary_op(receiver, operator_t, arg); end
194
+ def block(method_call, begin_t, args, body, end_t); end
195
+ def block_pass(amper_t, arg); end
196
+ def blockarg(amper_t, name_t); end
197
+ def blockarg_expr(amper_t, expr); end
198
+ def call_lambda(lambda_t); end
199
+ def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end
200
+ def call_type_for_dot(dot_t); end
201
+ def case(case_t, expr, when_bodies, else_t, else_body, end_t); end
202
+ def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end
203
+ def character(char_t); end
204
+ def complex(complex_t); end
205
+ def compstmt(statements); end
206
+ def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end
207
+ def condition_mod(if_true, if_false, cond_t, cond); end
208
+ def const(name_t); end
209
+ def const_fetch(scope, t_colon2, name_t); end
210
+ def const_global(t_colon3, name_t); end
211
+ def const_op_assignable(node); end
212
+ def const_pattern(const, ldelim_t, pattern, rdelim_t); end
213
+ def cvar(token); end
214
+ def dedent_string(node, dedent_level); end
215
+ def def_class(class_t, name, lt_t, superclass, body, end_t); end
216
+ def def_endless_method(def_t, name_t, args, assignment_t, body); end
217
+ def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end
218
+ def def_method(def_t, name_t, args, body, end_t); end
219
+ def def_module(module_t, name, body, end_t); end
220
+ def def_sclass(class_t, lshft_t, expr, body, end_t); end
221
+ def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end
222
+ def emit_file_line_as_literals; end
223
+ def emit_file_line_as_literals=(_arg0); end
224
+ def false(false_t); end
225
+ def find_pattern(lbrack_t, elements, rbrack_t); end
226
+ def float(float_t); end
227
+ def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end
228
+ def forward_arg(dots_t); end
229
+ def forward_only_args(begin_t, dots_t, end_t); end
230
+ def forwarded_args(dots_t); end
231
+ def gvar(token); end
232
+ def hash_pattern(lbrace_t, kwargs, rbrace_t); end
233
+ def ident(token); end
234
+ def if_guard(if_t, if_body); end
235
+ def in_match(lhs, in_t, rhs); end
236
+ def in_pattern(in_t, pattern, guard, then_t, body); end
237
+ def index(receiver, lbrack_t, indexes, rbrack_t); end
238
+ def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end
239
+ def integer(integer_t); end
240
+ def ivar(token); end
241
+ def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end
242
+ def kwarg(name_t); end
243
+ def kwnilarg(dstar_t, nil_t); end
244
+ def kwoptarg(name_t, value); end
245
+ def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end
246
+ def kwsplat(dstar_t, arg); end
247
+ def logical_op(type, lhs, op_t, rhs); end
248
+ def loop(type, keyword_t, cond, do_t, body, end_t); end
249
+ def loop_mod(type, body, keyword_t, cond); end
250
+ def match_alt(left, pipe_t, right); end
251
+ def match_as(value, assoc_t, as); end
252
+ def match_hash_var(name_t); end
253
+ def match_hash_var_from_str(begin_t, strings, end_t); end
254
+ def match_label(label_type, label); end
255
+ def match_nil_pattern(dstar_t, nil_t); end
256
+ def match_op(receiver, match_t, arg); end
257
+ def match_pair(label_type, label, value); end
258
+ def match_pattern(lhs, match_t, rhs); end
259
+ def match_pattern_p(lhs, match_t, rhs); end
260
+ def match_rest(star_t, name_t = T.unsafe(nil)); end
261
+ def match_var(name_t); end
262
+ def match_with_trailing_comma(match, comma_t); end
263
+ def multi_assign(lhs, eql_t, rhs); end
264
+ def multi_lhs(begin_t, items, end_t); end
265
+ def nil(nil_t); end
266
+ def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end
267
+ def nth_ref(token); end
268
+ def numargs(max_numparam); end
269
+ def objc_kwarg(kwname_t, assoc_t, name_t); end
270
+ def objc_restarg(star_t, name = T.unsafe(nil)); end
271
+ def objc_varargs(pair, rest_of_varargs); end
272
+ def op_assign(lhs, op_t, rhs); end
273
+ def optarg(name_t, eql_t, value); end
274
+ def pair(key, assoc_t, value); end
275
+ def pair_keyword(key_t, value); end
276
+ def pair_label(key_t); end
277
+ def pair_list_18(list); end
278
+ def pair_quoted(begin_t, parts, end_t, value); end
279
+ def parser; end
280
+ def parser=(_arg0); end
281
+ def pin(pin_t, var); end
282
+ def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end
283
+ def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end
284
+ def procarg0(arg); end
285
+ def range_exclusive(lhs, dot3_t, rhs); end
286
+ def range_inclusive(lhs, dot2_t, rhs); end
287
+ def rational(rational_t); end
288
+ def regexp_compose(begin_t, parts, end_t, options); end
289
+ def regexp_options(regopt_t); end
290
+ def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end
291
+ def restarg(star_t, name_t = T.unsafe(nil)); end
292
+ def restarg_expr(star_t, expr = T.unsafe(nil)); end
293
+ def self(token); end
294
+ def shadowarg(name_t); end
295
+ def splat(star_t, arg = T.unsafe(nil)); end
296
+ def string(string_t); end
297
+ def string_compose(begin_t, parts, end_t); end
298
+ def string_internal(string_t); end
299
+ def symbol(symbol_t); end
300
+ def symbol_compose(begin_t, parts, end_t); end
301
+ def symbol_internal(symbol_t); end
302
+ def symbols_compose(begin_t, parts, end_t); end
303
+ def ternary(cond, question_t, if_true, colon_t, if_false); end
304
+ def true(true_t); end
305
+ def unary_num(unary_t, numeric); end
306
+ def unary_op(op_t, receiver); end
307
+ def undef_method(undef_t, names); end
308
+ def unless_guard(unless_t, unless_body); end
309
+ def when(when_t, patterns, then_t, body); end
310
+ def word(parts); end
311
+ def words_compose(begin_t, parts, end_t); end
312
+ def xstring_compose(begin_t, parts, end_t); end
313
+
314
+ private
315
+
316
+ def arg_name_collides?(this_name, that_name); end
317
+ def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end
318
+ def binary_op_map(left_e, op_t, right_e); end
319
+ def block_map(receiver_l, begin_t, end_t); end
320
+ def check_assignment_to_numparam(name, loc); end
321
+ def check_condition(cond); end
322
+ def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end
323
+ def check_duplicate_args(args, map = T.unsafe(nil)); end
324
+ def check_duplicate_pattern_key(name, loc); end
325
+ def check_duplicate_pattern_variable(name, loc); end
326
+ def check_lvar_name(name, loc); end
327
+ def check_reserved_for_numparam(name, loc); end
328
+ def collapse_string_parts?(parts); end
329
+ def collection_map(begin_t, parts, end_t); end
330
+ def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end
331
+ def constant_map(scope, colon2_t, name_t); end
332
+ def definition_map(keyword_t, operator_t, name_t, end_t); end
333
+ def delimited_string_map(string_t); end
334
+ def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end
335
+ def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end
336
+ def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end
337
+ def expr_map(loc); end
338
+ def for_map(keyword_t, in_t, begin_t, end_t); end
339
+ def guard_map(keyword_t, guard_body_e); end
340
+ def index_map(receiver_e, lbrack_t, rbrack_t); end
341
+ def join_exprs(left_expr, right_expr); end
342
+ def keyword_map(keyword_t, begin_t, args, end_t); end
343
+ def keyword_mod_map(pre_e, keyword_t, post_e); end
344
+ def kwarg_map(name_t, value_e = T.unsafe(nil)); end
345
+ def kwargs?(node); end
346
+ def loc(token); end
347
+ def module_definition_map(keyword_t, name_e, operator_t, end_t); end
348
+ def n(type, children, source_map); end
349
+ def n0(type, source_map); end
350
+ def numeric(kind, token); end
351
+ def pair_keyword_map(key_t, value_e); end
352
+ def pair_quoted_map(begin_t, end_t, value_e); end
353
+ def prefix_string_map(symbol); end
354
+ def range_map(start_e, op_t, end_e); end
355
+ def regexp_map(begin_t, end_t, options_e); end
356
+ def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end
357
+ def rewrite_hash_args_to_kwargs(args); end
358
+ def send_binary_op_map(lhs_e, selector_t, rhs_e); end
359
+ def send_index_map(receiver_e, lbrack_t, rbrack_t); end
360
+ def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end
361
+ def send_unary_op_map(selector_t, arg_e); end
362
+ def static_regexp(parts, options); end
363
+ def static_regexp_node(node); end
364
+ def static_string(nodes); end
365
+ def string_map(begin_t, parts, end_t); end
366
+ def string_value(token); end
367
+ def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end
368
+ def token_map(token); end
369
+ def unary_op_map(op_t, arg_e = T.unsafe(nil)); end
370
+ def unquoted_map(token); end
371
+ def validate_definee(definee); end
372
+ def validate_no_forward_arg_after_restarg(args); end
373
+ def value(token); end
374
+ def var_send_map(variable_e); end
375
+ def variable_map(name_t); end
376
+
377
+ class << self
378
+ def emit_arg_inside_procarg0; end
379
+ def emit_arg_inside_procarg0=(_arg0); end
380
+ def emit_encoding; end
381
+ def emit_encoding=(_arg0); end
382
+ def emit_forward_arg; end
383
+ def emit_forward_arg=(_arg0); end
384
+ def emit_index; end
385
+ def emit_index=(_arg0); end
386
+ def emit_kwargs; end
387
+ def emit_kwargs=(_arg0); end
388
+ def emit_lambda; end
389
+ def emit_lambda=(_arg0); end
390
+ def emit_match_pattern; end
391
+ def emit_match_pattern=(_arg0); end
392
+ def emit_procarg0; end
393
+ def emit_procarg0=(_arg0); end
394
+ def modernize; end
395
+ end
396
+ end
397
+
398
+ class Parser::ClobberingError < ::RuntimeError; end
399
+
400
+ class Parser::Context
401
+ def initialize; end
402
+
403
+ def in_argdef; end
404
+ def in_argdef=(_arg0); end
405
+ def in_block; end
406
+ def in_block=(_arg0); end
407
+ def in_class; end
408
+ def in_class=(_arg0); end
409
+ def in_def; end
410
+ def in_def=(_arg0); end
411
+ def in_defined; end
412
+ def in_defined=(_arg0); end
413
+ def in_dynamic_block?; end
414
+ def in_kwarg; end
415
+ def in_kwarg=(_arg0); end
416
+ def in_lambda; end
417
+ def in_lambda=(_arg0); end
418
+ def reset; end
419
+ end
420
+
421
+ Parser::Context::FLAGS = T.let(T.unsafe(nil), Array)
422
+
423
+ class Parser::CurrentArgStack
424
+ def initialize; end
425
+
426
+ def empty?; end
427
+ def pop; end
428
+ def push(value); end
429
+ def reset; end
430
+ def set(value); end
431
+ def stack; end
432
+ def top; end
433
+ end
434
+
435
+ module Parser::Deprecation
436
+ def warn_of_deprecation; end
437
+ def warned_of_deprecation=(_arg0); end
438
+ end
439
+
440
+ class Parser::Diagnostic
441
+ def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end
442
+
443
+ def arguments; end
444
+ def highlights; end
445
+ def level; end
446
+ def location; end
447
+ def message; end
448
+ def reason; end
449
+ def render; end
450
+
451
+ private
452
+
453
+ def first_line_only(range); end
454
+ def last_line_only(range); end
455
+ def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end
456
+ end
457
+
458
+ class Parser::Diagnostic::Engine
459
+ def initialize(consumer = T.unsafe(nil)); end
460
+
461
+ def all_errors_are_fatal; end
462
+ def all_errors_are_fatal=(_arg0); end
463
+ def consumer; end
464
+ def consumer=(_arg0); end
465
+ def ignore_warnings; end
466
+ def ignore_warnings=(_arg0); end
467
+ def process(diagnostic); end
468
+
469
+ protected
470
+
471
+ def ignore?(diagnostic); end
472
+ def raise?(diagnostic); end
473
+ end
474
+
475
+ Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array)
476
+
477
+ class Parser::Lexer
478
+ def initialize(version); end
479
+
480
+ def advance; end
481
+ def cmdarg; end
482
+ def cmdarg=(_arg0); end
483
+ def cmdarg_stack; end
484
+ def command_start; end
485
+ def command_start=(_arg0); end
486
+ def comments; end
487
+ def comments=(_arg0); end
488
+ def cond; end
489
+ def cond=(_arg0); end
490
+ def cond_stack; end
491
+ def context; end
492
+ def context=(_arg0); end
493
+ def dedent_level; end
494
+ def diagnostics; end
495
+ def diagnostics=(_arg0); end
496
+ def encoding; end
497
+ def force_utf32; end
498
+ def force_utf32=(_arg0); end
499
+ def lambda_stack; end
500
+ def paren_nest; end
501
+ def pop_cmdarg; end
502
+ def pop_cond; end
503
+ def push_cmdarg; end
504
+ def push_cond; end
505
+ def reset(reset_state = T.unsafe(nil)); end
506
+ def source_buffer; end
507
+ def source_buffer=(source_buffer); end
508
+ def state; end
509
+ def state=(state); end
510
+ def static_env; end
511
+ def static_env=(_arg0); end
512
+ def tokens; end
513
+ def tokens=(_arg0); end
514
+
515
+ protected
516
+
517
+ def arg_or_cmdarg(cmd_state); end
518
+ def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end
519
+ def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end
520
+ def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end
521
+ def emit_do(do_block = T.unsafe(nil)); end
522
+ def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end
523
+ def encode_escape(ord); end
524
+ def eof_codepoint?(point); end
525
+ def literal; end
526
+ def next_state_for_literal(literal); end
527
+ def pop_literal; end
528
+ def push_literal(*args); end
529
+ def range(s = T.unsafe(nil), e = T.unsafe(nil)); end
530
+ def stack_pop; end
531
+ def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end
532
+ def version?(*versions); end
533
+
534
+ class << self
535
+ def lex_en_expr_arg; end
536
+ def lex_en_expr_arg=(_arg0); end
537
+ def lex_en_expr_beg; end
538
+ def lex_en_expr_beg=(_arg0); end
539
+ def lex_en_expr_cmdarg; end
540
+ def lex_en_expr_cmdarg=(_arg0); end
541
+ def lex_en_expr_dot; end
542
+ def lex_en_expr_dot=(_arg0); end
543
+ def lex_en_expr_end; end
544
+ def lex_en_expr_end=(_arg0); end
545
+ def lex_en_expr_endarg; end
546
+ def lex_en_expr_endarg=(_arg0); end
547
+ def lex_en_expr_endfn; end
548
+ def lex_en_expr_endfn=(_arg0); end
549
+ def lex_en_expr_fname; end
550
+ def lex_en_expr_fname=(_arg0); end
551
+ def lex_en_expr_labelarg; end
552
+ def lex_en_expr_labelarg=(_arg0); end
553
+ def lex_en_expr_mid; end
554
+ def lex_en_expr_mid=(_arg0); end
555
+ def lex_en_expr_value; end
556
+ def lex_en_expr_value=(_arg0); end
557
+ def lex_en_expr_variable; end
558
+ def lex_en_expr_variable=(_arg0); end
559
+ def lex_en_interp_backslash_delimited; end
560
+ def lex_en_interp_backslash_delimited=(_arg0); end
561
+ def lex_en_interp_backslash_delimited_words; end
562
+ def lex_en_interp_backslash_delimited_words=(_arg0); end
563
+ def lex_en_interp_string; end
564
+ def lex_en_interp_string=(_arg0); end
565
+ def lex_en_interp_words; end
566
+ def lex_en_interp_words=(_arg0); end
567
+ def lex_en_leading_dot; end
568
+ def lex_en_leading_dot=(_arg0); end
569
+ def lex_en_line_begin; end
570
+ def lex_en_line_begin=(_arg0); end
571
+ def lex_en_line_comment; end
572
+ def lex_en_line_comment=(_arg0); end
573
+ def lex_en_plain_backslash_delimited; end
574
+ def lex_en_plain_backslash_delimited=(_arg0); end
575
+ def lex_en_plain_backslash_delimited_words; end
576
+ def lex_en_plain_backslash_delimited_words=(_arg0); end
577
+ def lex_en_plain_string; end
578
+ def lex_en_plain_string=(_arg0); end
579
+ def lex_en_plain_words; end
580
+ def lex_en_plain_words=(_arg0); end
581
+ def lex_en_regexp_modifiers; end
582
+ def lex_en_regexp_modifiers=(_arg0); end
583
+ def lex_error; end
584
+ def lex_error=(_arg0); end
585
+ def lex_start; end
586
+ def lex_start=(_arg0); end
587
+
588
+ private
589
+
590
+ def _lex_eof_trans; end
591
+ def _lex_eof_trans=(_arg0); end
592
+ def _lex_from_state_actions; end
593
+ def _lex_from_state_actions=(_arg0); end
594
+ def _lex_index_offsets; end
595
+ def _lex_index_offsets=(_arg0); end
596
+ def _lex_indicies; end
597
+ def _lex_indicies=(_arg0); end
598
+ def _lex_key_spans; end
599
+ def _lex_key_spans=(_arg0); end
600
+ def _lex_to_state_actions; end
601
+ def _lex_to_state_actions=(_arg0); end
602
+ def _lex_trans_actions; end
603
+ def _lex_trans_actions=(_arg0); end
604
+ def _lex_trans_keys; end
605
+ def _lex_trans_keys=(_arg0); end
606
+ def _lex_trans_targs; end
607
+ def _lex_trans_targs=(_arg0); end
608
+ end
609
+ end
610
+
611
+ class Parser::Lexer::Dedenter
612
+ def initialize(dedent_level); end
613
+
614
+ def dedent(string); end
615
+ def interrupt; end
616
+ end
617
+
618
+ Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer)
619
+ Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash)
620
+ Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash)
621
+ Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash)
622
+ Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash)
623
+
624
+ class Parser::Lexer::Literal
625
+ def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end
626
+
627
+ def backslash_delimited?; end
628
+ def dedent_level; end
629
+ def end_interp_brace_and_try_closing; end
630
+ def extend_content; end
631
+ def extend_space(ts, te); end
632
+ def extend_string(string, ts, te); end
633
+ def flush_string; end
634
+ def heredoc?; end
635
+ def heredoc_e; end
636
+ def infer_indent_level(line); end
637
+ def interpolate?; end
638
+ def munge_escape?(character); end
639
+ def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end
640
+ def plain_heredoc?; end
641
+ def regexp?; end
642
+ def saved_herebody_s; end
643
+ def saved_herebody_s=(_arg0); end
644
+ def squiggly_heredoc?; end
645
+ def start_interp_brace; end
646
+ def str_s; end
647
+ def supports_line_continuation_via_slash?; end
648
+ def type; end
649
+ def words?; end
650
+
651
+ protected
652
+
653
+ def clear_buffer; end
654
+ def coerce_encoding(string); end
655
+ def delimiter?(delimiter); end
656
+ def emit(token, type, s, e); end
657
+ def emit_start_tok; end
658
+ end
659
+
660
+ Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash)
661
+ Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash)
662
+ Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash)
663
+ Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash)
664
+ Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp)
665
+
666
+ class Parser::Lexer::StackState
667
+ def initialize(name); end
668
+
669
+ def active?; end
670
+ def clear; end
671
+ def empty?; end
672
+ def inspect; end
673
+ def lexpop; end
674
+ def pop; end
675
+ def push(bit); end
676
+ def to_s; end
677
+ end
678
+
679
+ Parser::MESSAGES = T.let(T.unsafe(nil), Hash)
680
+
681
+ class Parser::MaxNumparamStack
682
+ def initialize; end
683
+
684
+ def empty?; end
685
+ def has_numparams?; end
686
+ def has_ordinary_params!; end
687
+ def has_ordinary_params?; end
688
+ def pop; end
689
+ def push(static:); end
690
+ def register(numparam); end
691
+ def stack; end
692
+ def top; end
693
+
694
+ private
695
+
696
+ def set(value); end
697
+ end
698
+
699
+ Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer)
700
+
701
+ module Parser::Messages
702
+ class << self
703
+ def compile(reason, arguments); end
704
+ end
705
+ end
706
+
707
+ module Parser::Meta; end
708
+ Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set)
709
+
710
+ class Parser::Rewriter < ::Parser::AST::Processor
711
+ extend ::Parser::Deprecation
712
+
713
+ def initialize(*_arg0); end
714
+
715
+ def assignment?(node); end
716
+ def insert_after(range, content); end
717
+ def insert_before(range, content); end
718
+ def remove(range); end
719
+ def replace(range, content); end
720
+ def rewrite(source_buffer, ast); end
721
+ def wrap(range, before, after); end
722
+ end
723
+
724
+ Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
725
+ module Parser::Source; end
726
+
727
+ class Parser::Source::Buffer
728
+ def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end
729
+
730
+ def column_for_position(position); end
731
+ def decompose_position(position); end
732
+ def first_line; end
733
+ def freeze; end
734
+ def inspect; end
735
+ def last_line; end
736
+ def line_for_position(position); end
737
+ def line_range(lineno); end
738
+ def name; end
739
+ def raw_source=(input); end
740
+ def read; end
741
+ def slice(range); end
742
+ def source; end
743
+ def source=(input); end
744
+ def source_line(lineno); end
745
+ def source_lines; end
746
+ def source_range; end
747
+
748
+ private
749
+
750
+ def bsearch(line_begins, position); end
751
+ def line_begins; end
752
+ def line_index_for_position(position); end
753
+
754
+ class << self
755
+ def recognize_encoding(string); end
756
+ def reencode_string(input); end
757
+ end
758
+ end
759
+
760
+ Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp)
761
+
762
+ class Parser::Source::Comment
763
+ def initialize(range); end
764
+
765
+ def ==(other); end
766
+ def document?; end
767
+ def inline?; end
768
+ def inspect; end
769
+ def loc; end
770
+ def location; end
771
+ def text; end
772
+ def type; end
773
+
774
+ class << self
775
+ def associate(ast, comments); end
776
+ def associate_by_identity(ast, comments); end
777
+ def associate_locations(ast, comments); end
778
+ end
779
+ end
780
+
781
+ class Parser::Source::Comment::Associator
782
+ def initialize(ast, comments); end
783
+
784
+ def associate; end
785
+ def associate_by_identity; end
786
+ def associate_locations; end
787
+ def skip_directives; end
788
+ def skip_directives=(_arg0); end
789
+
790
+ private
791
+
792
+ def advance_comment; end
793
+ def advance_through_directives; end
794
+ def associate_and_advance_comment(node); end
795
+ def children_in_source_order(node); end
796
+ def current_comment_before?(node); end
797
+ def current_comment_before_end?(node); end
798
+ def current_comment_decorates?(node); end
799
+ def do_associate; end
800
+ def process_leading_comments(node); end
801
+ def process_trailing_comments(node); end
802
+ def visit(node); end
803
+ end
804
+
805
+ Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp)
806
+ Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set)
807
+
808
+ class Parser::Source::Map
809
+ def initialize(expression); end
810
+
811
+ def ==(other); end
812
+ def column; end
813
+ def expression; end
814
+ def first_line; end
815
+ def last_column; end
816
+ def last_line; end
817
+ def line; end
818
+ def node; end
819
+ def node=(node); end
820
+ def to_hash; end
821
+ def with_expression(expression_l); end
822
+
823
+ protected
824
+
825
+ def update_expression(expression_l); end
826
+ def with(&block); end
827
+
828
+ private
829
+
830
+ def initialize_copy(other); end
831
+ end
832
+
833
+ class Parser::Source::Map::Collection < ::Parser::Source::Map
834
+ def initialize(begin_l, end_l, expression_l); end
835
+
836
+ def begin; end
837
+ def end; end
838
+ end
839
+
840
+ class Parser::Source::Map::Condition < ::Parser::Source::Map
841
+ def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end
842
+
843
+ def begin; end
844
+ def else; end
845
+ def end; end
846
+ def keyword; end
847
+ end
848
+
849
+ class Parser::Source::Map::Constant < ::Parser::Source::Map
850
+ def initialize(double_colon, name, expression); end
851
+
852
+ def double_colon; end
853
+ def name; end
854
+ def operator; end
855
+ def with_operator(operator_l); end
856
+
857
+ protected
858
+
859
+ def update_operator(operator_l); end
860
+ end
861
+
862
+ class Parser::Source::Map::Definition < ::Parser::Source::Map
863
+ def initialize(keyword_l, operator_l, name_l, end_l); end
864
+
865
+ def end; end
866
+ def keyword; end
867
+ def name; end
868
+ def operator; end
869
+ end
870
+
871
+ class Parser::Source::Map::For < ::Parser::Source::Map
872
+ def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end
873
+
874
+ def begin; end
875
+ def end; end
876
+ def in; end
877
+ def keyword; end
878
+ end
879
+
880
+ class Parser::Source::Map::Heredoc < ::Parser::Source::Map
881
+ def initialize(begin_l, body_l, end_l); end
882
+
883
+ def heredoc_body; end
884
+ def heredoc_end; end
885
+ end
886
+
887
+ class Parser::Source::Map::Index < ::Parser::Source::Map
888
+ def initialize(begin_l, end_l, expression_l); end
889
+
890
+ def begin; end
891
+ def end; end
892
+ def operator; end
893
+ def with_operator(operator_l); end
894
+
895
+ protected
896
+
897
+ def update_operator(operator_l); end
898
+ end
899
+
900
+ class Parser::Source::Map::Keyword < ::Parser::Source::Map
901
+ def initialize(keyword_l, begin_l, end_l, expression_l); end
902
+
903
+ def begin; end
904
+ def end; end
905
+ def keyword; end
906
+ end
907
+
908
+ class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map
909
+ def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end
910
+
911
+ def assignment; end
912
+ def end; end
913
+ def keyword; end
914
+ def name; end
915
+ def operator; end
916
+ end
917
+
918
+ class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map
919
+ def initialize(keyword_l, operator_l, argument_l, expression_l); end
920
+
921
+ def argument; end
922
+ def keyword; end
923
+ def operator; end
924
+ end
925
+
926
+ class Parser::Source::Map::Operator < ::Parser::Source::Map
927
+ def initialize(operator, expression); end
928
+
929
+ def operator; end
930
+ end
931
+
932
+ class Parser::Source::Map::RescueBody < ::Parser::Source::Map
933
+ def initialize(keyword_l, assoc_l, begin_l, expression_l); end
934
+
935
+ def assoc; end
936
+ def begin; end
937
+ def keyword; end
938
+ end
939
+
940
+ class Parser::Source::Map::Send < ::Parser::Source::Map
941
+ def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end
942
+
943
+ def begin; end
944
+ def dot; end
945
+ def end; end
946
+ def operator; end
947
+ def selector; end
948
+ def with_operator(operator_l); end
949
+
950
+ protected
951
+
952
+ def update_operator(operator_l); end
953
+ end
954
+
955
+ class Parser::Source::Map::Ternary < ::Parser::Source::Map
956
+ def initialize(question_l, colon_l, expression_l); end
957
+
958
+ def colon; end
959
+ def question; end
960
+ end
961
+
962
+ class Parser::Source::Map::Variable < ::Parser::Source::Map
963
+ def initialize(name_l, expression_l = T.unsafe(nil)); end
964
+
965
+ def name; end
966
+ def operator; end
967
+ def with_operator(operator_l); end
968
+
969
+ protected
970
+
971
+ def update_operator(operator_l); end
972
+ end
973
+
974
+ class Parser::Source::Range
975
+ include ::Comparable
976
+
977
+ def initialize(source_buffer, begin_pos, end_pos); end
978
+
979
+ def <=>(other); end
980
+ def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end
981
+ def begin; end
982
+ def begin_pos; end
983
+ def column; end
984
+ def column_range; end
985
+ def contained?(other); end
986
+ def contains?(other); end
987
+ def crossing?(other); end
988
+ def disjoint?(other); end
989
+ def empty?; end
990
+ def end; end
991
+ def end_pos; end
992
+ def eql?(_arg0); end
993
+ def first_line; end
994
+ def hash; end
995
+ def inspect; end
996
+ def intersect(other); end
997
+ def is?(*what); end
998
+ def join(other); end
999
+ def last_column; end
1000
+ def last_line; end
1001
+ def length; end
1002
+ def line; end
1003
+ def overlaps?(other); end
1004
+ def resize(new_size); end
1005
+ def size; end
1006
+ def source; end
1007
+ def source_buffer; end
1008
+ def source_line; end
1009
+ def to_a; end
1010
+ def to_range; end
1011
+ def to_s; end
1012
+ def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end
1013
+ end
1014
+
1015
+ class Parser::Source::Rewriter
1016
+ extend ::Parser::Deprecation
1017
+
1018
+ def initialize(source_buffer); end
1019
+
1020
+ def diagnostics; end
1021
+ def insert_after(range, content); end
1022
+ def insert_after_multi(range, content); end
1023
+ def insert_before(range, content); end
1024
+ def insert_before_multi(range, content); end
1025
+ def process; end
1026
+ def remove(range); end
1027
+ def replace(range, content); end
1028
+ def source_buffer; end
1029
+ def transaction; end
1030
+ def wrap(range, before, after); end
1031
+
1032
+ private
1033
+
1034
+ def active_clobber; end
1035
+ def active_clobber=(value); end
1036
+ def active_insertions; end
1037
+ def active_insertions=(value); end
1038
+ def active_queue; end
1039
+ def adjacent?(range1, range2); end
1040
+ def adjacent_insertion_mask(range); end
1041
+ def adjacent_insertions?(range); end
1042
+ def adjacent_position_mask(range); end
1043
+ def adjacent_updates?(range); end
1044
+ def append(action); end
1045
+ def can_merge?(action, existing); end
1046
+ def clobbered_insertion?(insertion); end
1047
+ def clobbered_position_mask(range); end
1048
+ def in_transaction?; end
1049
+ def merge_actions(action, existing); end
1050
+ def merge_actions!(action, existing); end
1051
+ def merge_replacements(actions); end
1052
+ def raise_clobber_error(action, existing); end
1053
+ def record_insertion(range); end
1054
+ def record_replace(range); end
1055
+ def replace_actions(old, updated); end
1056
+ def replace_compatible_with_insertion?(replace, insertion); end
1057
+ end
1058
+
1059
+ class Parser::Source::Rewriter::Action
1060
+ include ::Comparable
1061
+
1062
+ def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end
1063
+
1064
+ def <=>(other); end
1065
+ def allow_multiple_insertions; end
1066
+ def allow_multiple_insertions?; end
1067
+ def order; end
1068
+ def range; end
1069
+ def replacement; end
1070
+ def to_s; end
1071
+ end
1072
+
1073
+ Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
1074
+
1075
+ class Parser::Source::TreeRewriter
1076
+ extend ::Parser::Deprecation
1077
+
1078
+ def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end
1079
+
1080
+ def as_nested_actions; end
1081
+ def as_replacements; end
1082
+ def diagnostics; end
1083
+ def empty?; end
1084
+ def import!(foreign_rewriter, offset: T.unsafe(nil)); end
1085
+ def in_transaction?; end
1086
+ def insert_after(range, content); end
1087
+ def insert_after_multi(range, text); end
1088
+ def insert_before(range, content); end
1089
+ def insert_before_multi(range, text); end
1090
+ def inspect; end
1091
+ def merge(with); end
1092
+ def merge!(with); end
1093
+ def process; end
1094
+ def remove(range); end
1095
+ def replace(range, content); end
1096
+ def source_buffer; end
1097
+ def transaction; end
1098
+ def wrap(range, insert_before, insert_after); end
1099
+
1100
+ protected
1101
+
1102
+ def action_root; end
1103
+
1104
+ private
1105
+
1106
+ def action_summary; end
1107
+ def check_policy_validity; end
1108
+ def check_range_validity(range); end
1109
+ def combine(range, attributes); end
1110
+ def enforce_policy(event); end
1111
+ def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end
1112
+ end
1113
+
1114
+ Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array)
1115
+
1116
+ class Parser::Source::TreeRewriter::Action
1117
+ def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end
1118
+
1119
+ def combine(action); end
1120
+ def contract; end
1121
+ def empty?; end
1122
+ def insert_after; end
1123
+ def insert_before; end
1124
+ def insertion?; end
1125
+ def moved(source_buffer, offset); end
1126
+ def nested_actions; end
1127
+ def ordered_replacements; end
1128
+ def range; end
1129
+ def replacement; end
1130
+
1131
+ protected
1132
+
1133
+ def analyse_hierarchy(action); end
1134
+ def bsearch_child_index(from = T.unsafe(nil)); end
1135
+ def call_enforcer_for_merge(action); end
1136
+ def check_fusible(action, *fusible); end
1137
+ def children; end
1138
+ def combine_children(more_children); end
1139
+ def do_combine(action); end
1140
+ def fuse_deletions(action, fusible, other_sibblings); end
1141
+ def merge(action); end
1142
+ def place_in_hierarchy(action); end
1143
+ def swallow(children); end
1144
+ def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end
1145
+ end
1146
+
1147
+ Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
1148
+ Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash)
1149
+
1150
+ class Parser::StaticEnvironment
1151
+ def initialize; end
1152
+
1153
+ def declare(name); end
1154
+ def declare_anonymous_blockarg; end
1155
+ def declare_forward_args; end
1156
+ def declared?(name); end
1157
+ def declared_anonymous_blockarg?; end
1158
+ def declared_forward_args?; end
1159
+ def empty?; end
1160
+ def extend_dynamic; end
1161
+ def extend_static; end
1162
+ def reset; end
1163
+ def unextend; end
1164
+ end
1165
+
1166
+ Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol)
1167
+ Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol)
1168
+
1169
+ class Parser::SyntaxError < ::StandardError
1170
+ def initialize(diagnostic); end
1171
+
1172
+ def diagnostic; end
1173
+ end
1174
+
1175
+ class Parser::TreeRewriter < ::Parser::AST::Processor
1176
+ def assignment?(node); end
1177
+ def insert_after(range, content); end
1178
+ def insert_before(range, content); end
1179
+ def remove(range); end
1180
+ def replace(range, content); end
1181
+ def rewrite(source_buffer, ast, **policy); end
1182
+ def wrap(range, before, after); end
1183
+ end
1184
+
1185
+ Parser::VERSION = T.let(T.unsafe(nil), String)
1186
+
1187
+ class Parser::VariablesStack
1188
+ def initialize; end
1189
+
1190
+ def declare(name); end
1191
+ def declared?(name); end
1192
+ def empty?; end
1193
+ def pop; end
1194
+ def push; end
1195
+ def reset; end
1196
+ end