packwerk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  3. data/.github/probots.yml +2 -0
  4. data/.github/pull_request_template.md +27 -0
  5. data/.github/workflows/ci.yml +50 -0
  6. data/.gitignore +12 -0
  7. data/.rubocop.yml +46 -0
  8. data/.ruby-version +1 -0
  9. data/CODEOWNERS +1 -0
  10. data/CODE_OF_CONDUCT.md +76 -0
  11. data/CONTRIBUTING.md +17 -0
  12. data/Gemfile +22 -0
  13. data/Gemfile.lock +236 -0
  14. data/LICENSE.md +7 -0
  15. data/README.md +73 -0
  16. data/Rakefile +13 -0
  17. data/TROUBLESHOOT.md +67 -0
  18. data/USAGE.md +250 -0
  19. data/bin/console +15 -0
  20. data/bin/setup +8 -0
  21. data/dev.yml +32 -0
  22. data/docs/cohesion.png +0 -0
  23. data/exe/packwerk +6 -0
  24. data/lib/packwerk.rb +44 -0
  25. data/lib/packwerk/application_validator.rb +343 -0
  26. data/lib/packwerk/association_inspector.rb +44 -0
  27. data/lib/packwerk/checking_deprecated_references.rb +40 -0
  28. data/lib/packwerk/cli.rb +238 -0
  29. data/lib/packwerk/configuration.rb +82 -0
  30. data/lib/packwerk/const_node_inspector.rb +44 -0
  31. data/lib/packwerk/constant_discovery.rb +60 -0
  32. data/lib/packwerk/constant_name_inspector.rb +22 -0
  33. data/lib/packwerk/dependency_checker.rb +28 -0
  34. data/lib/packwerk/deprecated_references.rb +92 -0
  35. data/lib/packwerk/file_processor.rb +43 -0
  36. data/lib/packwerk/files_for_processing.rb +67 -0
  37. data/lib/packwerk/formatters/progress_formatter.rb +46 -0
  38. data/lib/packwerk/generators/application_validation.rb +62 -0
  39. data/lib/packwerk/generators/configuration_file.rb +69 -0
  40. data/lib/packwerk/generators/inflections_file.rb +43 -0
  41. data/lib/packwerk/generators/root_package.rb +37 -0
  42. data/lib/packwerk/generators/templates/inflections.yml +6 -0
  43. data/lib/packwerk/generators/templates/package.yml +17 -0
  44. data/lib/packwerk/generators/templates/packwerk +23 -0
  45. data/lib/packwerk/generators/templates/packwerk.yml.erb +23 -0
  46. data/lib/packwerk/generators/templates/packwerk_validator_test.rb +11 -0
  47. data/lib/packwerk/graph.rb +74 -0
  48. data/lib/packwerk/inflections/custom.rb +33 -0
  49. data/lib/packwerk/inflections/default.rb +73 -0
  50. data/lib/packwerk/inflector.rb +41 -0
  51. data/lib/packwerk/node.rb +259 -0
  52. data/lib/packwerk/node_processor.rb +49 -0
  53. data/lib/packwerk/node_visitor.rb +22 -0
  54. data/lib/packwerk/offense.rb +44 -0
  55. data/lib/packwerk/output_styles.rb +41 -0
  56. data/lib/packwerk/package.rb +56 -0
  57. data/lib/packwerk/package_set.rb +59 -0
  58. data/lib/packwerk/parsed_constant_definitions.rb +62 -0
  59. data/lib/packwerk/parsers.rb +23 -0
  60. data/lib/packwerk/parsers/erb.rb +66 -0
  61. data/lib/packwerk/parsers/factory.rb +34 -0
  62. data/lib/packwerk/parsers/ruby.rb +42 -0
  63. data/lib/packwerk/privacy_checker.rb +45 -0
  64. data/lib/packwerk/reference.rb +6 -0
  65. data/lib/packwerk/reference_extractor.rb +81 -0
  66. data/lib/packwerk/reference_lister.rb +23 -0
  67. data/lib/packwerk/run_context.rb +103 -0
  68. data/lib/packwerk/sanity_checker.rb +10 -0
  69. data/lib/packwerk/spring_command.rb +28 -0
  70. data/lib/packwerk/updating_deprecated_references.rb +51 -0
  71. data/lib/packwerk/version.rb +6 -0
  72. data/lib/packwerk/violation_type.rb +13 -0
  73. data/library.yml +6 -0
  74. data/packwerk.gemspec +58 -0
  75. data/service.yml +6 -0
  76. data/shipit.rubygems.yml +1 -0
  77. data/sorbet/config +2 -0
  78. data/sorbet/rbi/gems/actioncable@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +840 -0
  79. data/sorbet/rbi/gems/actionmailbox@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +571 -0
  80. data/sorbet/rbi/gems/actionmailer@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +568 -0
  81. data/sorbet/rbi/gems/actionpack@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +5216 -0
  82. data/sorbet/rbi/gems/actiontext@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +663 -0
  83. data/sorbet/rbi/gems/actionview@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +2504 -0
  84. data/sorbet/rbi/gems/activejob@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +635 -0
  85. data/sorbet/rbi/gems/activemodel@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +1201 -0
  86. data/sorbet/rbi/gems/activerecord@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8011 -0
  87. data/sorbet/rbi/gems/activestorage@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +904 -0
  88. data/sorbet/rbi/gems/activesupport@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +3888 -0
  89. data/sorbet/rbi/gems/ast@2.4.1.rbi +54 -0
  90. data/sorbet/rbi/gems/better_html@1.0.15.rbi +317 -0
  91. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  92. data/sorbet/rbi/gems/byebug@11.1.3.rbi +8 -0
  93. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  94. data/sorbet/rbi/gems/colorize@0.8.1.rbi +40 -0
  95. data/sorbet/rbi/gems/commander@4.5.2.rbi +8 -0
  96. data/sorbet/rbi/gems/concurrent-ruby@1.1.6.rbi +1966 -0
  97. data/sorbet/rbi/gems/constant_resolver@0.1.5.rbi +26 -0
  98. data/sorbet/rbi/gems/crass@1.0.6.rbi +138 -0
  99. data/sorbet/rbi/gems/erubi@1.9.0.rbi +39 -0
  100. data/sorbet/rbi/gems/globalid@0.4.2.rbi +178 -0
  101. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  102. data/sorbet/rbi/gems/html_tokenizer@0.0.7.rbi +46 -0
  103. data/sorbet/rbi/gems/i18n@1.8.2.rbi +633 -0
  104. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +8 -0
  105. data/sorbet/rbi/gems/loofah@2.5.0.rbi +272 -0
  106. data/sorbet/rbi/gems/m@1.5.1.rbi +108 -0
  107. data/sorbet/rbi/gems/mail@2.7.1.rbi +2490 -0
  108. data/sorbet/rbi/gems/marcel@0.3.3.rbi +30 -0
  109. data/sorbet/rbi/gems/method_source@1.0.0.rbi +76 -0
  110. data/sorbet/rbi/gems/mimemagic@0.3.5.rbi +47 -0
  111. data/sorbet/rbi/gems/mini_mime@1.0.2.rbi +71 -0
  112. data/sorbet/rbi/gems/mini_portile2@2.4.0.rbi +8 -0
  113. data/sorbet/rbi/gems/minitest@5.14.0.rbi +542 -0
  114. data/sorbet/rbi/gems/mocha@1.11.2.rbi +964 -0
  115. data/sorbet/rbi/gems/nio4r@2.5.2.rbi +89 -0
  116. data/sorbet/rbi/gems/nokogiri@1.10.9.rbi +1608 -0
  117. data/sorbet/rbi/gems/parallel@1.19.1.rbi +8 -0
  118. data/sorbet/rbi/gems/parlour@4.0.1.rbi +561 -0
  119. data/sorbet/rbi/gems/parser@2.7.1.4.rbi +1632 -0
  120. data/sorbet/rbi/gems/pry@0.13.1.rbi +8 -0
  121. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +335 -0
  122. data/sorbet/rbi/gems/rack@2.2.2.rbi +1730 -0
  123. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +123 -0
  124. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +213 -0
  125. data/sorbet/rbi/gems/rails@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +8 -0
  126. data/sorbet/rbi/gems/railties@6.1.0.alpha-d80c18a391e33552ae2d943e68af56946f883f65.rbi +869 -0
  127. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +155 -0
  128. data/sorbet/rbi/gems/rake@13.0.1.rbi +841 -0
  129. data/sorbet/rbi/gems/rexml@3.2.4.rbi +8 -0
  130. data/sorbet/rbi/gems/rubocop-performance@1.5.2.rbi +8 -0
  131. data/sorbet/rbi/gems/rubocop-shopify@1.0.2.rbi +8 -0
  132. data/sorbet/rbi/gems/rubocop-sorbet@0.3.7.rbi +8 -0
  133. data/sorbet/rbi/gems/rubocop@0.82.0.rbi +8 -0
  134. data/sorbet/rbi/gems/ruby-progressbar@1.10.1.rbi +8 -0
  135. data/sorbet/rbi/gems/smart_properties@1.15.0.rbi +168 -0
  136. data/sorbet/rbi/gems/spoom@1.0.4.rbi +418 -0
  137. data/sorbet/rbi/gems/spring@2.1.0.rbi +160 -0
  138. data/sorbet/rbi/gems/sprockets-rails@3.2.1.rbi +431 -0
  139. data/sorbet/rbi/gems/sprockets@4.0.0.rbi +1132 -0
  140. data/sorbet/rbi/gems/tapioca@0.4.5.rbi +518 -0
  141. data/sorbet/rbi/gems/thor@1.0.1.rbi +892 -0
  142. data/sorbet/rbi/gems/tzinfo@2.0.2.rbi +547 -0
  143. data/sorbet/rbi/gems/unicode-display_width@1.7.0.rbi +8 -0
  144. data/sorbet/rbi/gems/websocket-driver@0.7.1.rbi +438 -0
  145. data/sorbet/rbi/gems/websocket-extensions@0.1.4.rbi +71 -0
  146. data/sorbet/rbi/gems/zeitwerk@2.3.0.rbi +8 -0
  147. data/sorbet/tapioca/require.rb +25 -0
  148. data/static/packwerk-check-demo.png +0 -0
  149. data/static/packwerk_check.gif +0 -0
  150. data/static/packwerk_check_violation.gif +0 -0
  151. data/static/packwerk_update.gif +0 -0
  152. data/static/packwerk_validate.gif +0 -0
  153. metadata +341 -0
@@ -0,0 +1,1632 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `parser` gem.
3
+ # Please instead update this file by running `dev typecheck update`.
4
+
5
+ # typed: true
6
+
7
+ module Parser
8
+ class << self
9
+
10
+ private
11
+
12
+ def warn_syntax_deviation(feature, version); end
13
+ end
14
+ end
15
+
16
+ module Parser::AST
17
+ end
18
+
19
+ class Parser::AST::Node < ::AST::Node
20
+ def assign_properties(properties); end
21
+ def loc; end
22
+ def location; end
23
+ end
24
+
25
+ class Parser::AST::Processor < ::AST::Processor
26
+ def on_alias(node); end
27
+ def on_and(node); end
28
+ def on_and_asgn(node); end
29
+ def on_arg(node); end
30
+ def on_arg_expr(node); end
31
+ def on_args(node); end
32
+ def on_argument(node); end
33
+ def on_array(node); end
34
+ def on_array_pattern(node); end
35
+ def on_array_pattern_with_tail(node); end
36
+ def on_back_ref(node); end
37
+ def on_begin(node); end
38
+ def on_block(node); end
39
+ def on_block_pass(node); end
40
+ def on_blockarg(node); end
41
+ def on_blockarg_expr(node); end
42
+ def on_break(node); end
43
+ def on_case(node); end
44
+ def on_case_match(node); end
45
+ def on_casgn(node); end
46
+ def on_class(node); end
47
+ def on_const(node); end
48
+ def on_const_pattern(node); end
49
+ def on_csend(node); end
50
+ def on_cvar(node); end
51
+ def on_cvasgn(node); end
52
+ def on_def(node); end
53
+ def on_def_e(node); end
54
+ def on_defined?(node); end
55
+ def on_defs(node); end
56
+ def on_defs_e(node); end
57
+ def on_dstr(node); end
58
+ def on_dsym(node); end
59
+ def on_eflipflop(node); end
60
+ def on_empty_else(node); end
61
+ def on_ensure(node); end
62
+ def on_erange(node); end
63
+ def on_find_pattern(node); end
64
+ def on_for(node); end
65
+ def on_forward_arg(node); end
66
+ def on_gvar(node); end
67
+ def on_gvasgn(node); end
68
+ def on_hash(node); end
69
+ def on_hash_pattern(node); end
70
+ def on_if(node); end
71
+ def on_if_guard(node); end
72
+ def on_iflipflop(node); end
73
+ def on_in_match(node); end
74
+ def on_in_pattern(node); end
75
+ def on_index(node); end
76
+ def on_indexasgn(node); end
77
+ def on_irange(node); end
78
+ def on_ivar(node); end
79
+ def on_ivasgn(node); end
80
+ def on_kwarg(node); end
81
+ def on_kwbegin(node); end
82
+ def on_kwoptarg(node); end
83
+ def on_kwrestarg(node); end
84
+ def on_kwsplat(node); end
85
+ def on_lambda(node); end
86
+ def on_lvar(node); end
87
+ def on_lvasgn(node); end
88
+ def on_masgn(node); end
89
+ def on_match_alt(node); end
90
+ def on_match_as(node); end
91
+ def on_match_current_line(node); end
92
+ def on_match_rest(node); end
93
+ def on_match_var(node); end
94
+ def on_match_with_lvasgn(node); end
95
+ def on_mlhs(node); end
96
+ def on_module(node); end
97
+ def on_mrasgn(node); end
98
+ def on_next(node); end
99
+ def on_not(node); end
100
+ def on_nth_ref(node); end
101
+ def on_numblock(node); end
102
+ def on_op_asgn(node); end
103
+ def on_optarg(node); end
104
+ def on_or(node); end
105
+ def on_or_asgn(node); end
106
+ def on_pair(node); end
107
+ def on_pin(node); end
108
+ def on_postexe(node); end
109
+ def on_preexe(node); end
110
+ def on_procarg0(node); end
111
+ def on_rasgn(node); end
112
+ def on_redo(node); end
113
+ def on_regexp(node); end
114
+ def on_resbody(node); end
115
+ def on_rescue(node); end
116
+ def on_restarg(node); end
117
+ def on_restarg_expr(node); end
118
+ def on_retry(node); end
119
+ def on_return(node); end
120
+ def on_sclass(node); end
121
+ def on_send(node); end
122
+ def on_shadowarg(node); end
123
+ def on_splat(node); end
124
+ def on_super(node); end
125
+ def on_undef(node); end
126
+ def on_unless_guard(node); end
127
+ def on_until(node); end
128
+ def on_until_post(node); end
129
+ def on_var(node); end
130
+ def on_vasgn(node); end
131
+ def on_when(node); end
132
+ def on_while(node); end
133
+ def on_while_post(node); end
134
+ def on_xstr(node); end
135
+ def on_yield(node); end
136
+ def process_argument_node(node); end
137
+ def process_regular_node(node); end
138
+ def process_var_asgn_node(node); end
139
+ def process_variable_node(node); end
140
+ end
141
+
142
+ class Parser::Base < ::Racc::Parser
143
+ def initialize(builder = T.unsafe(nil)); end
144
+
145
+ def builder; end
146
+ def context; end
147
+ def current_arg_stack; end
148
+ def diagnostics; end
149
+ def max_numparam_stack; end
150
+ def parse(source_buffer); end
151
+ def parse_with_comments(source_buffer); end
152
+ def pattern_hash_keys; end
153
+ def pattern_variables; end
154
+ def reset; end
155
+ def source_buffer; end
156
+ def static_env; end
157
+ def tokenize(source_buffer, recover = T.unsafe(nil)); end
158
+
159
+ private
160
+
161
+ def check_kwarg_name(name_t); end
162
+ def diagnostic(level, reason, arguments, location_t, highlights_ts = T.unsafe(nil)); end
163
+ def next_token; end
164
+ def on_error(error_token_id, error_value, value_stack); end
165
+
166
+ class << self
167
+ def default_parser; end
168
+ def parse(string, file = T.unsafe(nil), line = T.unsafe(nil)); end
169
+ def parse_file(filename); end
170
+ def parse_file_with_comments(filename); end
171
+ def parse_with_comments(string, file = T.unsafe(nil), line = T.unsafe(nil)); end
172
+
173
+ private
174
+
175
+ def setup_source_buffer(file, line, string, encoding); end
176
+ end
177
+ end
178
+
179
+ module Parser::Builders
180
+ end
181
+
182
+ class Parser::Builders::Default
183
+ def initialize; end
184
+
185
+ def __ENCODING__(__ENCODING__t); end
186
+ def __FILE__(__FILE__t); end
187
+ def __LINE__(__LINE__t); end
188
+ def accessible(node); end
189
+ def alias(alias_t, to, from); end
190
+ def arg(name_t); end
191
+ def arg_expr(expr); end
192
+ def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end
193
+ def array(begin_t, elements, end_t); end
194
+ def array_pattern(lbrack_t, elements, rbrack_t); end
195
+ def assign(lhs, eql_t, rhs); end
196
+ def assignable(node); end
197
+ def associate(begin_t, pairs, end_t); end
198
+ def attr_asgn(receiver, dot_t, selector_t); end
199
+ def back_ref(token); end
200
+ def begin(begin_t, body, end_t); end
201
+ 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
202
+ def begin_keyword(begin_t, body, end_t); end
203
+ def binary_op(receiver, operator_t, arg); end
204
+ def block(method_call, begin_t, args, body, end_t); end
205
+ def block_pass(amper_t, arg); end
206
+ def blockarg(amper_t, name_t); end
207
+ def blockarg_expr(amper_t, expr); end
208
+ def call_lambda(lambda_t); end
209
+ def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end
210
+ def call_type_for_dot(dot_t); end
211
+ def case(case_t, expr, when_bodies, else_t, else_body, end_t); end
212
+ def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end
213
+ def character(char_t); end
214
+ def complex(complex_t); end
215
+ def compstmt(statements); end
216
+ def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end
217
+ def condition_mod(if_true, if_false, cond_t, cond); end
218
+ def const(name_t); end
219
+ def const_fetch(scope, t_colon2, name_t); end
220
+ def const_global(t_colon3, name_t); end
221
+ def const_op_assignable(node); end
222
+ def const_pattern(const, ldelim_t, pattern, rdelim_t); end
223
+ def cvar(token); end
224
+ def dedent_string(node, dedent_level); end
225
+ def def_class(class_t, name, lt_t, superclass, body, end_t); end
226
+ def def_endless_method(def_t, name_t, args, assignment_t, body); end
227
+ def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end
228
+ def def_method(def_t, name_t, args, body, end_t); end
229
+ def def_module(module_t, name, body, end_t); end
230
+ def def_sclass(class_t, lshft_t, expr, body, end_t); end
231
+ def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end
232
+ def emit_file_line_as_literals; end
233
+ def emit_file_line_as_literals=(_); end
234
+ def false(false_t); end
235
+ def find_pattern(lbrack_t, elements, rbrack_t); end
236
+ def float(float_t); end
237
+ def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end
238
+ def forward_arg(dots_t); end
239
+ def forward_only_args(begin_t, dots_t, end_t); end
240
+ def forwarded_args(dots_t); end
241
+ def gvar(token); end
242
+ def hash_pattern(lbrace_t, kwargs, rbrace_t); end
243
+ def ident(token); end
244
+ def if_guard(if_t, if_body); end
245
+ def in_match(lhs, in_t, rhs); end
246
+ def in_pattern(in_t, pattern, guard, then_t, body); end
247
+ def index(receiver, lbrack_t, indexes, rbrack_t); end
248
+ def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end
249
+ def integer(integer_t); end
250
+ def ivar(token); end
251
+ def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end
252
+ def kwarg(name_t); end
253
+ def kwnilarg(dstar_t, nil_t); end
254
+ def kwoptarg(name_t, value); end
255
+ def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end
256
+ def kwsplat(dstar_t, arg); end
257
+ def logical_op(type, lhs, op_t, rhs); end
258
+ def loop(type, keyword_t, cond, do_t, body, end_t); end
259
+ def loop_mod(type, body, keyword_t, cond); end
260
+ def match_alt(left, pipe_t, right); end
261
+ def match_as(value, assoc_t, as); end
262
+ def match_hash_var(name_t); end
263
+ def match_hash_var_from_str(begin_t, strings, end_t); end
264
+ def match_label(label_type, label); end
265
+ def match_nil_pattern(dstar_t, nil_t); end
266
+ def match_op(receiver, match_t, arg); end
267
+ def match_pair(label_type, label, value); end
268
+ def match_rest(star_t, name_t = T.unsafe(nil)); end
269
+ def match_var(name_t); end
270
+ def match_with_trailing_comma(match, comma_t); end
271
+ def multi_assign(lhs, eql_t, rhs); end
272
+ def multi_lhs(begin_t, items, end_t); end
273
+ def multi_rassign(lhs, assoc_t, rhs); end
274
+ def nil(nil_t); end
275
+ def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end
276
+ def nth_ref(token); end
277
+ def numargs(max_numparam); end
278
+ def objc_kwarg(kwname_t, assoc_t, name_t); end
279
+ def objc_restarg(star_t, name = T.unsafe(nil)); end
280
+ def objc_varargs(pair, rest_of_varargs); end
281
+ def op_assign(lhs, op_t, rhs); end
282
+ def optarg(name_t, eql_t, value); end
283
+ def pair(key, assoc_t, value); end
284
+ def pair_keyword(key_t, value); end
285
+ def pair_list_18(list); end
286
+ def pair_quoted(begin_t, parts, end_t, value); end
287
+ def parser; end
288
+ def parser=(_); end
289
+ def pin(pin_t, var); end
290
+ def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end
291
+ def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end
292
+ def procarg0(arg); end
293
+ def range_exclusive(lhs, dot3_t, rhs); end
294
+ def range_inclusive(lhs, dot2_t, rhs); end
295
+ def rassign(lhs, assoc_t, rhs); end
296
+ def rational(rational_t); end
297
+ def regexp_compose(begin_t, parts, end_t, options); end
298
+ def regexp_options(regopt_t); end
299
+ def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end
300
+ def restarg(star_t, name_t = T.unsafe(nil)); end
301
+ def restarg_expr(star_t, expr = T.unsafe(nil)); end
302
+ def self(token); end
303
+ def shadowarg(name_t); end
304
+ def splat(star_t, arg = T.unsafe(nil)); end
305
+ def string(string_t); end
306
+ def string_compose(begin_t, parts, end_t); end
307
+ def string_internal(string_t); end
308
+ def symbol(symbol_t); end
309
+ def symbol_compose(begin_t, parts, end_t); end
310
+ def symbol_internal(symbol_t); end
311
+ def symbols_compose(begin_t, parts, end_t); end
312
+ def ternary(cond, question_t, if_true, colon_t, if_false); end
313
+ def true(true_t); end
314
+ def unary_num(unary_t, numeric); end
315
+ def unary_op(op_t, receiver); end
316
+ def undef_method(undef_t, names); end
317
+ def unless_guard(unless_t, unless_body); end
318
+ def when(when_t, patterns, then_t, body); end
319
+ def word(parts); end
320
+ def words_compose(begin_t, parts, end_t); end
321
+ def xstring_compose(begin_t, parts, end_t); end
322
+
323
+ private
324
+
325
+ def arg_name_collides?(this_name, that_name); end
326
+ def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end
327
+ def binary_op_map(left_e, op_t, right_e); end
328
+ def block_map(receiver_l, begin_t, end_t); end
329
+ def check_assignment_to_numparam(node); end
330
+ def check_condition(cond); end
331
+ def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end
332
+ def check_duplicate_args(args, map = T.unsafe(nil)); end
333
+ def check_duplicate_pattern_key(name, loc); end
334
+ def check_duplicate_pattern_variable(name, loc); end
335
+ def check_lvar_name(name, loc); end
336
+ def collapse_string_parts?(parts); end
337
+ def collection_map(begin_t, parts, end_t); end
338
+ def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end
339
+ def constant_map(scope, colon2_t, name_t); end
340
+ def definition_map(keyword_t, operator_t, name_t, end_t); end
341
+ def delimited_string_map(string_t); end
342
+ def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end
343
+ def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end
344
+ def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end
345
+ def expr_map(loc); end
346
+ def for_map(keyword_t, in_t, begin_t, end_t); end
347
+ def guard_map(keyword_t, guard_body_e); end
348
+ def index_map(receiver_e, lbrack_t, rbrack_t); end
349
+ def join_exprs(left_expr, right_expr); end
350
+ def keyword_map(keyword_t, begin_t, args, end_t); end
351
+ def keyword_mod_map(pre_e, keyword_t, post_e); end
352
+ def kwarg_map(name_t, value_e = T.unsafe(nil)); end
353
+ def loc(token); end
354
+ def module_definition_map(keyword_t, name_e, operator_t, end_t); end
355
+ def n(type, children, source_map); end
356
+ def n0(type, source_map); end
357
+ def numeric(kind, token); end
358
+ def pair_keyword_map(key_t, value_e); end
359
+ def pair_quoted_map(begin_t, end_t, value_e); end
360
+ def prefix_string_map(symbol); end
361
+ def range_map(start_e, op_t, end_e); end
362
+ def regexp_map(begin_t, end_t, options_e); end
363
+ def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end
364
+ def send_binary_op_map(lhs_e, selector_t, rhs_e); end
365
+ def send_index_map(receiver_e, lbrack_t, rbrack_t); end
366
+ def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end
367
+ def send_unary_op_map(selector_t, arg_e); end
368
+ def static_regexp(parts, options); end
369
+ def static_regexp_node(node); end
370
+ def static_string(nodes); end
371
+ def string_map(begin_t, parts, end_t); end
372
+ def string_value(token); end
373
+ def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end
374
+ def token_map(token); end
375
+ def unary_op_map(op_t, arg_e = T.unsafe(nil)); end
376
+ def unquoted_map(token); end
377
+ def validate_definee(definee); end
378
+ def value(token); end
379
+ def var_send_map(variable_e); end
380
+ def variable_map(name_t); end
381
+
382
+ class << self
383
+ def emit_arg_inside_procarg0; end
384
+ def emit_arg_inside_procarg0=(_); end
385
+ def emit_encoding; end
386
+ def emit_encoding=(_); end
387
+ def emit_forward_arg; end
388
+ def emit_forward_arg=(_); end
389
+ def emit_index; end
390
+ def emit_index=(_); end
391
+ def emit_lambda; end
392
+ def emit_lambda=(_); end
393
+ def emit_procarg0; end
394
+ def emit_procarg0=(_); end
395
+ def modernize; end
396
+ end
397
+ end
398
+
399
+ class Parser::ClobberingError < ::RuntimeError
400
+ end
401
+
402
+ class Parser::Context
403
+ def initialize; end
404
+
405
+ def class_definition_allowed?; end
406
+ def dynamic_const_definition_allowed?; end
407
+ def in_block?; end
408
+ def in_class?; end
409
+ def in_dynamic_block?; end
410
+ def in_lambda?; end
411
+ def indirectly_in_def?; end
412
+ def module_definition_allowed?; end
413
+ def pop; end
414
+ def push(state); end
415
+ def reset; end
416
+ def stack; end
417
+ end
418
+
419
+ class Parser::CurrentArgStack
420
+ def initialize; end
421
+
422
+ def pop; end
423
+ def push(value); end
424
+ def reset; end
425
+ def set(value); end
426
+ def stack; end
427
+ def top; end
428
+ end
429
+
430
+ Parser::CurrentRuby = Parser::Ruby26
431
+
432
+ module Parser::Deprecation
433
+ def warn_of_deprecation; end
434
+ def warned_of_deprecation=(_); end
435
+ end
436
+
437
+ class Parser::Diagnostic
438
+ def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end
439
+
440
+ def arguments; end
441
+ def highlights; end
442
+ def level; end
443
+ def location; end
444
+ def message; end
445
+ def reason; end
446
+ def render; end
447
+
448
+ private
449
+
450
+ def first_line_only(range); end
451
+ def last_line_only(range); end
452
+ def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end
453
+ end
454
+
455
+ class Parser::Diagnostic::Engine
456
+ def initialize(consumer = T.unsafe(nil)); end
457
+
458
+ def all_errors_are_fatal; end
459
+ def all_errors_are_fatal=(_); end
460
+ def consumer; end
461
+ def consumer=(_); end
462
+ def ignore_warnings; end
463
+ def ignore_warnings=(_); end
464
+ def process(diagnostic); end
465
+
466
+ protected
467
+
468
+ def ignore?(diagnostic); end
469
+ def raise?(diagnostic); end
470
+ end
471
+
472
+ Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array)
473
+
474
+ class Parser::Lexer
475
+ def initialize(version); end
476
+
477
+ def advance; end
478
+ def cmdarg; end
479
+ def cmdarg=(_); end
480
+ def command_start; end
481
+ def command_start=(_); end
482
+ def comments; end
483
+ def comments=(_); end
484
+ def cond; end
485
+ def cond=(_); end
486
+ def context; end
487
+ def context=(_); end
488
+ def dedent_level; end
489
+ def diagnostics; end
490
+ def diagnostics=(_); end
491
+ def encoding; end
492
+ def force_utf32; end
493
+ def force_utf32=(_); end
494
+ def in_kwarg; end
495
+ def in_kwarg=(_); end
496
+ def pop_cmdarg; end
497
+ def pop_cond; end
498
+ def push_cmdarg; end
499
+ def push_cond; end
500
+ def reset(reset_state = T.unsafe(nil)); end
501
+ def source_buffer; end
502
+ def source_buffer=(source_buffer); end
503
+ def state; end
504
+ def state=(state); end
505
+ def static_env; end
506
+ def static_env=(_); end
507
+ def tokens; end
508
+ def tokens=(_); end
509
+
510
+ protected
511
+
512
+ def arg_or_cmdarg(cmd_state); end
513
+ def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end
514
+ def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end
515
+ def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end
516
+ def emit_do(do_block = T.unsafe(nil)); end
517
+ def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end
518
+ def encode_escape(ord); end
519
+ def eof_codepoint?(point); end
520
+ def literal; end
521
+ def next_state_for_literal(literal); end
522
+ def pop_literal; end
523
+ def push_literal(*args); end
524
+ def range(s = T.unsafe(nil), e = T.unsafe(nil)); end
525
+ def stack_pop; end
526
+ def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end
527
+ def version?(*versions); end
528
+
529
+ class << self
530
+ def lex_en_expr_arg; end
531
+ def lex_en_expr_arg=(_); end
532
+ def lex_en_expr_beg; end
533
+ def lex_en_expr_beg=(_); end
534
+ def lex_en_expr_cmdarg; end
535
+ def lex_en_expr_cmdarg=(_); end
536
+ def lex_en_expr_dot; end
537
+ def lex_en_expr_dot=(_); end
538
+ def lex_en_expr_end; end
539
+ def lex_en_expr_end=(_); end
540
+ def lex_en_expr_endarg; end
541
+ def lex_en_expr_endarg=(_); end
542
+ def lex_en_expr_endfn; end
543
+ def lex_en_expr_endfn=(_); end
544
+ def lex_en_expr_fname; end
545
+ def lex_en_expr_fname=(_); end
546
+ def lex_en_expr_labelarg; end
547
+ def lex_en_expr_labelarg=(_); end
548
+ def lex_en_expr_mid; end
549
+ def lex_en_expr_mid=(_); end
550
+ def lex_en_expr_value; end
551
+ def lex_en_expr_value=(_); end
552
+ def lex_en_expr_variable; end
553
+ def lex_en_expr_variable=(_); end
554
+ def lex_en_interp_backslash_delimited; end
555
+ def lex_en_interp_backslash_delimited=(_); end
556
+ def lex_en_interp_backslash_delimited_words; end
557
+ def lex_en_interp_backslash_delimited_words=(_); end
558
+ def lex_en_interp_string; end
559
+ def lex_en_interp_string=(_); end
560
+ def lex_en_interp_words; end
561
+ def lex_en_interp_words=(_); end
562
+ def lex_en_leading_dot; end
563
+ def lex_en_leading_dot=(_); end
564
+ def lex_en_line_begin; end
565
+ def lex_en_line_begin=(_); end
566
+ def lex_en_line_comment; end
567
+ def lex_en_line_comment=(_); end
568
+ def lex_en_plain_backslash_delimited; end
569
+ def lex_en_plain_backslash_delimited=(_); end
570
+ def lex_en_plain_backslash_delimited_words; end
571
+ def lex_en_plain_backslash_delimited_words=(_); end
572
+ def lex_en_plain_string; end
573
+ def lex_en_plain_string=(_); end
574
+ def lex_en_plain_words; end
575
+ def lex_en_plain_words=(_); end
576
+ def lex_en_regexp_modifiers; end
577
+ def lex_en_regexp_modifiers=(_); end
578
+ def lex_error; end
579
+ def lex_error=(_); end
580
+ def lex_start; end
581
+ def lex_start=(_); end
582
+
583
+ private
584
+
585
+ def _lex_eof_trans; end
586
+ def _lex_eof_trans=(_); end
587
+ def _lex_from_state_actions; end
588
+ def _lex_from_state_actions=(_); end
589
+ def _lex_index_offsets; end
590
+ def _lex_index_offsets=(_); end
591
+ def _lex_indicies; end
592
+ def _lex_indicies=(_); end
593
+ def _lex_key_spans; end
594
+ def _lex_key_spans=(_); end
595
+ def _lex_to_state_actions; end
596
+ def _lex_to_state_actions=(_); end
597
+ def _lex_trans_actions; end
598
+ def _lex_trans_actions=(_); end
599
+ def _lex_trans_keys; end
600
+ def _lex_trans_keys=(_); end
601
+ def _lex_trans_targs; end
602
+ def _lex_trans_targs=(_); end
603
+ end
604
+ end
605
+
606
+ class Parser::Lexer::Dedenter
607
+ def initialize(dedent_level); end
608
+
609
+ def dedent(string); end
610
+ def interrupt; end
611
+ end
612
+
613
+ Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer)
614
+
615
+ Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash)
616
+
617
+ Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash)
618
+
619
+ Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash)
620
+
621
+ Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash)
622
+
623
+ class Parser::Lexer::Literal
624
+ 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
625
+
626
+ def backslash_delimited?; end
627
+ def dedent_level; end
628
+ def end_interp_brace_and_try_closing; end
629
+ def extend_content; end
630
+ def extend_space(ts, te); end
631
+ def extend_string(string, ts, te); end
632
+ def flush_string; end
633
+ def heredoc?; end
634
+ def heredoc_e; end
635
+ def infer_indent_level(line); end
636
+ def interpolate?; end
637
+ def munge_escape?(character); end
638
+ def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end
639
+ def plain_heredoc?; end
640
+ def regexp?; end
641
+ def saved_herebody_s; end
642
+ def saved_herebody_s=(_); end
643
+ def squiggly_heredoc?; end
644
+ def start_interp_brace; end
645
+ def str_s; end
646
+ def supports_line_continuation_via_slash?; end
647
+ def type; end
648
+ def words?; end
649
+
650
+ protected
651
+
652
+ def clear_buffer; end
653
+ def coerce_encoding(string); end
654
+ def delimiter?(delimiter); end
655
+ def emit(token, type, s, e); end
656
+ def emit_start_tok; end
657
+ end
658
+
659
+ Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash)
660
+
661
+ Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash)
662
+
663
+ Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash)
664
+
665
+ Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash)
666
+
667
+ Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp)
668
+
669
+ class Parser::Lexer::StackState
670
+ def initialize(name); end
671
+
672
+ def active?; end
673
+ def clear; end
674
+ def empty?; end
675
+ def inspect; end
676
+ def lexpop; end
677
+ def pop; end
678
+ def push(bit); end
679
+ def to_s; end
680
+ end
681
+
682
+ Parser::MESSAGES = T.let(T.unsafe(nil), Hash)
683
+
684
+ class Parser::MaxNumparamStack
685
+ def initialize; end
686
+
687
+ def has_numparams?; end
688
+ def has_ordinary_params!; end
689
+ def has_ordinary_params?; end
690
+ def pop; end
691
+ def push; end
692
+ def register(numparam); end
693
+ def stack; end
694
+ def top; end
695
+
696
+ private
697
+
698
+ def set(value); end
699
+ end
700
+
701
+ module Parser::Messages
702
+ class << self
703
+ def compile(reason, arguments); end
704
+ end
705
+ end
706
+
707
+ module Parser::Meta
708
+ end
709
+
710
+ Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set)
711
+
712
+ class Parser::Rewriter < ::Parser::AST::Processor
713
+ extend(::Parser::Deprecation)
714
+
715
+ def initialize(*_); end
716
+
717
+ def assignment?(node); end
718
+ def insert_after(range, content); end
719
+ def insert_before(range, content); end
720
+ def remove(range); end
721
+ def replace(range, content); end
722
+ def rewrite(source_buffer, ast); end
723
+ def wrap(range, before, after); end
724
+ end
725
+
726
+ Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
727
+
728
+ class Parser::Ruby26 < ::Parser::Base
729
+ def _reduce_10(val, _values, result); end
730
+ def _reduce_100(val, _values, result); end
731
+ def _reduce_101(val, _values, result); end
732
+ def _reduce_102(val, _values, result); end
733
+ def _reduce_103(val, _values, result); end
734
+ def _reduce_104(val, _values, result); end
735
+ def _reduce_105(val, _values, result); end
736
+ def _reduce_106(val, _values, result); end
737
+ def _reduce_107(val, _values, result); end
738
+ def _reduce_108(val, _values, result); end
739
+ def _reduce_109(val, _values, result); end
740
+ def _reduce_11(val, _values, result); end
741
+ def _reduce_110(val, _values, result); end
742
+ def _reduce_111(val, _values, result); end
743
+ def _reduce_113(val, _values, result); end
744
+ def _reduce_114(val, _values, result); end
745
+ def _reduce_115(val, _values, result); end
746
+ def _reduce_12(val, _values, result); end
747
+ def _reduce_121(val, _values, result); end
748
+ def _reduce_125(val, _values, result); end
749
+ def _reduce_126(val, _values, result); end
750
+ def _reduce_127(val, _values, result); end
751
+ def _reduce_13(val, _values, result); end
752
+ def _reduce_14(val, _values, result); end
753
+ def _reduce_15(val, _values, result); end
754
+ def _reduce_17(val, _values, result); end
755
+ def _reduce_18(val, _values, result); end
756
+ def _reduce_19(val, _values, result); end
757
+ def _reduce_199(val, _values, result); end
758
+ def _reduce_2(val, _values, result); end
759
+ def _reduce_20(val, _values, result); end
760
+ def _reduce_200(val, _values, result); end
761
+ def _reduce_201(val, _values, result); end
762
+ def _reduce_202(val, _values, result); end
763
+ def _reduce_203(val, _values, result); end
764
+ def _reduce_204(val, _values, result); end
765
+ def _reduce_205(val, _values, result); end
766
+ def _reduce_206(val, _values, result); end
767
+ def _reduce_207(val, _values, result); end
768
+ def _reduce_208(val, _values, result); end
769
+ def _reduce_209(val, _values, result); end
770
+ def _reduce_21(val, _values, result); end
771
+ def _reduce_210(val, _values, result); end
772
+ def _reduce_211(val, _values, result); end
773
+ def _reduce_212(val, _values, result); end
774
+ def _reduce_213(val, _values, result); end
775
+ def _reduce_214(val, _values, result); end
776
+ def _reduce_215(val, _values, result); end
777
+ def _reduce_216(val, _values, result); end
778
+ def _reduce_217(val, _values, result); end
779
+ def _reduce_218(val, _values, result); end
780
+ def _reduce_219(val, _values, result); end
781
+ def _reduce_22(val, _values, result); end
782
+ def _reduce_220(val, _values, result); end
783
+ def _reduce_221(val, _values, result); end
784
+ def _reduce_222(val, _values, result); end
785
+ def _reduce_223(val, _values, result); end
786
+ def _reduce_224(val, _values, result); end
787
+ def _reduce_226(val, _values, result); end
788
+ def _reduce_227(val, _values, result); end
789
+ def _reduce_228(val, _values, result); end
790
+ def _reduce_229(val, _values, result); end
791
+ def _reduce_23(val, _values, result); end
792
+ def _reduce_230(val, _values, result); end
793
+ def _reduce_231(val, _values, result); end
794
+ def _reduce_232(val, _values, result); end
795
+ def _reduce_233(val, _values, result); end
796
+ def _reduce_234(val, _values, result); end
797
+ def _reduce_235(val, _values, result); end
798
+ def _reduce_236(val, _values, result); end
799
+ def _reduce_237(val, _values, result); end
800
+ def _reduce_238(val, _values, result); end
801
+ def _reduce_24(val, _values, result); end
802
+ def _reduce_244(val, _values, result); end
803
+ def _reduce_245(val, _values, result); end
804
+ def _reduce_249(val, _values, result); end
805
+ def _reduce_25(val, _values, result); end
806
+ def _reduce_250(val, _values, result); end
807
+ def _reduce_252(val, _values, result); end
808
+ def _reduce_253(val, _values, result); end
809
+ def _reduce_254(val, _values, result); end
810
+ def _reduce_256(val, _values, result); end
811
+ def _reduce_259(val, _values, result); end
812
+ def _reduce_26(val, _values, result); end
813
+ def _reduce_260(val, _values, result); end
814
+ def _reduce_261(val, _values, result); end
815
+ def _reduce_262(val, _values, result); end
816
+ def _reduce_263(val, _values, result); end
817
+ def _reduce_264(val, _values, result); end
818
+ def _reduce_265(val, _values, result); end
819
+ def _reduce_266(val, _values, result); end
820
+ def _reduce_267(val, _values, result); end
821
+ def _reduce_268(val, _values, result); end
822
+ def _reduce_269(val, _values, result); end
823
+ def _reduce_27(val, _values, result); end
824
+ def _reduce_270(val, _values, result); end
825
+ def _reduce_271(val, _values, result); end
826
+ def _reduce_272(val, _values, result); end
827
+ def _reduce_273(val, _values, result); end
828
+ def _reduce_274(val, _values, result); end
829
+ def _reduce_275(val, _values, result); end
830
+ def _reduce_277(val, _values, result); end
831
+ def _reduce_278(val, _values, result); end
832
+ def _reduce_279(val, _values, result); end
833
+ def _reduce_28(val, _values, result); end
834
+ def _reduce_29(val, _values, result); end
835
+ def _reduce_290(val, _values, result); end
836
+ def _reduce_291(val, _values, result); end
837
+ def _reduce_292(val, _values, result); end
838
+ def _reduce_293(val, _values, result); end
839
+ def _reduce_294(val, _values, result); end
840
+ def _reduce_295(val, _values, result); end
841
+ def _reduce_296(val, _values, result); end
842
+ def _reduce_297(val, _values, result); end
843
+ def _reduce_298(val, _values, result); end
844
+ def _reduce_299(val, _values, result); end
845
+ def _reduce_3(val, _values, result); end
846
+ def _reduce_300(val, _values, result); end
847
+ def _reduce_301(val, _values, result); end
848
+ def _reduce_302(val, _values, result); end
849
+ def _reduce_303(val, _values, result); end
850
+ def _reduce_304(val, _values, result); end
851
+ def _reduce_305(val, _values, result); end
852
+ def _reduce_306(val, _values, result); end
853
+ def _reduce_307(val, _values, result); end
854
+ def _reduce_308(val, _values, result); end
855
+ def _reduce_309(val, _values, result); end
856
+ def _reduce_31(val, _values, result); end
857
+ def _reduce_311(val, _values, result); end
858
+ def _reduce_312(val, _values, result); end
859
+ def _reduce_313(val, _values, result); end
860
+ def _reduce_314(val, _values, result); end
861
+ def _reduce_315(val, _values, result); end
862
+ def _reduce_316(val, _values, result); end
863
+ def _reduce_317(val, _values, result); end
864
+ def _reduce_318(val, _values, result); end
865
+ def _reduce_319(val, _values, result); end
866
+ def _reduce_32(val, _values, result); end
867
+ def _reduce_320(val, _values, result); end
868
+ def _reduce_321(val, _values, result); end
869
+ def _reduce_322(val, _values, result); end
870
+ def _reduce_323(val, _values, result); end
871
+ def _reduce_324(val, _values, result); end
872
+ def _reduce_325(val, _values, result); end
873
+ def _reduce_326(val, _values, result); end
874
+ def _reduce_327(val, _values, result); end
875
+ def _reduce_328(val, _values, result); end
876
+ def _reduce_329(val, _values, result); end
877
+ def _reduce_33(val, _values, result); end
878
+ def _reduce_330(val, _values, result); end
879
+ def _reduce_331(val, _values, result); end
880
+ def _reduce_332(val, _values, result); end
881
+ def _reduce_333(val, _values, result); end
882
+ def _reduce_334(val, _values, result); end
883
+ def _reduce_335(val, _values, result); end
884
+ def _reduce_337(val, _values, result); end
885
+ def _reduce_340(val, _values, result); end
886
+ def _reduce_344(val, _values, result); end
887
+ def _reduce_346(val, _values, result); end
888
+ def _reduce_349(val, _values, result); end
889
+ def _reduce_35(val, _values, result); end
890
+ def _reduce_350(val, _values, result); end
891
+ def _reduce_351(val, _values, result); end
892
+ def _reduce_352(val, _values, result); end
893
+ def _reduce_354(val, _values, result); end
894
+ def _reduce_355(val, _values, result); end
895
+ def _reduce_356(val, _values, result); end
896
+ def _reduce_357(val, _values, result); end
897
+ def _reduce_358(val, _values, result); end
898
+ def _reduce_359(val, _values, result); end
899
+ def _reduce_36(val, _values, result); end
900
+ def _reduce_360(val, _values, result); end
901
+ def _reduce_361(val, _values, result); end
902
+ def _reduce_362(val, _values, result); end
903
+ def _reduce_363(val, _values, result); end
904
+ def _reduce_364(val, _values, result); end
905
+ def _reduce_365(val, _values, result); end
906
+ def _reduce_366(val, _values, result); end
907
+ def _reduce_367(val, _values, result); end
908
+ def _reduce_368(val, _values, result); end
909
+ def _reduce_369(val, _values, result); end
910
+ def _reduce_37(val, _values, result); end
911
+ def _reduce_370(val, _values, result); end
912
+ def _reduce_371(val, _values, result); end
913
+ def _reduce_372(val, _values, result); end
914
+ def _reduce_374(val, _values, result); end
915
+ def _reduce_375(val, _values, result); end
916
+ def _reduce_376(val, _values, result); end
917
+ def _reduce_377(val, _values, result); end
918
+ def _reduce_378(val, _values, result); end
919
+ def _reduce_379(val, _values, result); end
920
+ def _reduce_38(val, _values, result); end
921
+ def _reduce_380(val, _values, result); end
922
+ def _reduce_381(val, _values, result); end
923
+ def _reduce_383(val, _values, result); end
924
+ def _reduce_384(val, _values, result); end
925
+ def _reduce_385(val, _values, result); end
926
+ def _reduce_386(val, _values, result); end
927
+ def _reduce_387(val, _values, result); end
928
+ def _reduce_388(val, _values, result); end
929
+ def _reduce_389(val, _values, result); end
930
+ def _reduce_39(val, _values, result); end
931
+ def _reduce_390(val, _values, result); end
932
+ def _reduce_391(val, _values, result); end
933
+ def _reduce_392(val, _values, result); end
934
+ def _reduce_394(val, _values, result); end
935
+ def _reduce_395(val, _values, result); end
936
+ def _reduce_396(val, _values, result); end
937
+ def _reduce_397(val, _values, result); end
938
+ def _reduce_398(val, _values, result); end
939
+ def _reduce_399(val, _values, result); end
940
+ def _reduce_4(val, _values, result); end
941
+ def _reduce_40(val, _values, result); end
942
+ def _reduce_400(val, _values, result); end
943
+ def _reduce_401(val, _values, result); end
944
+ def _reduce_402(val, _values, result); end
945
+ def _reduce_403(val, _values, result); end
946
+ def _reduce_404(val, _values, result); end
947
+ def _reduce_405(val, _values, result); end
948
+ def _reduce_406(val, _values, result); end
949
+ def _reduce_407(val, _values, result); end
950
+ def _reduce_408(val, _values, result); end
951
+ def _reduce_409(val, _values, result); end
952
+ def _reduce_41(val, _values, result); end
953
+ def _reduce_410(val, _values, result); end
954
+ def _reduce_411(val, _values, result); end
955
+ def _reduce_412(val, _values, result); end
956
+ def _reduce_413(val, _values, result); end
957
+ def _reduce_414(val, _values, result); end
958
+ def _reduce_415(val, _values, result); end
959
+ def _reduce_416(val, _values, result); end
960
+ def _reduce_417(val, _values, result); end
961
+ def _reduce_418(val, _values, result); end
962
+ def _reduce_419(val, _values, result); end
963
+ def _reduce_42(val, _values, result); end
964
+ def _reduce_420(val, _values, result); end
965
+ def _reduce_421(val, _values, result); end
966
+ def _reduce_422(val, _values, result); end
967
+ def _reduce_423(val, _values, result); end
968
+ def _reduce_424(val, _values, result); end
969
+ def _reduce_425(val, _values, result); end
970
+ def _reduce_426(val, _values, result); end
971
+ def _reduce_427(val, _values, result); end
972
+ def _reduce_428(val, _values, result); end
973
+ def _reduce_430(val, _values, result); end
974
+ def _reduce_431(val, _values, result); end
975
+ def _reduce_432(val, _values, result); end
976
+ def _reduce_435(val, _values, result); end
977
+ def _reduce_437(val, _values, result); end
978
+ def _reduce_44(val, _values, result); end
979
+ def _reduce_442(val, _values, result); end
980
+ def _reduce_443(val, _values, result); end
981
+ def _reduce_444(val, _values, result); end
982
+ def _reduce_445(val, _values, result); end
983
+ def _reduce_446(val, _values, result); end
984
+ def _reduce_447(val, _values, result); end
985
+ def _reduce_448(val, _values, result); end
986
+ def _reduce_449(val, _values, result); end
987
+ def _reduce_450(val, _values, result); end
988
+ def _reduce_451(val, _values, result); end
989
+ def _reduce_452(val, _values, result); end
990
+ def _reduce_453(val, _values, result); end
991
+ def _reduce_454(val, _values, result); end
992
+ def _reduce_455(val, _values, result); end
993
+ def _reduce_456(val, _values, result); end
994
+ def _reduce_457(val, _values, result); end
995
+ def _reduce_458(val, _values, result); end
996
+ def _reduce_459(val, _values, result); end
997
+ def _reduce_460(val, _values, result); end
998
+ def _reduce_461(val, _values, result); end
999
+ def _reduce_462(val, _values, result); end
1000
+ def _reduce_463(val, _values, result); end
1001
+ def _reduce_464(val, _values, result); end
1002
+ def _reduce_465(val, _values, result); end
1003
+ def _reduce_466(val, _values, result); end
1004
+ def _reduce_467(val, _values, result); end
1005
+ def _reduce_468(val, _values, result); end
1006
+ def _reduce_469(val, _values, result); end
1007
+ def _reduce_47(val, _values, result); end
1008
+ def _reduce_470(val, _values, result); end
1009
+ def _reduce_471(val, _values, result); end
1010
+ def _reduce_472(val, _values, result); end
1011
+ def _reduce_473(val, _values, result); end
1012
+ def _reduce_474(val, _values, result); end
1013
+ def _reduce_475(val, _values, result); end
1014
+ def _reduce_476(val, _values, result); end
1015
+ def _reduce_478(val, _values, result); end
1016
+ def _reduce_479(val, _values, result); end
1017
+ def _reduce_48(val, _values, result); end
1018
+ def _reduce_480(val, _values, result); end
1019
+ def _reduce_481(val, _values, result); end
1020
+ def _reduce_482(val, _values, result); end
1021
+ def _reduce_483(val, _values, result); end
1022
+ def _reduce_484(val, _values, result); end
1023
+ def _reduce_485(val, _values, result); end
1024
+ def _reduce_486(val, _values, result); end
1025
+ def _reduce_487(val, _values, result); end
1026
+ def _reduce_488(val, _values, result); end
1027
+ def _reduce_489(val, _values, result); end
1028
+ def _reduce_49(val, _values, result); end
1029
+ def _reduce_490(val, _values, result); end
1030
+ def _reduce_491(val, _values, result); end
1031
+ def _reduce_492(val, _values, result); end
1032
+ def _reduce_493(val, _values, result); end
1033
+ def _reduce_494(val, _values, result); end
1034
+ def _reduce_495(val, _values, result); end
1035
+ def _reduce_496(val, _values, result); end
1036
+ def _reduce_497(val, _values, result); end
1037
+ def _reduce_498(val, _values, result); end
1038
+ def _reduce_499(val, _values, result); end
1039
+ def _reduce_5(val, _values, result); end
1040
+ def _reduce_50(val, _values, result); end
1041
+ def _reduce_500(val, _values, result); end
1042
+ def _reduce_501(val, _values, result); end
1043
+ def _reduce_502(val, _values, result); end
1044
+ def _reduce_503(val, _values, result); end
1045
+ def _reduce_504(val, _values, result); end
1046
+ def _reduce_505(val, _values, result); end
1047
+ def _reduce_506(val, _values, result); end
1048
+ def _reduce_507(val, _values, result); end
1049
+ def _reduce_508(val, _values, result); end
1050
+ def _reduce_509(val, _values, result); end
1051
+ def _reduce_510(val, _values, result); end
1052
+ def _reduce_511(val, _values, result); end
1053
+ def _reduce_512(val, _values, result); end
1054
+ def _reduce_513(val, _values, result); end
1055
+ def _reduce_514(val, _values, result); end
1056
+ def _reduce_515(val, _values, result); end
1057
+ def _reduce_516(val, _values, result); end
1058
+ def _reduce_517(val, _values, result); end
1059
+ def _reduce_518(val, _values, result); end
1060
+ def _reduce_519(val, _values, result); end
1061
+ def _reduce_520(val, _values, result); end
1062
+ def _reduce_521(val, _values, result); end
1063
+ def _reduce_522(val, _values, result); end
1064
+ def _reduce_523(val, _values, result); end
1065
+ def _reduce_524(val, _values, result); end
1066
+ def _reduce_525(val, _values, result); end
1067
+ def _reduce_526(val, _values, result); end
1068
+ def _reduce_527(val, _values, result); end
1069
+ def _reduce_528(val, _values, result); end
1070
+ def _reduce_529(val, _values, result); end
1071
+ def _reduce_53(val, _values, result); end
1072
+ def _reduce_530(val, _values, result); end
1073
+ def _reduce_531(val, _values, result); end
1074
+ def _reduce_532(val, _values, result); end
1075
+ def _reduce_533(val, _values, result); end
1076
+ def _reduce_534(val, _values, result); end
1077
+ def _reduce_536(val, _values, result); end
1078
+ def _reduce_537(val, _values, result); end
1079
+ def _reduce_538(val, _values, result); end
1080
+ def _reduce_539(val, _values, result); end
1081
+ def _reduce_54(val, _values, result); end
1082
+ def _reduce_540(val, _values, result); end
1083
+ def _reduce_541(val, _values, result); end
1084
+ def _reduce_542(val, _values, result); end
1085
+ def _reduce_543(val, _values, result); end
1086
+ def _reduce_544(val, _values, result); end
1087
+ def _reduce_545(val, _values, result); end
1088
+ def _reduce_546(val, _values, result); end
1089
+ def _reduce_547(val, _values, result); end
1090
+ def _reduce_548(val, _values, result); end
1091
+ def _reduce_549(val, _values, result); end
1092
+ def _reduce_550(val, _values, result); end
1093
+ def _reduce_553(val, _values, result); end
1094
+ def _reduce_554(val, _values, result); end
1095
+ def _reduce_555(val, _values, result); end
1096
+ def _reduce_556(val, _values, result); end
1097
+ def _reduce_557(val, _values, result); end
1098
+ def _reduce_558(val, _values, result); end
1099
+ def _reduce_559(val, _values, result); end
1100
+ def _reduce_560(val, _values, result); end
1101
+ def _reduce_563(val, _values, result); end
1102
+ def _reduce_564(val, _values, result); end
1103
+ def _reduce_567(val, _values, result); end
1104
+ def _reduce_568(val, _values, result); end
1105
+ def _reduce_569(val, _values, result); end
1106
+ def _reduce_571(val, _values, result); end
1107
+ def _reduce_572(val, _values, result); end
1108
+ def _reduce_574(val, _values, result); end
1109
+ def _reduce_575(val, _values, result); end
1110
+ def _reduce_576(val, _values, result); end
1111
+ def _reduce_577(val, _values, result); end
1112
+ def _reduce_578(val, _values, result); end
1113
+ def _reduce_579(val, _values, result); end
1114
+ def _reduce_58(val, _values, result); end
1115
+ def _reduce_59(val, _values, result); end
1116
+ def _reduce_592(val, _values, result); end
1117
+ def _reduce_593(val, _values, result); end
1118
+ def _reduce_598(val, _values, result); end
1119
+ def _reduce_599(val, _values, result); end
1120
+ def _reduce_6(val, _values, result); end
1121
+ def _reduce_60(val, _values, result); end
1122
+ def _reduce_603(val, _values, result); end
1123
+ def _reduce_607(val, _values, result); end
1124
+ def _reduce_62(val, _values, result); end
1125
+ def _reduce_63(val, _values, result); end
1126
+ def _reduce_64(val, _values, result); end
1127
+ def _reduce_65(val, _values, result); end
1128
+ def _reduce_66(val, _values, result); end
1129
+ def _reduce_67(val, _values, result); end
1130
+ def _reduce_68(val, _values, result); end
1131
+ def _reduce_69(val, _values, result); end
1132
+ def _reduce_70(val, _values, result); end
1133
+ def _reduce_71(val, _values, result); end
1134
+ def _reduce_72(val, _values, result); end
1135
+ def _reduce_73(val, _values, result); end
1136
+ def _reduce_74(val, _values, result); end
1137
+ def _reduce_75(val, _values, result); end
1138
+ def _reduce_76(val, _values, result); end
1139
+ def _reduce_78(val, _values, result); end
1140
+ def _reduce_79(val, _values, result); end
1141
+ def _reduce_8(val, _values, result); end
1142
+ def _reduce_80(val, _values, result); end
1143
+ def _reduce_81(val, _values, result); end
1144
+ def _reduce_82(val, _values, result); end
1145
+ def _reduce_83(val, _values, result); end
1146
+ def _reduce_84(val, _values, result); end
1147
+ def _reduce_85(val, _values, result); end
1148
+ def _reduce_86(val, _values, result); end
1149
+ def _reduce_88(val, _values, result); end
1150
+ def _reduce_89(val, _values, result); end
1151
+ def _reduce_9(val, _values, result); end
1152
+ def _reduce_90(val, _values, result); end
1153
+ def _reduce_91(val, _values, result); end
1154
+ def _reduce_92(val, _values, result); end
1155
+ def _reduce_93(val, _values, result); end
1156
+ def _reduce_94(val, _values, result); end
1157
+ def _reduce_95(val, _values, result); end
1158
+ def _reduce_96(val, _values, result); end
1159
+ def _reduce_97(val, _values, result); end
1160
+ def _reduce_98(val, _values, result); end
1161
+ def _reduce_99(val, _values, result); end
1162
+ def _reduce_none(val, _values, result); end
1163
+ def default_encoding; end
1164
+ def version; end
1165
+ end
1166
+
1167
+ Parser::Ruby26::Racc_arg = T.let(T.unsafe(nil), Array)
1168
+
1169
+ Parser::Ruby26::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
1170
+
1171
+ module Parser::Source
1172
+ end
1173
+
1174
+ class Parser::Source::Buffer
1175
+ def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end
1176
+
1177
+ def column_for_position(position); end
1178
+ def decompose_position(position); end
1179
+ def first_line; end
1180
+ def last_line; end
1181
+ def line_for_position(position); end
1182
+ def line_range(lineno); end
1183
+ def name; end
1184
+ def raw_source=(input); end
1185
+ def read; end
1186
+ def slice(range); end
1187
+ def source; end
1188
+ def source=(input); end
1189
+ def source_line(lineno); end
1190
+ def source_lines; end
1191
+ def source_range; end
1192
+
1193
+ private
1194
+
1195
+ def line_begins; end
1196
+ def line_for(position); end
1197
+
1198
+ class << self
1199
+ def recognize_encoding(string); end
1200
+ def reencode_string(input); end
1201
+ end
1202
+ end
1203
+
1204
+ Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp)
1205
+
1206
+ class Parser::Source::Comment
1207
+ def initialize(range); end
1208
+
1209
+ def ==(other); end
1210
+ def document?; end
1211
+ def inline?; end
1212
+ def inspect; end
1213
+ def loc; end
1214
+ def location; end
1215
+ def text; end
1216
+ def type; end
1217
+
1218
+ class << self
1219
+ def associate(ast, comments); end
1220
+ def associate_locations(ast, comments); end
1221
+ end
1222
+ end
1223
+
1224
+ class Parser::Source::Comment::Associator
1225
+ def initialize(ast, comments); end
1226
+
1227
+ def associate; end
1228
+ def associate_locations; end
1229
+ def skip_directives; end
1230
+ def skip_directives=(_); end
1231
+
1232
+ private
1233
+
1234
+ def advance_comment; end
1235
+ def advance_through_directives; end
1236
+ def associate_and_advance_comment(node); end
1237
+ def children_in_source_order(node); end
1238
+ def current_comment_before?(node); end
1239
+ def current_comment_before_end?(node); end
1240
+ def current_comment_decorates?(node); end
1241
+ def do_associate; end
1242
+ def process_leading_comments(node); end
1243
+ def process_trailing_comments(node); end
1244
+ def visit(node); end
1245
+ end
1246
+
1247
+ Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp)
1248
+
1249
+ Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set)
1250
+
1251
+ class Parser::Source::Map
1252
+ def initialize(expression); end
1253
+
1254
+ def ==(other); end
1255
+ def column; end
1256
+ def expression; end
1257
+ def first_line; end
1258
+ def last_column; end
1259
+ def last_line; end
1260
+ def line; end
1261
+ def node; end
1262
+ def node=(node); end
1263
+ def to_hash; end
1264
+ def with_expression(expression_l); end
1265
+
1266
+ protected
1267
+
1268
+ def update_expression(expression_l); end
1269
+ def with(&block); end
1270
+
1271
+ private
1272
+
1273
+ def initialize_copy(other); end
1274
+ end
1275
+
1276
+ class Parser::Source::Map::Collection < ::Parser::Source::Map
1277
+ def initialize(begin_l, end_l, expression_l); end
1278
+
1279
+ def begin; end
1280
+ def end; end
1281
+ end
1282
+
1283
+ class Parser::Source::Map::Condition < ::Parser::Source::Map
1284
+ def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end
1285
+
1286
+ def begin; end
1287
+ def else; end
1288
+ def end; end
1289
+ def keyword; end
1290
+ end
1291
+
1292
+ class Parser::Source::Map::Constant < ::Parser::Source::Map
1293
+ def initialize(double_colon, name, expression); end
1294
+
1295
+ def double_colon; end
1296
+ def name; end
1297
+ def operator; end
1298
+ def with_operator(operator_l); end
1299
+
1300
+ protected
1301
+
1302
+ def update_operator(operator_l); end
1303
+ end
1304
+
1305
+ class Parser::Source::Map::Definition < ::Parser::Source::Map
1306
+ def initialize(keyword_l, operator_l, name_l, end_l); end
1307
+
1308
+ def end; end
1309
+ def keyword; end
1310
+ def name; end
1311
+ def operator; end
1312
+ end
1313
+
1314
+ class Parser::Source::Map::EndlessDefinition < ::Parser::Source::Map
1315
+ def initialize(keyword_l, operator_l, name_l, assignment_l, body_l); end
1316
+
1317
+ def assignment; end
1318
+ def keyword; end
1319
+ def name; end
1320
+ def operator; end
1321
+ end
1322
+
1323
+ class Parser::Source::Map::For < ::Parser::Source::Map
1324
+ def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end
1325
+
1326
+ def begin; end
1327
+ def end; end
1328
+ def in; end
1329
+ def keyword; end
1330
+ end
1331
+
1332
+ class Parser::Source::Map::Heredoc < ::Parser::Source::Map
1333
+ def initialize(begin_l, body_l, end_l); end
1334
+
1335
+ def heredoc_body; end
1336
+ def heredoc_end; end
1337
+ end
1338
+
1339
+ class Parser::Source::Map::Index < ::Parser::Source::Map
1340
+ def initialize(begin_l, end_l, expression_l); end
1341
+
1342
+ def begin; end
1343
+ def end; end
1344
+ def operator; end
1345
+ def with_operator(operator_l); end
1346
+
1347
+ protected
1348
+
1349
+ def update_operator(operator_l); end
1350
+ end
1351
+
1352
+ class Parser::Source::Map::Keyword < ::Parser::Source::Map
1353
+ def initialize(keyword_l, begin_l, end_l, expression_l); end
1354
+
1355
+ def begin; end
1356
+ def end; end
1357
+ def keyword; end
1358
+ end
1359
+
1360
+ class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map
1361
+ def initialize(keyword_l, operator_l, argument_l, expression_l); end
1362
+
1363
+ def argument; end
1364
+ def keyword; end
1365
+ def operator; end
1366
+ end
1367
+
1368
+ class Parser::Source::Map::Operator < ::Parser::Source::Map
1369
+ def initialize(operator, expression); end
1370
+
1371
+ def operator; end
1372
+ end
1373
+
1374
+ class Parser::Source::Map::RescueBody < ::Parser::Source::Map
1375
+ def initialize(keyword_l, assoc_l, begin_l, expression_l); end
1376
+
1377
+ def assoc; end
1378
+ def begin; end
1379
+ def keyword; end
1380
+ end
1381
+
1382
+ class Parser::Source::Map::Send < ::Parser::Source::Map
1383
+ def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end
1384
+
1385
+ def begin; end
1386
+ def dot; end
1387
+ def end; end
1388
+ def operator; end
1389
+ def selector; end
1390
+ def with_operator(operator_l); end
1391
+
1392
+ protected
1393
+
1394
+ def update_operator(operator_l); end
1395
+ end
1396
+
1397
+ class Parser::Source::Map::Ternary < ::Parser::Source::Map
1398
+ def initialize(question_l, colon_l, expression_l); end
1399
+
1400
+ def colon; end
1401
+ def question; end
1402
+ end
1403
+
1404
+ class Parser::Source::Map::Variable < ::Parser::Source::Map
1405
+ def initialize(name_l, expression_l = T.unsafe(nil)); end
1406
+
1407
+ def name; end
1408
+ def operator; end
1409
+ def with_operator(operator_l); end
1410
+
1411
+ protected
1412
+
1413
+ def update_operator(operator_l); end
1414
+ end
1415
+
1416
+ class Parser::Source::Range
1417
+ include(::Comparable)
1418
+
1419
+ def initialize(source_buffer, begin_pos, end_pos); end
1420
+
1421
+ def <=>(other); end
1422
+ def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end
1423
+ def begin; end
1424
+ def begin_pos; end
1425
+ def column; end
1426
+ def column_range; end
1427
+ def contained?(other); end
1428
+ def contains?(other); end
1429
+ def crossing?(other); end
1430
+ def disjoint?(other); end
1431
+ def empty?; end
1432
+ def end; end
1433
+ def end_pos; end
1434
+ def eql?(_); end
1435
+ def first_line; end
1436
+ def hash; end
1437
+ def inspect; end
1438
+ def intersect(other); end
1439
+ def is?(*what); end
1440
+ def join(other); end
1441
+ def last_column; end
1442
+ def last_line; end
1443
+ def length; end
1444
+ def line; end
1445
+ def overlaps?(other); end
1446
+ def resize(new_size); end
1447
+ def size; end
1448
+ def source; end
1449
+ def source_buffer; end
1450
+ def source_line; end
1451
+ def to_a; end
1452
+ def to_range; end
1453
+ def to_s; end
1454
+ def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end
1455
+ end
1456
+
1457
+ class Parser::Source::Rewriter
1458
+ extend(::Parser::Deprecation)
1459
+
1460
+ def initialize(source_buffer); end
1461
+
1462
+ def diagnostics; end
1463
+ def insert_after(range, content); end
1464
+ def insert_after_multi(range, content); end
1465
+ def insert_before(range, content); end
1466
+ def insert_before_multi(range, content); end
1467
+ def process; end
1468
+ def remove(range); end
1469
+ def replace(range, content); end
1470
+ def source_buffer; end
1471
+ def transaction; end
1472
+ def wrap(range, before, after); end
1473
+
1474
+ private
1475
+
1476
+ def active_clobber; end
1477
+ def active_clobber=(value); end
1478
+ def active_insertions; end
1479
+ def active_insertions=(value); end
1480
+ def active_queue; end
1481
+ def adjacent?(range1, range2); end
1482
+ def adjacent_insertion_mask(range); end
1483
+ def adjacent_insertions?(range); end
1484
+ def adjacent_position_mask(range); end
1485
+ def adjacent_updates?(range); end
1486
+ def append(action); end
1487
+ def can_merge?(action, existing); end
1488
+ def clobbered_insertion?(insertion); end
1489
+ def clobbered_position_mask(range); end
1490
+ def in_transaction?; end
1491
+ def merge_actions(action, existing); end
1492
+ def merge_actions!(action, existing); end
1493
+ def merge_replacements(actions); end
1494
+ def raise_clobber_error(action, existing); end
1495
+ def record_insertion(range); end
1496
+ def record_replace(range); end
1497
+ def replace_actions(old, updated); end
1498
+ def replace_compatible_with_insertion?(replace, insertion); end
1499
+ end
1500
+
1501
+ class Parser::Source::Rewriter::Action
1502
+ include(::Comparable)
1503
+
1504
+ def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end
1505
+
1506
+ def <=>(other); end
1507
+ def allow_multiple_insertions; end
1508
+ def allow_multiple_insertions?; end
1509
+ def order; end
1510
+ def range; end
1511
+ def replacement; end
1512
+ def to_s; end
1513
+ end
1514
+
1515
+ Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
1516
+
1517
+ class Parser::Source::TreeRewriter
1518
+ extend(::Parser::Deprecation)
1519
+
1520
+ def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end
1521
+
1522
+ def as_nested_actions; end
1523
+ def as_replacements; end
1524
+ def diagnostics; end
1525
+ def empty?; end
1526
+ def import!(foreign_rewriter, offset: T.unsafe(nil)); end
1527
+ def in_transaction?; end
1528
+ def insert_after(range, content); end
1529
+ def insert_after_multi(range, text); end
1530
+ def insert_before(range, content); end
1531
+ def insert_before_multi(range, text); end
1532
+ def merge(with); end
1533
+ def merge!(with); end
1534
+ def process; end
1535
+ def remove(range); end
1536
+ def replace(range, content); end
1537
+ def source_buffer; end
1538
+ def transaction; end
1539
+ def wrap(range, insert_before, insert_after); end
1540
+
1541
+ protected
1542
+
1543
+ def action_root; end
1544
+
1545
+ private
1546
+
1547
+ def check_policy_validity; end
1548
+ def check_range_validity(range); end
1549
+ def combine(range, attributes); end
1550
+ def enforce_policy(event); end
1551
+ def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end
1552
+ end
1553
+
1554
+ Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array)
1555
+
1556
+ class Parser::Source::TreeRewriter::Action
1557
+ def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end
1558
+
1559
+ def combine(action); end
1560
+ def contract; end
1561
+ def empty?; end
1562
+ def insert_after; end
1563
+ def insert_before; end
1564
+ def insertion?; end
1565
+ def moved(source_buffer, offset); end
1566
+ def nested_actions; end
1567
+ def ordered_replacements; end
1568
+ def range; end
1569
+ def replacement; end
1570
+
1571
+ protected
1572
+
1573
+ def analyse_hierarchy(action); end
1574
+ def bsearch_child_index(from = T.unsafe(nil)); end
1575
+ def call_enforcer_for_merge(action); end
1576
+ def check_fusible(action, *fusible); end
1577
+ def children; end
1578
+ def combine_children(more_children); end
1579
+ def do_combine(action); end
1580
+ def fuse_deletions(action, fusible, other_sibblings); end
1581
+ def merge(action); end
1582
+ def place_in_hierarchy(action); end
1583
+ def swallow(children); end
1584
+ 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
1585
+ end
1586
+
1587
+ Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
1588
+
1589
+ Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash)
1590
+
1591
+ class Parser::StaticEnvironment
1592
+ def initialize; end
1593
+
1594
+ def declare(name); end
1595
+ def declare_forward_args; end
1596
+ def declared?(name); end
1597
+ def declared_forward_args?; end
1598
+ def extend_dynamic; end
1599
+ def extend_static; end
1600
+ def reset; end
1601
+ def unextend; end
1602
+ end
1603
+
1604
+ Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol)
1605
+
1606
+ class Parser::SyntaxError < ::StandardError
1607
+ def initialize(diagnostic); end
1608
+
1609
+ def diagnostic; end
1610
+ end
1611
+
1612
+ class Parser::TreeRewriter < ::Parser::AST::Processor
1613
+ def assignment?(node); end
1614
+ def insert_after(range, content); end
1615
+ def insert_before(range, content); end
1616
+ def remove(range); end
1617
+ def replace(range, content); end
1618
+ def rewrite(source_buffer, ast, **policy); end
1619
+ def wrap(range, before, after); end
1620
+ end
1621
+
1622
+ Parser::VERSION = T.let(T.unsafe(nil), String)
1623
+
1624
+ class Parser::VariablesStack
1625
+ def initialize; end
1626
+
1627
+ def declare(name); end
1628
+ def declared?(name); end
1629
+ def pop; end
1630
+ def push; end
1631
+ def reset; end
1632
+ end