clean-architecture 5.0.2 → 6.0.0

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