From 9240ee3e17c9baa6a24208d31a0ea08ce2b378f0 Mon Sep 17 00:00:00 2001 From: Max VelDink Date: Sun, 3 Nov 2024 04:38:21 -0500 Subject: [PATCH 1/7] chore: binstub rake --- bin/rake | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 bin/rake diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000..4eb7d7b --- /dev/null +++ b/bin/rake @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rake' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rake", "rake") From a989b48f9df3fa828077db5c2b9831a3ad80f604 Mon Sep 17 00:00:00 2001 From: Max VelDink Date: Sun, 3 Nov 2024 04:38:38 -0500 Subject: [PATCH 2/7] chore(deps): bump and rebuild rbis --- Gemfile.lock | 105 +- sorbet/rbi/gems/ast@2.4.2.rbi | 1 + .../{erubi@1.12.0.rbi => erubi@1.13.0.rbi} | 35 +- sorbet/rbi/gems/io-console@0.7.2.rbi | 1 + .../gems/{json@2.7.1.rbi => json@2.7.5.rbi} | 220 +- .../language_server-protocol@3.17.0.3.rbi | 1 + sorbet/rbi/gems/lint_roller@1.1.0.rbi | 1 + ...initest@5.22.2.rbi => minitest@5.25.1.rbi} | 493 +- sorbet/rbi/gems/netrc@0.11.0.rbi | 1 + ...arallel@1.24.0.rbi => parallel@1.26.3.rbi} | 53 +- ...{parser@3.3.0.5.rbi => parser@3.3.5.1.rbi} | 419 +- sorbet/rbi/gems/prettier_print@1.2.1.rbi | 951 - sorbet/rbi/gems/prism@0.24.0.rbi | 31040 ------------ sorbet/rbi/gems/prism@1.2.0.rbi | 39085 ++++++++++++++++ sorbet/rbi/gems/psych@5.1.2.rbi | 1 + .../gems/{racc@1.7.3.rbi => racc@1.8.1.rbi} | 71 +- sorbet/rbi/gems/rainbow@3.1.1.rbi | 1 + .../gems/{rake@13.1.0.rbi => rake@13.2.1.rbi} | 111 +- sorbet/rbi/gems/rbi@0.1.9.rbi | 3006 -- sorbet/rbi/gems/rbi@0.2.1.rbi | 4535 ++ ...rser@2.9.0.rbi => regexp_parser@2.9.2.rbi} | 5 +- .../{reline@0.4.2.rbi => reline@0.5.10.rbi} | 1 + sorbet/rbi/gems/rexml@3.2.6.rbi | 4781 -- ...-ast@1.30.0.rbi => rubocop-ast@1.33.1.rbi} | 1814 +- ...0.2.rbi => rubocop-performance@1.22.1.rbi} | 1 + ...bet@0.7.7.rbi => rubocop-sorbet@0.7.8.rbi} | 1 + ...{rubocop@1.60.2.rbi => rubocop@1.66.1.rbi} | 5727 ++- sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi | 1 + .../gems/{spoom@1.2.4.rbi => spoom@1.5.0.rbi} | 2863 +- sorbet/rbi/gems/standard-custom@1.0.2.rbi | 1 + ...3.1.rbi => standard-performance@1.5.0.rbi} | 1 + sorbet/rbi/gems/standard-sorbet@0.0.2.rbi | 1 + ...tandard@1.34.0.rbi => standard@1.41.1.rbi} | 266 +- ...{stringio@3.1.0.rbi => stringio@3.1.1.rbi} | 1 + sorbet/rbi/gems/syntax_tree@6.2.0.rbi | 23133 --------- ...{tapioca@0.12.0.rbi => tapioca@0.16.3.rbi} | 614 +- .../gems/{thor@1.3.0.rbi => thor@1.3.2.rbi} | 195 +- ....0.rbi => unicode-display_width@2.6.0.rbi} | 1 + ...sorbet@0.8.1.rbi => yard-sorbet@0.9.0.rbi} | 65 +- .../gems/{yard@0.9.34.rbi => yard@0.9.37.rbi} | 700 +- 40 files changed, 52040 insertions(+), 68263 deletions(-) rename sorbet/rbi/gems/{erubi@1.12.0.rbi => erubi@1.13.0.rbi} (91%) rename sorbet/rbi/gems/{json@2.7.1.rbi => json@2.7.5.rbi} (89%) rename sorbet/rbi/gems/{minitest@5.22.2.rbi => minitest@5.25.1.rbi} (83%) rename sorbet/rbi/gems/{parallel@1.24.0.rbi => parallel@1.26.3.rbi} (84%) rename sorbet/rbi/gems/{parser@3.3.0.5.rbi => parser@3.3.5.1.rbi} (93%) delete mode 100644 sorbet/rbi/gems/prettier_print@1.2.1.rbi delete mode 100644 sorbet/rbi/gems/prism@0.24.0.rbi create mode 100644 sorbet/rbi/gems/prism@1.2.0.rbi rename sorbet/rbi/gems/{racc@1.7.3.rbi => racc@1.8.1.rbi} (66%) rename sorbet/rbi/gems/{rake@13.1.0.rbi => rake@13.2.1.rbi} (97%) delete mode 100644 sorbet/rbi/gems/rbi@0.1.9.rbi create mode 100644 sorbet/rbi/gems/rbi@0.2.1.rbi rename sorbet/rbi/gems/{regexp_parser@2.9.0.rbi => regexp_parser@2.9.2.rbi} (99%) rename sorbet/rbi/gems/{reline@0.4.2.rbi => reline@0.5.10.rbi} (99%) delete mode 100644 sorbet/rbi/gems/rexml@3.2.6.rbi rename sorbet/rbi/gems/{rubocop-ast@1.30.0.rbi => rubocop-ast@1.33.1.rbi} (79%) rename sorbet/rbi/gems/{rubocop-performance@1.20.2.rbi => rubocop-performance@1.22.1.rbi} (99%) rename sorbet/rbi/gems/{rubocop-sorbet@0.7.7.rbi => rubocop-sorbet@0.7.8.rbi} (99%) rename sorbet/rbi/gems/{rubocop@1.60.2.rbi => rubocop@1.66.1.rbi} (94%) rename sorbet/rbi/gems/{spoom@1.2.4.rbi => spoom@1.5.0.rbi} (59%) rename sorbet/rbi/gems/{standard-performance@1.3.1.rbi => standard-performance@1.5.0.rbi} (99%) rename sorbet/rbi/gems/{standard@1.34.0.rbi => standard@1.41.1.rbi} (74%) rename sorbet/rbi/gems/{stringio@3.1.0.rbi => stringio@3.1.1.rbi} (99%) delete mode 100644 sorbet/rbi/gems/syntax_tree@6.2.0.rbi rename sorbet/rbi/gems/{tapioca@0.12.0.rbi => tapioca@0.16.3.rbi} (87%) rename sorbet/rbi/gems/{thor@1.3.0.rbi => thor@1.3.2.rbi} (96%) rename sorbet/rbi/gems/{unicode-display_width@2.5.0.rbi => unicode-display_width@2.6.0.rbi} (99%) rename sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi => yard-sorbet@0.9.0.rbi} (90%) rename sorbet/rbi/gems/{yard@0.9.34.rbi => yard@0.9.37.rbi} (97%) diff --git a/Gemfile.lock b/Gemfile.lock index 691d936..4f867c6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,104 +8,99 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) - debug (1.9.1) + debug (1.9.2) irb (~> 1.10) reline (>= 0.3.8) - erubi (1.12.0) + erubi (1.13.0) io-console (0.7.2) - irb (1.11.2) - rdoc + irb (1.14.1) + rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.1) + json (2.7.5) language_server-protocol (3.17.0.3) lint_roller (1.1.0) - minitest (5.22.2) + minitest (5.25.1) netrc (0.11.0) - parallel (1.24.0) - parser (3.3.0.5) + parallel (1.26.3) + parser (3.3.5.1) ast (~> 2.4.1) racc - prettier_print (1.2.1) - prism (0.24.0) + prism (1.2.0) psych (5.1.2) stringio - racc (1.7.3) + racc (1.8.1) rainbow (3.1.1) - rake (13.1.0) - rbi (0.1.9) - prism (>= 0.18.0, < 0.25) + rake (13.2.1) + rbi (0.2.1) + prism (~> 1.0) sorbet-runtime (>= 0.5.9204) - rdoc (6.6.2) + rdoc (6.7.0) psych (>= 4.0.0) - regexp_parser (2.9.0) - reline (0.4.2) + regexp_parser (2.9.2) + reline (0.5.10) io-console (~> 0.5) - rexml (3.2.6) - rubocop (1.60.2) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.30.0, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) - rubocop-performance (1.20.2) + rubocop-ast (1.33.1) + parser (>= 3.3.1.0) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) - rubocop-sorbet (0.7.7) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-sorbet (0.7.8) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) - sorbet (0.5.11262) - sorbet-static (= 0.5.11262) - sorbet-runtime (0.5.11262) - sorbet-static (0.5.11262-universal-darwin) - sorbet-static (0.5.11262-x86_64-linux) - sorbet-static-and-runtime (0.5.11262) - sorbet (= 0.5.11262) - sorbet-runtime (= 0.5.11262) - spoom (1.2.4) + sorbet (0.5.11633) + sorbet-static (= 0.5.11633) + sorbet-runtime (0.5.11633) + sorbet-static (0.5.11633-universal-darwin) + sorbet-static (0.5.11633-x86_64-linux) + sorbet-static-and-runtime (0.5.11633) + sorbet (= 0.5.11633) + sorbet-runtime (= 0.5.11633) + spoom (1.5.0) erubi (>= 1.10.0) + prism (>= 0.28.0) sorbet-static-and-runtime (>= 0.5.10187) - syntax_tree (>= 6.1.1) thor (>= 0.19.2) - standard (1.34.0) + standard (1.41.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.60) + rubocop (~> 1.66.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.3) + standard-performance (~> 1.5) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.3.1) + standard-performance (1.5.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.20.2) + rubocop-performance (~> 1.22.0) standard-sorbet (0.0.2) lint_roller (~> 1.1) rubocop-sorbet (~> 0.7.0) - stringio (3.1.0) - syntax_tree (6.2.0) - prettier_print (>= 1.2.0) - tapioca (0.12.0) + stringio (3.1.1) + tapioca (0.16.3) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (>= 0.1.4, < 0.2) - sorbet-static-and-runtime (>= 0.5.10820) - spoom (~> 1.2.0, >= 1.2.0) + rbi (~> 0.2) + sorbet-static-and-runtime (>= 0.5.11087) + spoom (>= 1.2.0) thor (>= 1.2.0) yard-sorbet - thor (1.3.0) - unicode-display_width (2.5.0) - yard (0.9.34) - yard-sorbet (0.8.1) - sorbet-runtime (>= 0.5) - yard (>= 0.9) + thor (1.3.2) + unicode-display_width (2.6.0) + yard (0.9.37) + yard-sorbet (0.9.0) + sorbet-runtime + yard PLATFORMS arm64-darwin-22 diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi index 3fc4495..e0ae88e 100644 --- a/sorbet/rbi/gems/ast@2.4.2.rbi +++ b/sorbet/rbi/gems/ast@2.4.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `ast` gem. # Please instead update this file by running `bin/tapioca gem ast`. + # {AST} is a library for manipulating abstract syntax trees. # # It embraces immutability; each AST node is inherently frozen at diff --git a/sorbet/rbi/gems/erubi@1.12.0.rbi b/sorbet/rbi/gems/erubi@1.13.0.rbi similarity index 91% rename from sorbet/rbi/gems/erubi@1.12.0.rbi rename to sorbet/rbi/gems/erubi@1.13.0.rbi index c52738f..16d45fa 100644 --- a/sorbet/rbi/gems/erubi@1.12.0.rbi +++ b/sorbet/rbi/gems/erubi@1.13.0.rbi @@ -4,14 +4,19 @@ # This is an autogenerated file for types exported from the `erubi` gem. # Please instead update this file by running `bin/tapioca gem erubi`. + # source://erubi//lib/erubi.rb#3 module Erubi + private + + def h(_arg0); end + class << self def h(_arg0); end end end -# source://erubi//lib/erubi.rb#54 +# source://erubi//lib/erubi.rb#51 class Erubi::Engine # Initialize a new Erubi::Engine. Options: # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). @@ -42,64 +47,64 @@ class Erubi::Engine # # @return [Engine] a new instance of Engine # - # source://erubi//lib/erubi.rb#94 + # source://erubi//lib/erubi.rb#91 def initialize(input, properties = T.unsafe(nil)); end # The variable name used for the buffer variable. # - # source://erubi//lib/erubi.rb#65 + # source://erubi//lib/erubi.rb#62 def bufvar; end # The filename of the template, if one was given. # - # source://erubi//lib/erubi.rb#62 + # source://erubi//lib/erubi.rb#59 def filename; end # The frozen ruby source code generated from the template, which can be evaled. # - # source://erubi//lib/erubi.rb#59 + # source://erubi//lib/erubi.rb#56 def src; end private # Add ruby code to the template # - # source://erubi//lib/erubi.rb#226 + # source://erubi//lib/erubi.rb#223 def add_code(code); end # Add the given ruby expression result to the template, # escaping it based on the indicator given and escape flag. # - # source://erubi//lib/erubi.rb#235 + # source://erubi//lib/erubi.rb#232 def add_expression(indicator, code); end # Add the result of Ruby expression to the template # - # source://erubi//lib/erubi.rb#244 + # source://erubi//lib/erubi.rb#241 def add_expression_result(code); end # Add the escaped result of Ruby expression to the template # - # source://erubi//lib/erubi.rb#249 + # source://erubi//lib/erubi.rb#246 def add_expression_result_escaped(code); end # Add the given postamble to the src. Can be overridden in subclasses # to make additional changes to src that depend on the current state. # - # source://erubi//lib/erubi.rb#255 + # source://erubi//lib/erubi.rb#252 def add_postamble(postamble); end # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). # - # source://erubi//lib/erubi.rb#213 + # source://erubi//lib/erubi.rb#210 def add_text(text); end # Raise an exception, as the base engine class does not support handling other indicators. # # @raise [ArgumentError] # - # source://erubi//lib/erubi.rb#261 + # source://erubi//lib/erubi.rb#258 def handle(indicator, code, tailch, rspace, lspace); end # Make sure that any current expression has been terminated. @@ -107,7 +112,7 @@ class Erubi::Engine # the chain_appends option is used, expressions may not be # terminated. # - # source://erubi//lib/erubi.rb#289 + # source://erubi//lib/erubi.rb#286 def terminate_expression; end # Make sure the buffer variable is the target of the next append @@ -117,13 +122,13 @@ class Erubi::Engine # This method should only be called if the block will result in # code where << will append to the bufvar. # - # source://erubi//lib/erubi.rb#271 + # source://erubi//lib/erubi.rb#268 def with_buffer; end end # The default regular expression used for scanning. # -# source://erubi//lib/erubi.rb#56 +# source://erubi//lib/erubi.rb#53 Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) # source://erubi//lib/erubi.rb#17 diff --git a/sorbet/rbi/gems/io-console@0.7.2.rbi b/sorbet/rbi/gems/io-console@0.7.2.rbi index ffc1f7a..73616ab 100644 --- a/sorbet/rbi/gems/io-console@0.7.2.rbi +++ b/sorbet/rbi/gems/io-console@0.7.2.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `io-console` gem. # Please instead update this file by running `bin/tapioca gem io-console`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/json@2.7.1.rbi b/sorbet/rbi/gems/json@2.7.5.rbi similarity index 89% rename from sorbet/rbi/gems/json@2.7.1.rbi rename to sorbet/rbi/gems/json@2.7.5.rbi index 47754dc..d2f9dad 100644 --- a/sorbet/rbi/gems/json@2.7.1.rbi +++ b/sorbet/rbi/gems/json@2.7.5.rbi @@ -4,7 +4,10 @@ # This is an autogenerated file for types exported from the `json` gem. # Please instead update this file by running `bin/tapioca gem json`. + # Extends any Class to include _json_creatable?_ method. +# +# source://json//lib/json/common.rb#726 class Class < ::Module # Returns true if this class can be used to create an instance # from a serialised JSON string. The class has to implement a class @@ -13,7 +16,7 @@ class Class < ::Module # # @return [Boolean] # - # source://json//json/common.rb#694 + # source://json//lib/json/common.rb#731 def json_creatable?; end end @@ -595,6 +598,8 @@ end # Parsed JSON: # Without custom addition: "#" (String) # With custom addition: # (Foo) +# +# source://json//lib/json/version.rb#3 module JSON private @@ -626,7 +631,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//json/common.rb#614 + # source://json//lib/json/common.rb#630 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # :call-seq: @@ -643,13 +648,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//json/common.rb#328 + # source://json//lib/json/common.rb#337 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//json/common.rb#328 + # source://json//lib/json/common.rb#337 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -688,7 +693,7 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//json/common.rb#299 + # source://json//lib/json/common.rb#308 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -819,7 +824,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//json/common.rb#540 + # source://json//lib/json/common.rb#549 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -830,7 +835,7 @@ module JSON # # See method #parse. # - # source://json//json/common.rb#248 + # source://json//lib/json/common.rb#257 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -841,10 +846,10 @@ module JSON # # See method #parse! # - # source://json//json/common.rb#259 + # source://json//lib/json/common.rb#268 def load_file!(filespec, opts = T.unsafe(nil)); end - # source://json//json/common.rb#642 + # source://json//lib/json/common.rb#674 def merge_dump_options(opts, strict: T.unsafe(nil)); end # :call-seq: @@ -895,7 +900,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//json/common.rb#218 + # source://json//lib/json/common.rb#218 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -910,7 +915,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//json/common.rb#233 + # source://json//lib/json/common.rb#242 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -943,28 +948,28 @@ module JSON # } # } # - # source://json//json/common.rb#373 + # source://json//lib/json/common.rb#382 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//json/common.rb#373 + # source://json//lib/json/common.rb#382 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//json/common.rb#558 + # source://json//lib/json/common.rb#575 def recurse_proc(result, &proc); end - # source://json//json/common.rb#540 + # source://json//lib/json/common.rb#549 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//json/common.rb#299 + # source://json//lib/json/common.rb#308 def unparse(obj, opts = T.unsafe(nil)); end class << self @@ -980,26 +985,26 @@ module JSON # ruby = [0, 1, nil] # JSON[ruby] # => '[0,1,null]' # - # source://json//json/common.rb#21 + # source://json//lib/json/common.rb#22 def [](object, opts = T.unsafe(nil)); end - # source://json//json/common.rb#84 + # source://json//lib/json/common.rb#90 def create_fast_state; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//json/common.rb#129 + # source://json//lib/json/common.rb#129 def create_id; end # Sets create identifier, which is used to decide if the _json_create_ # hook of a class should be called; initial value is +json_class+: # JSON.create_id # => 'json_class' # - # source://json//json/common.rb#123 + # source://json//lib/json/common.rb#123 def create_id=(new_value); end - # source://json//json/common.rb#94 + # source://json//lib/json/common.rb#100 def create_pretty_state; end # Return the constant located at _path_. The format of _path_ has to be @@ -1007,7 +1012,7 @@ module JSON # level (absolute namespace path?). If there doesn't exist a constant at # the given path, an ArgumentError is raised. # - # source://json//json/common.rb#45 + # source://json//lib/json/common.rb#51 def deep_const_get(path); end # :call-seq: @@ -1038,23 +1043,23 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//json/common.rb#614 + # source://json//lib/json/common.rb#630 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # Sets or returns the default options for the JSON.dump method. # Initially: # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} + # opts # => {:max_nesting=>false, :allow_nan=>true} # - # source://json//json/common.rb#579 + # source://json//lib/json/common.rb#596 def dump_default_options; end # Sets or returns the default options for the JSON.dump method. # Initially: # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} + # opts # => {:max_nesting=>false, :allow_nan=>true} # - # source://json//json/common.rb#579 + # source://json//lib/json/common.rb#596 def dump_default_options=(_arg0); end # :call-seq: @@ -1071,13 +1076,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//json/common.rb#328 + # source://json//lib/json/common.rb#337 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//json/common.rb#328 + # source://json//lib/json/common.rb#337 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -1116,24 +1121,24 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//json/common.rb#299 + # source://json//lib/json/common.rb#308 def generate(obj, opts = T.unsafe(nil)); end # Returns the JSON generator module that is used by JSON. This is # either JSON::Ext::Generator or JSON::Pure::Generator: # JSON.generator # => JSON::Ext::Generator # - # source://json//json/common.rb#106 + # source://json//lib/json/common.rb#112 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//json/common.rb#61 + # source://json//lib/json/common.rb#67 def generator=(generator); end # Encodes string using String.encode. # - # source://json//json/common.rb#638 + # source://json//lib/json/common.rb#670 def iconv(to, from, string); end # :call-seq: @@ -1264,7 +1269,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//json/common.rb#540 + # source://json//lib/json/common.rb#549 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or returns default options for the JSON.load method. @@ -1272,7 +1277,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//json/common.rb#403 + # source://json//lib/json/common.rb#412 def load_default_options; end # Sets or returns default options for the JSON.load method. @@ -1280,7 +1285,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//json/common.rb#403 + # source://json//lib/json/common.rb#412 def load_default_options=(_arg0); end # :call-seq: @@ -1291,7 +1296,7 @@ module JSON # # See method #parse. # - # source://json//json/common.rb#248 + # source://json//lib/json/common.rb#257 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1302,7 +1307,7 @@ module JSON # # See method #parse! # - # source://json//json/common.rb#259 + # source://json//lib/json/common.rb#268 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1353,7 +1358,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//json/common.rb#218 + # source://json//lib/json/common.rb#218 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1368,19 +1373,19 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//json/common.rb#233 + # source://json//lib/json/common.rb#242 def parse!(source, opts = T.unsafe(nil)); end # Returns the JSON parser class that is used by JSON. This is either # JSON::Ext::Parser or JSON::Pure::Parser: # JSON.parser # => JSON::Ext::Parser # - # source://json//json/common.rb#32 + # source://json//lib/json/common.rb#38 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//json/common.rb#35 + # source://json//lib/json/common.rb#41 def parser=(parser); end # :call-seq: @@ -1413,119 +1418,190 @@ module JSON # } # } # - # source://json//json/common.rb#373 + # source://json//lib/json/common.rb#382 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//json/common.rb#373 + # source://json//lib/json/common.rb#382 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//json/common.rb#558 + # source://json//lib/json/common.rb#575 def recurse_proc(result, &proc); end - # source://json//json/common.rb#540 + # source://json//lib/json/common.rb#549 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or Returns the JSON generator state class that is used by JSON. This is # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: # JSON.state # => JSON::Ext::Generator::State # - # source://json//json/common.rb#111 + # source://json//lib/json/common.rb#117 def state; end # Sets or Returns the JSON generator state class that is used by JSON. This is # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: # JSON.state # => JSON::Ext::Generator::State # - # source://json//json/common.rb#111 + # source://json//lib/json/common.rb#117 def state=(_arg0); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//json/common.rb#299 + # source://json//lib/json/common.rb#308 def unparse(obj, opts = T.unsafe(nil)); end private - # source://json//json/common.rb#642 + # source://json//lib/json/common.rb#674 def merge_dump_options(opts, strict: T.unsafe(nil)); end end end -# source://json//json/common.rb#117 -JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) +# source://json//lib/json/ext/generator/state.rb#6 +class JSON::Ext::Generator::State + # call-seq: new(opts = {}) + # + # Instantiates a new State object, configured by _opts_. + # + # _opts_ can have the following keys: + # + # * *indent*: a string used to indent levels (default: ''), + # * *space*: a string that is put after, a : or , delimiter (default: ''), + # * *space_before*: a string that is put before a : pair delimiter (default: ''), + # * *object_nl*: a string that is put at the end of a JSON object (default: ''), + # * *array_nl*: a string that is put at the end of a JSON array (default: ''), + # * *allow_nan*: true if NaN, Infinity, and -Infinity should be + # generated, otherwise an exception is thrown, if these values are + # encountered. This options defaults to false. + # * *ascii_only*: true if only ASCII characters should be generated. This + # option defaults to false. + # * *buffer_initial_length*: sets the initial length of the generator's + # internal buffer. + # + # @return [State] a new instance of State + # + # source://json//lib/json/ext/generator/state.rb#25 + def initialize(opts = T.unsafe(nil)); end + + # call-seq: [](name) + # + # Returns the value returned by method +name+. + # + # source://json//lib/json/ext/generator/state.rb#113 + def [](name); end + + # call-seq: []=(name, value) + # + # Sets the attribute name to value. + # + # source://json//lib/json/ext/generator/state.rb#125 + def []=(name, value); end + + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + # + # source://json//lib/json/ext/generator/state.rb#35 + def configure(opts); end + + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + # + # source://json//lib/json/ext/generator/state.rb#35 + def merge(opts); end + + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + # + # source://json//lib/json/ext/generator/state.rb#84 + def to_h; end -# source://json//json/common.rb#114 -JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + # + # source://json//lib/json/ext/generator/state.rb#84 + def to_hash; end +end +# source://json//lib/json/generic_object.rb#9 class JSON::GenericObject < ::OpenStruct - # source://json//json/generic_object.rb#63 + # source://json//lib/json/generic_object.rb#67 def as_json(*_arg0); end - # source://json//json/generic_object.rb#47 + # source://json//lib/json/generic_object.rb#51 def to_hash; end - # source://json//json/generic_object.rb#67 + # source://json//lib/json/generic_object.rb#71 def to_json(*a); end - # source://json//json/generic_object.rb#59 + # source://json//lib/json/generic_object.rb#63 def |(other); end class << self - # source://json//json/generic_object.rb#41 + # source://json//lib/json/generic_object.rb#45 def dump(obj, *args); end - # source://json//json/generic_object.rb#21 + # source://json//lib/json/generic_object.rb#25 def from_hash(object); end # Sets the attribute json_creatable # # @param value the value to set the attribute json_creatable to. # - # source://json//json/generic_object.rb#13 + # source://json//lib/json/generic_object.rb#17 def json_creatable=(_arg0); end # @return [Boolean] # - # source://json//json/generic_object.rb#9 + # source://json//lib/json/generic_object.rb#13 def json_creatable?; end - # source://json//json/generic_object.rb#15 + # source://json//lib/json/generic_object.rb#19 def json_create(data); end - # source://json//json/generic_object.rb#36 + # source://json//lib/json/generic_object.rb#40 def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end end end # The base exception for JSON errors. +# +# source://json//lib/json/common.rb#140 class JSON::JSONError < ::StandardError class << self - # source://json//json/common.rb#141 + # source://json//lib/json/common.rb#141 def wrap(exception); end end end -# source://json//json/common.rb#6 +# source://json//lib/json/common.rb#7 JSON::NOT_SET = T.let(T.unsafe(nil), Object) -# source://json//json/common.rb#38 +# source://json//lib/json/common.rb#44 JSON::Parser = JSON::Ext::Parser -# source://json//json/common.rb#76 +# source://json//lib/json/common.rb#82 JSON::State = JSON::Ext::Generator::State # For backwards compatibility # -# source://json//json/common.rb#162 +# source://json//lib/json/common.rb#162 JSON::UnparserError = JSON::GeneratorError +# source://json//lib/json/common.rb#684 module Kernel private @@ -1536,18 +1612,18 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # source://json//json/common.rb#679 + # source://json//lib/json/common.rb#711 def JSON(object, *args); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # source://json//json/common.rb#657 + # source://json//lib/json/common.rb#689 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # source://json//json/common.rb#666 + # source://json//lib/json/common.rb#698 def jj(*objs); end end diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi index f6b1d8e..a0375c0 100644 --- a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `language_server-protocol` gem. # Please instead update this file by running `bin/tapioca gem language_server-protocol`. + # source://language_server-protocol//lib/language_server/protocol/version.rb#1 module LanguageServer; end diff --git a/sorbet/rbi/gems/lint_roller@1.1.0.rbi b/sorbet/rbi/gems/lint_roller@1.1.0.rbi index 5362605..0e21c6f 100644 --- a/sorbet/rbi/gems/lint_roller@1.1.0.rbi +++ b/sorbet/rbi/gems/lint_roller@1.1.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `lint_roller` gem. # Please instead update this file by running `bin/tapioca gem lint_roller`. + # source://lint_roller//lib/lint_roller/version.rb#1 module LintRoller; end diff --git a/sorbet/rbi/gems/minitest@5.22.2.rbi b/sorbet/rbi/gems/minitest@5.25.1.rbi similarity index 83% rename from sorbet/rbi/gems/minitest@5.22.2.rbi rename to sorbet/rbi/gems/minitest@5.25.1.rbi index aebdf5d..0e0dfc0 100644 --- a/sorbet/rbi/gems/minitest@5.22.2.rbi +++ b/sorbet/rbi/gems/minitest@5.25.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `minitest` gem. # Please instead update this file by running `bin/tapioca gem minitest`. + # Kernel extensions for minitest # # source://minitest//lib/minitest/spec.rb#46 @@ -56,7 +57,7 @@ module Minitest # Internal run method. Responsible for telling all Runnable # sub-classes to run. # - # source://minitest//lib/minitest.rb#197 + # source://minitest//lib/minitest.rb#322 def __run(reporter, options); end # A simple hook allowing you to run a block of code after everything @@ -64,7 +65,7 @@ module Minitest # # Minitest.after_run { p $debugging_info } # - # source://minitest//lib/minitest.rb#97 + # source://minitest//lib/minitest.rb#96 def after_run(&block); end # source://minitest//lib/minitest.rb#19 @@ -87,10 +88,10 @@ module Minitest # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest//lib/minitest.rb#1146 + # source://minitest//lib/minitest.rb#1215 def clock_time; end - # source://minitest//lib/minitest.rb#177 + # source://minitest//lib/minitest.rb#302 def empty_run!(options); end # source://minitest//lib/minitest.rb#19 @@ -99,7 +100,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest//lib/minitest.rb#292 + # source://minitest//lib/minitest.rb#335 def filter_backtrace(bt); end # source://minitest//lib/minitest.rb#19 @@ -108,7 +109,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest//lib/minitest.rb#101 + # source://minitest//lib/minitest.rb#124 def init_plugins(options); end # source://minitest//lib/minitest.rb#108 @@ -120,9 +121,14 @@ module Minitest # source://minitest//lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest//lib/minitest.rb#210 + # source://minitest//lib/minitest.rb#142 def process_args(args = T.unsafe(nil)); end + # Register a plugin to be used. Does NOT require / load it. + # + # source://minitest//lib/minitest.rb#103 + def register_plugin(name_or_mod); end + # source://minitest//lib/minitest.rb#19 def reporter; end @@ -137,6 +143,9 @@ module Minitest # # Minitest.autorun # Minitest.run(args) + # Minitest.load_plugins + # Minitest.process_args + # Minitest.init_plugins # Minitest.__run(reporter, options) # Runnable.runnables.each # runnable_klass.run(reporter, options) @@ -145,10 +154,10 @@ module Minitest # Minitest.run_one_method(klass, runnable_method) # klass.new(runnable_method).run # - # source://minitest//lib/minitest.rb#143 + # source://minitest//lib/minitest.rb#268 def run(args = T.unsafe(nil)); end - # source://minitest//lib/minitest.rb#1137 + # source://minitest//lib/minitest.rb#1206 def run_one_method(klass, method_name); end # source://minitest//lib/minitest.rb#19 @@ -162,24 +171,24 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest//lib/minitest.rb#638 +# source://minitest//lib/minitest.rb#686 class Minitest::AbstractReporter # @return [AbstractReporter] a new instance of AbstractReporter # - # source://minitest//lib/minitest.rb#640 + # source://minitest//lib/minitest.rb#688 def initialize; end # Did this run pass? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#675 + # source://minitest//lib/minitest.rb#723 def passed?; end # About to start running a test. This allows a reporter to show # that it is starting or that we are in the middle of a test run. # - # source://minitest//lib/minitest.rb#654 + # source://minitest//lib/minitest.rb#702 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -187,43 +196,43 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest//lib/minitest.rb#663 + # source://minitest//lib/minitest.rb#711 def record(result); end # Outputs the summary of the run. # - # source://minitest//lib/minitest.rb#669 + # source://minitest//lib/minitest.rb#717 def report; end # Starts reporting on the run. # - # source://minitest//lib/minitest.rb#647 + # source://minitest//lib/minitest.rb#695 def start; end - # source://minitest//lib/minitest.rb#679 + # source://minitest//lib/minitest.rb#727 def synchronize(&block); end end # Represents run failures. # -# source://minitest//lib/minitest.rb#962 +# source://minitest//lib/minitest.rb#1019 class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#965 + # source://minitest//lib/minitest.rb#1022 def error; end # Where was this run before an assertion was raised? # - # source://minitest//lib/minitest.rb#972 + # source://minitest//lib/minitest.rb#1029 def location; end - # source://minitest//lib/minitest.rb#980 + # source://minitest//lib/minitest.rb#1037 def result_code; end - # source://minitest//lib/minitest.rb#984 + # source://minitest//lib/minitest.rb#1041 def result_label; end end -# source://minitest//lib/minitest.rb#963 +# source://minitest//lib/minitest.rb#1020 Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) # Minitest Assertions. All assertion methods accept a +msg+ which is @@ -235,22 +244,22 @@ Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) # provided by the thing including Assertions. See Minitest::Runnable # for an example. # -# source://minitest//lib/minitest/assertions.rb#18 +# source://minitest//lib/minitest/assertions.rb#16 module Minitest::Assertions - # source://minitest//lib/minitest/assertions.rb#188 + # source://minitest//lib/minitest/assertions.rb#181 def _synchronize; end - # source://minitest//lib/minitest/assertions.rb#201 + # source://minitest//lib/minitest/assertions.rb#194 def _where; end # Fails unless +test+ is truthy. # - # source://minitest//lib/minitest/assertions.rb#178 + # source://minitest//lib/minitest/assertions.rb#171 def assert(test, msg = T.unsafe(nil)); end # Fails unless +obj+ is empty. # - # source://minitest//lib/minitest/assertions.rb#195 + # source://minitest//lib/minitest/assertions.rb#188 def assert_empty(obj, msg = T.unsafe(nil)); end # Fails unless exp == act printing the difference between @@ -265,7 +274,7 @@ module Minitest::Assertions # # See also: Minitest::Assertions.diff # - # source://minitest//lib/minitest/assertions.rb#221 + # source://minitest//lib/minitest/assertions.rb#214 def assert_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ @@ -273,33 +282,33 @@ module Minitest::Assertions # # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 # - # source://minitest//lib/minitest/assertions.rb#242 + # source://minitest//lib/minitest/assertions.rb#235 def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ have a relative # error less than +epsilon+. # - # source://minitest//lib/minitest/assertions.rb#254 + # source://minitest//lib/minitest/assertions.rb#247 def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails unless +collection+ includes +obj+. # - # source://minitest//lib/minitest/assertions.rb#261 + # source://minitest//lib/minitest/assertions.rb#254 def assert_includes(collection, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#272 + # source://minitest//lib/minitest/assertions.rb#265 def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is a kind of +cls+. # - # source://minitest//lib/minitest/assertions.rb#283 + # source://minitest//lib/minitest/assertions.rb#276 def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#293 + # source://minitest//lib/minitest/assertions.rb#287 def assert_match(matcher, obj, msg = T.unsafe(nil)); end # Assert that the mock verifies correctly. @@ -309,14 +318,14 @@ module Minitest::Assertions # Fails unless +obj+ is nil # - # source://minitest//lib/minitest/assertions.rb#305 + # source://minitest//lib/minitest/assertions.rb#299 def assert_nil(obj, msg = T.unsafe(nil)); end # For testing with binary operators. Eg: # # assert_operator 5, :<=, 4 # - # source://minitest//lib/minitest/assertions.rb#315 + # source://minitest//lib/minitest/assertions.rb#309 def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if stdout or stderr do not output the expected results. @@ -330,12 +339,12 @@ module Minitest::Assertions # # See also: #assert_silent # - # source://minitest//lib/minitest/assertions.rb#333 + # source://minitest//lib/minitest/assertions.rb#327 def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end # Fails unless +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#357 + # source://minitest//lib/minitest/assertions.rb#351 def assert_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -353,7 +362,7 @@ module Minitest::Assertions # # @raise [NotImplementedError] # - # source://minitest//lib/minitest/assertions.rb#376 + # source://minitest//lib/minitest/assertions.rb#370 def assert_pattern; end # For testing with predicates. Eg: @@ -364,7 +373,7 @@ module Minitest::Assertions # # str.must_be :empty? # - # source://minitest//lib/minitest/assertions.rb#397 + # source://minitest//lib/minitest/assertions.rb#391 def assert_predicate(o1, op, msg = T.unsafe(nil)); end # Fails unless the block raises one of +exp+. Returns the @@ -388,37 +397,37 @@ module Minitest::Assertions # # assert_equal 'This is really bad', error.message # - # source://minitest//lib/minitest/assertions.rb#424 + # source://minitest//lib/minitest/assertions.rb#418 def assert_raises(*exp); end # Fails unless +obj+ responds to +meth+. # include_all defaults to false to match Object#respond_to? # - # source://minitest//lib/minitest/assertions.rb#456 + # source://minitest//lib/minitest/assertions.rb#450 def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails unless +exp+ and +act+ are #equal? # - # source://minitest//lib/minitest/assertions.rb#466 + # source://minitest//lib/minitest/assertions.rb#460 def assert_same(exp, act, msg = T.unsafe(nil)); end # +send_ary+ is a receiver, message and arguments. # # Fails unless the call returns a true value # - # source://minitest//lib/minitest/assertions.rb#479 + # source://minitest//lib/minitest/assertions.rb#473 def assert_send(send_ary, m = T.unsafe(nil)); end # Fails if the block outputs anything to stderr or stdout. # # See also: #assert_output # - # source://minitest//lib/minitest/assertions.rb#493 + # source://minitest//lib/minitest/assertions.rb#488 def assert_silent; end # Fails unless the block throws +sym+ # - # source://minitest//lib/minitest/assertions.rb#502 + # source://minitest//lib/minitest/assertions.rb#497 def assert_throws(sym, msg = T.unsafe(nil)); end # Captures $stdout and $stderr into strings: @@ -435,7 +444,7 @@ module Minitest::Assertions # capture IO for subprocesses. Use #capture_subprocess_io for # that. # - # source://minitest//lib/minitest/assertions.rb#543 + # source://minitest//lib/minitest/assertions.rb#538 def capture_io; end # Captures $stdout and $stderr into strings, using Tempfile to @@ -452,7 +461,7 @@ module Minitest::Assertions # NOTE: This method is approximately 10x slower than #capture_io so # only use it when you need to test the output of a subprocess. # - # source://minitest//lib/minitest/assertions.rb#576 + # source://minitest//lib/minitest/assertions.rb#571 def capture_subprocess_io; end # Returns a diff between +exp+ and +act+. If there is no known @@ -462,29 +471,29 @@ module Minitest::Assertions # # See +things_to_diff+ for more info. # - # source://minitest//lib/minitest/assertions.rb#59 + # source://minitest//lib/minitest/assertions.rb#57 def diff(exp, act); end # Returns details for exception +e+ # - # source://minitest//lib/minitest/assertions.rb#608 + # source://minitest//lib/minitest/assertions.rb#603 def exception_details(e, msg); end # Fails after a given date (in the local time zone). This allows # you to put time-bombs in your tests if you need to keep # something around until a later date lest you forget about it. # - # source://minitest//lib/minitest/assertions.rb#624 + # source://minitest//lib/minitest/assertions.rb#619 def fail_after(y, m, d, msg); end # Fails with +msg+. # - # source://minitest//lib/minitest/assertions.rb#631 + # source://minitest//lib/minitest/assertions.rb#626 def flunk(msg = T.unsafe(nil)); end # Returns a proc that will output +msg+ along with the default message. # - # source://minitest//lib/minitest/assertions.rb#639 + # source://minitest//lib/minitest/assertions.rb#634 def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end # This returns a human-readable version of +obj+. By default @@ -493,7 +502,7 @@ module Minitest::Assertions # # See Minitest::Test.make_my_diffs_pretty! # - # source://minitest//lib/minitest/assertions.rb#129 + # source://minitest//lib/minitest/assertions.rb#127 def mu_pp(obj); end # This returns a diff-able more human-readable version of +obj+. @@ -501,67 +510,67 @@ module Minitest::Assertions # newlines and makes hex-values (like object_ids) generic. This # uses mu_pp to do the first pass and then cleans it up. # - # source://minitest//lib/minitest/assertions.rb#152 + # source://minitest//lib/minitest/assertions.rb#145 def mu_pp_for_diff(obj); end # used for counting assertions # - # source://minitest//lib/minitest/assertions.rb#650 + # source://minitest//lib/minitest/assertions.rb#645 def pass(_msg = T.unsafe(nil)); end # Fails if +test+ is truthy. # - # source://minitest//lib/minitest/assertions.rb#657 + # source://minitest//lib/minitest/assertions.rb#652 def refute(test, msg = T.unsafe(nil)); end # Fails if +obj+ is empty. # - # source://minitest//lib/minitest/assertions.rb#665 + # source://minitest//lib/minitest/assertions.rb#660 def refute_empty(obj, msg = T.unsafe(nil)); end # Fails if exp == act. # # For floats use refute_in_delta. # - # source://minitest//lib/minitest/assertions.rb#676 + # source://minitest//lib/minitest/assertions.rb#671 def refute_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. # # refute_in_delta Math::PI, (22.0 / 7.0) # - # source://minitest//lib/minitest/assertions.rb#688 + # source://minitest//lib/minitest/assertions.rb#683 def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ and +act+ have a relative error # less than +epsilon+. # - # source://minitest//lib/minitest/assertions.rb#700 + # source://minitest//lib/minitest/assertions.rb#695 def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +collection+ includes +obj+. # - # source://minitest//lib/minitest/assertions.rb#707 + # source://minitest//lib/minitest/assertions.rb#702 def refute_includes(collection, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#718 + # source://minitest//lib/minitest/assertions.rb#713 def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is a kind of +cls+. # - # source://minitest//lib/minitest/assertions.rb#728 + # source://minitest//lib/minitest/assertions.rb#723 def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#736 + # source://minitest//lib/minitest/assertions.rb#731 def refute_match(matcher, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is nil. # - # source://minitest//lib/minitest/assertions.rb#746 + # source://minitest//lib/minitest/assertions.rb#741 def refute_nil(obj, msg = T.unsafe(nil)); end # Fails if +o1+ is not +op+ +o2+. Eg: @@ -569,12 +578,12 @@ module Minitest::Assertions # refute_operator 1, :>, 2 #=> pass # refute_operator 1, :<, 2 #=> fail # - # source://minitest//lib/minitest/assertions.rb#781 + # source://minitest//lib/minitest/assertions.rb#776 def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#790 + # source://minitest//lib/minitest/assertions.rb#785 def refute_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -590,7 +599,7 @@ module Minitest::Assertions # # @raise [NotImplementedError] # - # source://minitest//lib/minitest/assertions.rb#763 + # source://minitest//lib/minitest/assertions.rb#758 def refute_pattern; end # For testing with predicates. @@ -601,18 +610,18 @@ module Minitest::Assertions # # str.wont_be :empty? # - # source://minitest//lib/minitest/assertions.rb#804 + # source://minitest//lib/minitest/assertions.rb#799 def refute_predicate(o1, op, msg = T.unsafe(nil)); end # Fails if +obj+ responds to the message +meth+. # include_all defaults to false to match Object#respond_to? # - # source://minitest//lib/minitest/assertions.rb#813 + # source://minitest//lib/minitest/assertions.rb#808 def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails if +exp+ is the same (by object identity) as +act+. # - # source://minitest//lib/minitest/assertions.rb#822 + # source://minitest//lib/minitest/assertions.rb#817 def refute_same(exp, act, msg = T.unsafe(nil)); end # Skips the current run. If run in verbose-mode, the skipped run @@ -621,7 +630,7 @@ module Minitest::Assertions # # @raise [Minitest::Skip] # - # source://minitest//lib/minitest/assertions.rb#835 + # source://minitest//lib/minitest/assertions.rb#830 def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end # Skips the current run until a given date (in the local time @@ -629,14 +638,14 @@ module Minitest::Assertions # date, but still holds you accountable and prevents you from # forgetting it. # - # source://minitest//lib/minitest/assertions.rb#847 + # source://minitest//lib/minitest/assertions.rb#842 def skip_until(y, m, d, msg); end # Was this testcase skipped? Meant for #teardown. # # @return [Boolean] # - # source://minitest//lib/minitest/assertions.rb#856 + # source://minitest//lib/minitest/assertions.rb#851 def skipped?; end # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. @@ -648,104 +657,102 @@ module Minitest::Assertions # 3. or: Strings are equal to each other (but maybe different encodings?). # 4. and: we found a diff executable. # - # source://minitest//lib/minitest/assertions.rb#104 + # source://minitest//lib/minitest/assertions.rb#102 def things_to_diff(exp, act); end class << self # Returns the diff command to use in #diff. Tries to intelligently # figure out what diff to use. # - # source://minitest//lib/minitest/assertions.rb#29 + # source://minitest//lib/minitest/assertions.rb#27 def diff; end # Set the diff command to use in #diff. # - # source://minitest//lib/minitest/assertions.rb#47 + # source://minitest//lib/minitest/assertions.rb#45 def diff=(o); end end end -# source://minitest//lib/minitest/assertions.rb#206 +# source://minitest//lib/minitest/assertions.rb#199 Minitest::Assertions::E = T.let(T.unsafe(nil), String) -# source://minitest//lib/minitest/assertions.rb#19 +# source://minitest//lib/minitest/assertions.rb#17 Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # The standard backtrace filter for minitest. # # See Minitest.backtrace_filter=. # -# source://minitest//lib/minitest.rb#1108 +# source://minitest//lib/minitest.rb#1174 class Minitest::BacktraceFilter # @return [BacktraceFilter] a new instance of BacktraceFilter # - # source://minitest//lib/minitest.rb#1114 + # source://minitest//lib/minitest.rb#1183 def initialize(regexp = T.unsafe(nil)); end # Filter +bt+ to something useful. Returns the whole thing if # $DEBUG (ruby) or $MT_DEBUG (env). # - # source://minitest//lib/minitest.rb#1122 + # source://minitest//lib/minitest.rb#1191 def filter(bt); end - # Returns the value of attribute regexp. + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. # - # source://minitest//lib/minitest.rb#1112 + # source://minitest//lib/minitest.rb#1181 def regexp; end - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. # - # source://minitest//lib/minitest.rb#1112 + # source://minitest//lib/minitest.rb#1181 def regexp=(_arg0); end end -# source://minitest//lib/minitest.rb#1110 +# source://minitest//lib/minitest.rb#1176 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest//lib/minitest.rb#911 +# source://minitest//lib/minitest.rb#968 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest//lib/minitest.rb#917 + # source://minitest//lib/minitest.rb#974 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest//lib/minitest.rb#929 + # source://minitest//lib/minitest.rb#986 def <<(reporter); end - # source://minitest//lib/minitest.rb#922 + # source://minitest//lib/minitest.rb#979 def io; end # @return [Boolean] # - # source://minitest//lib/minitest.rb#933 + # source://minitest//lib/minitest.rb#990 def passed?; end - # source://minitest//lib/minitest.rb#941 + # source://minitest//lib/minitest.rb#998 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#948 + # source://minitest//lib/minitest.rb#1005 def record(result); end - # source://minitest//lib/minitest.rb#954 + # source://minitest//lib/minitest.rb#1011 def report; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#915 + # source://minitest//lib/minitest.rb#972 def reporters; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#915 + # source://minitest//lib/minitest.rb#972 def reporters=(_arg0); end - # source://minitest//lib/minitest.rb#937 + # source://minitest//lib/minitest.rb#994 def start; end end @@ -1016,48 +1023,48 @@ end # # ... lots of test methods ... # end # -# source://minitest//lib/minitest.rb#1052 +# source://minitest//lib/minitest.rb#1118 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1057 + # source://minitest//lib/minitest.rb#1123 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1064 + # source://minitest//lib/minitest.rb#1130 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1074 + # source://minitest//lib/minitest.rb#1140 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1081 + # source://minitest//lib/minitest.rb#1147 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1088 + # source://minitest//lib/minitest.rb#1154 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1098 + # source://minitest//lib/minitest.rb#1164 def windows?(platform = T.unsafe(nil)); end end @@ -1220,36 +1227,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#710 +# source://minitest//lib/minitest.rb#758 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#711 + # source://minitest//lib/minitest.rb#759 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#718 + # source://minitest//lib/minitest.rb#766 def record(result); end end # Shared code for anything that can get passed to a Reporter. See # Minitest::Test & Minitest::Result. # -# source://minitest//lib/minitest.rb#532 +# source://minitest//lib/minitest.rb#580 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#554 + # source://minitest//lib/minitest.rb#602 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#575 + # source://minitest//lib/minitest.rb#623 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest//lib/minitest.rb#549 + # source://minitest//lib/minitest.rb#597 def location; end # Did this run pass? @@ -1259,50 +1266,50 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest//lib/minitest.rb#539 + # source://minitest//lib/minitest.rb#587 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest//lib/minitest.rb#561 + # source://minitest//lib/minitest.rb#609 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#568 + # source://minitest//lib/minitest.rb#616 def skipped?; end end -# source://minitest//lib/minitest.rb#543 +# source://minitest//lib/minitest.rb#591 Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) -# source://minitest//lib/minitest.rb#686 +# source://minitest//lib/minitest.rb#734 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest//lib/minitest.rb#695 + # source://minitest//lib/minitest.rb#743 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#736 def io; end # The IO used to report. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#736 def io=(_arg0); end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#741 def options; end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#741 def options=(_arg0); end end @@ -1312,80 +1319,80 @@ end # blow up. By using Result.from(a_test) you can be reasonably sure # that the test result can be marshalled. # -# source://minitest//lib/minitest.rb#587 +# source://minitest//lib/minitest.rb#635 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest//lib/minitest.rb#621 + # source://minitest//lib/minitest.rb#669 def class_name; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#596 + # source://minitest//lib/minitest.rb#644 def klass; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#596 + # source://minitest//lib/minitest.rb#644 def klass=(_arg0); end # The location of the test method. # - # source://minitest//lib/minitest.rb#601 + # source://minitest//lib/minitest.rb#649 def source_location; end # The location of the test method. # - # source://minitest//lib/minitest.rb#601 + # source://minitest//lib/minitest.rb#649 def source_location=(_arg0); end - # source://minitest//lib/minitest.rb#625 + # source://minitest//lib/minitest.rb#673 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest//lib/minitest.rb#606 + # source://minitest//lib/minitest.rb#654 def from(runnable); end end end # re-open # -# source://minitest//lib/minitest.rb#305 +# source://minitest//lib/minitest.rb#348 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest//lib/minitest.rb#463 + # source://minitest//lib/minitest.rb#511 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#309 + # source://minitest//lib/minitest.rb#352 def assertions; end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#309 + # source://minitest//lib/minitest.rb#352 def assertions=(_arg0); end - # source://minitest//lib/minitest.rb#459 + # source://minitest//lib/minitest.rb#507 def failure; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#314 + # source://minitest//lib/minitest.rb#357 def failures; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#314 + # source://minitest//lib/minitest.rb#357 def failures=(_arg0); end - # source://minitest//lib/minitest.rb#445 + # source://minitest//lib/minitest.rb#493 def marshal_dump; end - # source://minitest//lib/minitest.rb#455 + # source://minitest//lib/minitest.rb#503 def marshal_load(ary); end # Metadata you attach to the test results that get sent to the reporter. @@ -1395,29 +1402,29 @@ class Minitest::Runnable # NOTE: this data *must* be plain (read: marshal-able) data! # Hashes! Arrays! Strings! # - # source://minitest//lib/minitest.rb#478 + # source://minitest//lib/minitest.rb#526 def metadata; end # Sets metadata, mainly used for +Result.from+. # - # source://minitest//lib/minitest.rb#485 + # source://minitest//lib/minitest.rb#533 def metadata=(_arg0); end # Returns true if metadata exists. # # @return [Boolean] # - # source://minitest//lib/minitest.rb#490 + # source://minitest//lib/minitest.rb#538 def metadata?; end # Name of the run. # - # source://minitest//lib/minitest.rb#332 + # source://minitest//lib/minitest.rb#375 def name; end # Set the name of the run. # - # source://minitest//lib/minitest.rb#339 + # source://minitest//lib/minitest.rb#382 def name=(o); end # Did this run pass? @@ -1428,7 +1435,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#507 + # source://minitest//lib/minitest.rb#555 def passed?; end # Returns a single character string to print based on the result @@ -1437,14 +1444,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#516 + # source://minitest//lib/minitest.rb#564 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#497 + # source://minitest//lib/minitest.rb#545 def run; end # Was this run skipped? See #passed? for more information. @@ -1452,42 +1459,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#523 + # source://minitest//lib/minitest.rb#571 def skipped?; end # The time it took to run. # - # source://minitest//lib/minitest.rb#319 + # source://minitest//lib/minitest.rb#362 def time; end # The time it took to run. # - # source://minitest//lib/minitest.rb#319 + # source://minitest//lib/minitest.rb#362 def time=(_arg0); end - # source://minitest//lib/minitest.rb#321 + # source://minitest//lib/minitest.rb#364 def time_it; end class << self - # source://minitest//lib/minitest.rb#1156 + # source://minitest//lib/minitest.rb#1225 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest//lib/minitest.rb#346 + # source://minitest//lib/minitest.rb#389 def methods_matching(re); end - # source://minitest//lib/minitest.rb#415 + # source://minitest//lib/minitest.rb#463 def on_signal(name, action); end - # source://minitest//lib/minitest.rb#350 + # source://minitest//lib/minitest.rb#393 def reset; end # Responsible for running all runnable methods in a given class, # each in its own instance. Each instance is passed to the # reporter to record. # - # source://minitest//lib/minitest.rb#361 + # source://minitest//lib/minitest.rb#404 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1495,7 +1502,7 @@ class Minitest::Runnable # that subclasses can specialize the running of an individual # test. See Minitest::ParallelTest::ClassMethods for an example. # - # source://minitest//lib/minitest.rb#387 + # source://minitest//lib/minitest.rb#444 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1503,33 +1510,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#432 + # source://minitest//lib/minitest.rb#480 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest//lib/minitest.rb#439 + # source://minitest//lib/minitest.rb#487 def runnables; end # Defines the order to run tests (:random by default). Override # this or use a convenience method to change it for your tests. # - # source://minitest//lib/minitest.rb#396 + # source://minitest//lib/minitest.rb#453 def test_order; end - # source://minitest//lib/minitest.rb#400 + # source://minitest//lib/minitest.rb#457 def with_info_handler(reporter, &block); end end end -# source://minitest//lib/minitest.rb#413 +# source://minitest//lib/minitest.rb#461 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest//lib/minitest.rb#992 +# source://minitest//lib/minitest.rb#1049 class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#993 + # source://minitest//lib/minitest.rb#1050 def result_label; end end @@ -1786,114 +1793,124 @@ Minitest::Spec::TYPES = T.let(T.unsafe(nil), Array) # end # end # -# source://minitest//lib/minitest.rb#746 +# source://minitest//lib/minitest.rb#794 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest//lib/minitest.rb#790 + # source://minitest//lib/minitest.rb#843 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest//lib/minitest.rb#750 + # source://minitest//lib/minitest.rb#798 def assertions; end # Total number of assertions. # - # source://minitest//lib/minitest.rb#750 + # source://minitest//lib/minitest.rb#798 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest//lib/minitest.rb#755 + # source://minitest//lib/minitest.rb#803 def count; end # Total number of test cases. # - # source://minitest//lib/minitest.rb#755 + # source://minitest//lib/minitest.rb#803 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#783 + # source://minitest//lib/minitest.rb#831 def errors; end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#783 + # source://minitest//lib/minitest.rb#831 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#778 + # source://minitest//lib/minitest.rb#826 def failures; end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#778 + # source://minitest//lib/minitest.rb#826 def failures=(_arg0); end # @return [Boolean] # - # source://minitest//lib/minitest.rb#803 + # source://minitest//lib/minitest.rb#857 def passed?; end - # source://minitest//lib/minitest.rb#811 + # source://minitest//lib/minitest.rb#865 def record(result); end # Report on the tracked statistics. # - # source://minitest//lib/minitest.rb#821 + # source://minitest//lib/minitest.rb#875 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#760 + # source://minitest//lib/minitest.rb#808 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#760 + # source://minitest//lib/minitest.rb#808 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#788 + # source://minitest//lib/minitest.rb#841 def skips; end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#788 + # source://minitest//lib/minitest.rb#841 def skips=(_arg0); end - # source://minitest//lib/minitest.rb#807 + # source://minitest//lib/minitest.rb#861 def start; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#767 + # source://minitest//lib/minitest.rb#815 def start_time; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#767 + # source://minitest//lib/minitest.rb#815 def start_time=(_arg0); end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#773 + # source://minitest//lib/minitest.rb#821 def total_time; end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#773 + # source://minitest//lib/minitest.rb#821 def total_time=(_arg0); end + + # Total number of tests that warned. + # + # source://minitest//lib/minitest.rb#836 + def warnings; end + + # Total number of tests that warned. + # + # source://minitest//lib/minitest.rb#836 + def warnings=(_arg0); end end # A reporter that prints the header, summary, and failure details at @@ -1904,48 +1921,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#841 +# source://minitest//lib/minitest.rb#896 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest//lib/minitest.rb#876 + # source://minitest//lib/minitest.rb#929 def aggregated_results(io); end - # Returns the value of attribute old_sync. - # - # source://minitest//lib/minitest.rb#844 + # source://minitest//lib/minitest.rb#898 def old_sync; end - # Sets the attribute old_sync - # - # @param value the value to set the attribute old_sync to. - # - # source://minitest//lib/minitest.rb#844 + # source://minitest//lib/minitest.rb#898 def old_sync=(_arg0); end - # source://minitest//lib/minitest.rb#859 + # source://minitest//lib/minitest.rb#912 def report; end - # :startdoc: - # - # source://minitest//lib/minitest.rb#847 + # source://minitest//lib/minitest.rb#900 def start; end - # source://minitest//lib/minitest.rb#871 + # source://minitest//lib/minitest.rb#924 def statistics; end - # source://minitest//lib/minitest.rb#896 + # source://minitest//lib/minitest.rb#949 def summary; end - # :stopdoc: - # - # source://minitest//lib/minitest.rb#843 + # source://minitest//lib/minitest.rb#897 def sync; end - # :stopdoc: - # - # source://minitest//lib/minitest.rb#843 + # source://minitest//lib/minitest.rb#897 def sync=(_arg0); end - # source://minitest//lib/minitest.rb#892 + # source://minitest//lib/minitest.rb#945 def to_s; end end @@ -1964,29 +1969,26 @@ class Minitest::Test < ::Minitest::Runnable # LifecycleHooks # - # source://minitest//lib/minitest/test.rb#190 + # source://minitest//lib/minitest/test.rb#189 def capture_exceptions; end # source://minitest//lib/minitest/test.rb#15 def class_name; end - # source://minitest//lib/minitest/test.rb#207 + # source://minitest//lib/minitest/test.rb#206 def neuter_exception(e); end - # source://minitest//lib/minitest/test.rb#218 + # source://minitest//lib/minitest/test.rb#217 def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end # Runs a single test with setup/teardown hooks. # - # source://minitest//lib/minitest/test.rb#86 + # source://minitest//lib/minitest/test.rb#87 def run; end - # source://minitest//lib/minitest/test.rb#200 + # source://minitest//lib/minitest/test.rb#199 def sanitize_exception(e); end - # source://minitest//lib/minitest/test.rb#232 - def with_info_handler(&block); end - class << self # Call this at the top of your tests when you absolutely # positively need to have ordered tests. In doing so, you're @@ -2015,18 +2017,19 @@ class Minitest::Test < ::Minitest::Runnable # source://minitest//lib/minitest/test.rb#48 def make_my_diffs_pretty!; end - # Call this at the top of your tests when you want to run your - # tests in parallel. In doing so, you're admitting that you rule - # and your tests are awesome. + # Call this at the top of your tests (inside the +Minitest::Test+ + # subclass or +describe+ block) when you want to run your tests in + # parallel. In doing so, you're admitting that you rule and your + # tests are awesome. # - # source://minitest//lib/minitest/test.rb#59 + # source://minitest//lib/minitest/test.rb#60 def parallelize_me!; end # Returns all instance methods starting with "test_". Based on # #test_order, the methods are either sorted, randomized # (default), or run in parallel. # - # source://minitest//lib/minitest/test.rb#69 + # source://minitest//lib/minitest/test.rb#70 def runnable_methods; end end end @@ -2035,7 +2038,7 @@ end # meant for library writers, NOT for regular test authors. See # #before_setup for an example. # -# source://minitest//lib/minitest/test.rb#113 +# source://minitest//lib/minitest/test.rb#112 module Minitest::Test::LifecycleHooks # Runs before every test, after setup. This hook is meant for # libraries to extend minitest. It is not meant to be used by @@ -2043,7 +2046,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#163 + # source://minitest//lib/minitest/test.rb#162 def after_setup; end # Runs after every test, after teardown. This hook is meant for @@ -2052,7 +2055,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#187 + # source://minitest//lib/minitest/test.rb#186 def after_teardown; end # Runs before every test, before setup. This hook is meant for @@ -2087,7 +2090,7 @@ module Minitest::Test::LifecycleHooks # include MyMinitestPlugin # end # - # source://minitest//lib/minitest/test.rb#148 + # source://minitest//lib/minitest/test.rb#147 def before_setup; end # Runs after every test, before teardown. This hook is meant for @@ -2096,19 +2099,19 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#172 + # source://minitest//lib/minitest/test.rb#171 def before_teardown; end # Runs before every test. Use this to set up before each test # run. # - # source://minitest//lib/minitest/test.rb#154 + # source://minitest//lib/minitest/test.rb#153 def setup; end # Runs after every test. Use this to clean up after each test # run. # - # source://minitest//lib/minitest/test.rb#178 + # source://minitest//lib/minitest/test.rb#177 def teardown; end end @@ -2123,38 +2126,46 @@ Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) # Assertion wrapping an unexpected error that was raised during a run. # -# source://minitest//lib/minitest.rb#1001 +# source://minitest//lib/minitest.rb#1058 class Minitest::UnexpectedError < ::Minitest::Assertion include ::Minitest::Compress # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest//lib/minitest.rb#1007 + # source://minitest//lib/minitest.rb#1064 def initialize(error); end - # source://minitest//lib/minitest.rb#1020 + # source://minitest//lib/minitest.rb#1077 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#1005 + # source://minitest//lib/minitest.rb#1062 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#1005 + # source://minitest//lib/minitest.rb#1062 def error=(_arg0); end - # source://minitest//lib/minitest.rb#1026 + # source://minitest//lib/minitest.rb#1083 def message; end - # source://minitest//lib/minitest.rb#1032 + # source://minitest//lib/minitest.rb#1089 def result_label; end end -# source://minitest//lib/minitest.rb#1024 +# source://minitest//lib/minitest.rb#1081 Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp) +# Assertion raised on warning when running in -Werror mode. +# +# source://minitest//lib/minitest.rb#1097 +class Minitest::UnexpectedWarning < ::Minitest::Assertion + # source://minitest//lib/minitest.rb#1098 + def result_label; end +end + # source://minitest//lib/minitest.rb#12 Minitest::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/netrc@0.11.0.rbi b/sorbet/rbi/gems/netrc@0.11.0.rbi index 062a557..4ae989b 100644 --- a/sorbet/rbi/gems/netrc@0.11.0.rbi +++ b/sorbet/rbi/gems/netrc@0.11.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `netrc` gem. # Please instead update this file by running `bin/tapioca gem netrc`. + # source://netrc//lib/netrc.rb#3 class Netrc # @return [Netrc] a new instance of Netrc diff --git a/sorbet/rbi/gems/parallel@1.24.0.rbi b/sorbet/rbi/gems/parallel@1.26.3.rbi similarity index 84% rename from sorbet/rbi/gems/parallel@1.24.0.rbi rename to sorbet/rbi/gems/parallel@1.26.3.rbi index 5dd7375..854c487 100644 --- a/sorbet/rbi/gems/parallel@1.24.0.rbi +++ b/sorbet/rbi/gems/parallel@1.26.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `parallel` gem. # Please instead update this file by running `bin/tapioca gem parallel`. + # source://parallel//lib/parallel/version.rb#2 module Parallel class << self @@ -24,10 +25,10 @@ module Parallel def each_with_index(array, options = T.unsafe(nil), &block); end # source://parallel//lib/parallel.rb#307 - def filter_map(*args, &block); end + def filter_map(*_arg0, **_arg1, &_arg2); end # source://parallel//lib/parallel.rb#303 - def flat_map(*args, &block); end + def flat_map(*_arg0, **_arg1, &_arg2); end # source://parallel//lib/parallel.rb#228 def in_processes(options = T.unsafe(nil), &block); end @@ -46,70 +47,80 @@ module Parallel # source://parallel//lib/parallel.rb#312 def physical_processor_count; end - # Number of processors seen by the OS, used for process scheduling + # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, + # used for process scheduling # - # source://parallel//lib/parallel.rb#345 + # source://parallel//lib/parallel.rb#342 def processor_count; end - # source://parallel//lib/parallel.rb#350 + # source://parallel//lib/parallel.rb#346 def worker_number; end # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed # - # source://parallel//lib/parallel.rb#355 + # source://parallel//lib/parallel.rb#351 def worker_number=(worker_num); end private - # source://parallel//lib/parallel.rb#361 + # source://parallel//lib/parallel.rb#384 def add_progress_bar!(job_factory, options); end - # source://parallel//lib/parallel.rb#624 + # source://parallel//lib/parallel.rb#699 + def available_processor_count; end + + # source://parallel//lib/parallel.rb#647 def call_with_index(item, index, options, &block); end - # source://parallel//lib/parallel.rb#556 + # source://parallel//lib/parallel.rb#579 def create_workers(job_factory, options, &block); end # options is either a Integer or a Hash with :count # - # source://parallel//lib/parallel.rb#614 + # source://parallel//lib/parallel.rb#637 def extract_count_from_options(options); end - # source://parallel//lib/parallel.rb#642 + # source://parallel//lib/parallel.rb#665 def instrument_finish(item, index, result, options); end # yield results in the order of the input items # needs to use `options` to store state between executions # needs to use `done` index since a nil result would also be valid # - # source://parallel//lib/parallel.rb#651 + # source://parallel//lib/parallel.rb#674 def instrument_finish_in_order(item, index, result, options); end - # source://parallel//lib/parallel.rb#671 + # source://parallel//lib/parallel.rb#694 def instrument_start(item, index, options); end - # source://parallel//lib/parallel.rb#590 + # source://parallel//lib/parallel.rb#357 + def physical_processor_count_windows; end + + # source://parallel//lib/parallel.rb#613 def process_incoming_jobs(read, write, job_factory, options, &block); end - # source://parallel//lib/parallel.rb#544 + # source://parallel//lib/parallel.rb#567 def replace_worker(job_factory, workers, index, options, blk); end - # source://parallel//lib/parallel.rb#635 + # source://parallel//lib/parallel.rb#378 + def run(command); end + + # source://parallel//lib/parallel.rb#658 def with_instrumentation(item, index, options); end - # source://parallel//lib/parallel.rb#386 + # source://parallel//lib/parallel.rb#409 def work_direct(job_factory, options, &block); end - # source://parallel//lib/parallel.rb#496 + # source://parallel//lib/parallel.rb#519 def work_in_processes(job_factory, options, &blk); end - # source://parallel//lib/parallel.rb#430 + # source://parallel//lib/parallel.rb#453 def work_in_ractors(job_factory, options); end - # source://parallel//lib/parallel.rb#405 + # source://parallel//lib/parallel.rb#428 def work_in_threads(job_factory, options, &block); end - # source://parallel//lib/parallel.rb#564 + # source://parallel//lib/parallel.rb#587 def worker(job_factory, options, &block); end end end diff --git a/sorbet/rbi/gems/parser@3.3.0.5.rbi b/sorbet/rbi/gems/parser@3.3.5.1.rbi similarity index 93% rename from sorbet/rbi/gems/parser@3.3.0.5.rbi rename to sorbet/rbi/gems/parser@3.3.5.1.rbi index 0acdc76..e5a2bb4 100644 --- a/sorbet/rbi/gems/parser@3.3.0.5.rbi +++ b/sorbet/rbi/gems/parser@3.3.5.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `parser` gem. # Please instead update this file by running `bin/tapioca gem parser`. + # @api public # # source://parser//lib/parser.rb#19 @@ -52,603 +53,605 @@ end # @api public # # source://parser//lib/parser/ast/processor.rb#9 -class Parser::AST::Processor < ::AST::Processor +class Parser::AST::Processor + include ::AST::Processor::Mixin + # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_alias(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_and(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_and_asgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_arg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_arg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_args(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#103 + # source://parser//lib/parser/ast/processor.rb#105 def on_argument(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_array(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_array_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_array_pattern_with_tail(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_back_ref(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_begin(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_block(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_block_pass(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_blockarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_blockarg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_break(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_case(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_case_match(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#87 + # source://parser//lib/parser/ast/processor.rb#89 def on_casgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_class(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#79 + # source://parser//lib/parser/ast/processor.rb#81 def on_const(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_const_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#179 + # source://parser//lib/parser/ast/processor.rb#181 def on_csend(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_cvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_cvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#158 + # source://parser//lib/parser/ast/processor.rb#160 def on_def(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_defined?(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#167 + # source://parser//lib/parser/ast/processor.rb#169 def on_defs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_dstr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_dsym(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_eflipflop(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#286 + # source://parser//lib/parser/ast/processor.rb#288 def on_empty_else(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_ensure(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_erange(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_find_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_for(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_forward_arg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_forwarded_kwrestarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_forwarded_restarg(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_gvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_gvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_hash(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_hash_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_if(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_if_guard(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_iflipflop(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_in_match(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_in_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_index(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_indexasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_irange(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_ivar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_ivasgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwargs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwbegin(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwoptarg(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwrestarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwsplat(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_lambda(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_lvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_lvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_masgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_alt(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_as(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_current_line(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_pattern_p(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_rest(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_match_var(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_with_lvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_mlhs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_module(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_next(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_not(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_nth_ref(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#196 + # source://parser//lib/parser/ast/processor.rb#198 def on_numblock(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#68 + # source://parser//lib/parser/ast/processor.rb#70 def on_op_asgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_optarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_or(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_or_asgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_pair(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_pin(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_postexe(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_preexe(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#130 + # source://parser//lib/parser/ast/processor.rb#132 def on_procarg0(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_redo(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_regexp(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_resbody(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_rescue(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_restarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_restarg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_retry(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_return(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_sclass(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#179 + # source://parser//lib/parser/ast/processor.rb#181 def on_send(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_shadowarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_splat(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_super(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_undef(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_unless_guard(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_until(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_until_post(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#27 + # source://parser//lib/parser/ast/processor.rb#29 def on_var(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#43 + # source://parser//lib/parser/ast/processor.rb#45 def on_vasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_when(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_while(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_while_post(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_xstr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_yield(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#279 + # source://parser//lib/parser/ast/processor.rb#281 def process_argument_node(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def process_regular_node(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#271 + # source://parser//lib/parser/ast/processor.rb#273 def process_var_asgn_node(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#263 + # source://parser//lib/parser/ast/processor.rb#265 def process_variable_node(node); end end @@ -861,7 +864,7 @@ end # @api public # -# source://parser//lib/parser.rb#77 +# source://parser//lib/parser.rb#78 module Parser::Builders; end # source://parser//lib/parser/builders/default.rb#8 @@ -3329,7 +3332,7 @@ class Parser::Source::Buffer # @api public # @return [Buffer] a new instance of Buffer # - # source://parser//lib/parser/source/buffer.rb#105 + # source://parser//lib/parser/source/buffer.rb#110 def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end # Convert a character index into the source to a column number. @@ -3338,7 +3341,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [Integer] column # - # source://parser//lib/parser/source/buffer.rb#242 + # source://parser//lib/parser/source/buffer.rb#247 def column_for_position(position); end # Convert a character index into the source to a `[line, column]` tuple. @@ -3347,7 +3350,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [[Integer, Integer]] `[line, column]` # - # source://parser//lib/parser/source/buffer.rb#217 + # source://parser//lib/parser/source/buffer.rb#222 def decompose_position(position); end # First line of the buffer, 1 by default. @@ -3360,12 +3363,12 @@ class Parser::Source::Buffer # @api public # - # source://parser//lib/parser/source/buffer.rb#312 + # source://parser//lib/parser/source/buffer.rb#317 def freeze; end # @api public # - # source://parser//lib/parser/source/buffer.rb#318 + # source://parser//lib/parser/source/buffer.rb#323 def inspect; end # Number of last line in the buffer @@ -3373,7 +3376,7 @@ class Parser::Source::Buffer # @api public # @return [Integer] # - # source://parser//lib/parser/source/buffer.rb#307 + # source://parser//lib/parser/source/buffer.rb#312 def last_line; end # Convert a character index into the source to a line number. @@ -3382,7 +3385,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [Integer] line # - # source://parser//lib/parser/source/buffer.rb#231 + # source://parser//lib/parser/source/buffer.rb#236 def line_for_position(position); end # Extract line `lineno` as a new `Range`, taking `first_line` into account. @@ -3392,7 +3395,7 @@ class Parser::Source::Buffer # @raise [IndexError] if `lineno` is out of bounds # @return [Range] # - # source://parser//lib/parser/source/buffer.rb#284 + # source://parser//lib/parser/source/buffer.rb#289 def line_range(lineno); end # Buffer name. If the buffer was created from a file, the name corresponds @@ -3411,7 +3414,7 @@ class Parser::Source::Buffer # @raise [ArgumentError] if already populated # @return [String] # - # source://parser//lib/parser/source/buffer.rb#180 + # source://parser//lib/parser/source/buffer.rb#185 def raw_source=(input); end # Populate this buffer from correspondingly named file. @@ -3422,12 +3425,12 @@ class Parser::Source::Buffer # @raise [ArgumentError] if already populated # @return [Buffer] self # - # source://parser//lib/parser/source/buffer.rb#131 + # source://parser//lib/parser/source/buffer.rb#136 def read; end # @api public # - # source://parser//lib/parser/source/buffer.rb#194 + # source://parser//lib/parser/source/buffer.rb#199 def slice(start, length = T.unsafe(nil)); end # Source code contained in this buffer. @@ -3436,7 +3439,7 @@ class Parser::Source::Buffer # @raise [RuntimeError] if buffer is not populated yet # @return [String] source code # - # source://parser//lib/parser/source/buffer.rb#145 + # source://parser//lib/parser/source/buffer.rb#150 def source; end # Populate this buffer from a string with encoding autodetection. @@ -3448,7 +3451,7 @@ class Parser::Source::Buffer # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding # @return [String] # - # source://parser//lib/parser/source/buffer.rb#162 + # source://parser//lib/parser/source/buffer.rb#167 def source=(input); end # Extract line `lineno` from source, taking `first_line` into account. @@ -3458,7 +3461,7 @@ class Parser::Source::Buffer # @raise [IndexError] if `lineno` is out of bounds # @return [String] # - # source://parser//lib/parser/source/buffer.rb#273 + # source://parser//lib/parser/source/buffer.rb#278 def source_line(lineno); end # Return an `Array` of source code lines. @@ -3466,30 +3469,30 @@ class Parser::Source::Buffer # @api public # @return [Array] # - # source://parser//lib/parser/source/buffer.rb#252 + # source://parser//lib/parser/source/buffer.rb#257 def source_lines; end # @api public # @return [Range] A range covering the whole source # - # source://parser//lib/parser/source/buffer.rb#298 + # source://parser//lib/parser/source/buffer.rb#303 def source_range; end private # @api public # - # source://parser//lib/parser/source/buffer.rb#348 + # source://parser//lib/parser/source/buffer.rb#353 def bsearch(line_begins, position); end # @api public # - # source://parser//lib/parser/source/buffer.rb#325 + # source://parser//lib/parser/source/buffer.rb#330 def line_begins; end # @api public # - # source://parser//lib/parser/source/buffer.rb#339 + # source://parser//lib/parser/source/buffer.rb#344 def line_index_for_position(position); end class << self @@ -3498,9 +3501,10 @@ class Parser::Source::Buffer # # @api public # @param string [String] + # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized # @return [String, nil] encoding name, if recognized # - # source://parser//lib/parser/source/buffer.rb#51 + # source://parser//lib/parser/source/buffer.rb#52 def recognize_encoding(string); end # Recognize encoding of `input` and process it so it could be lexed. @@ -3518,7 +3522,7 @@ class Parser::Source::Buffer # @raise [EncodingError] # @return [String] # - # source://parser//lib/parser/source/buffer.rb#90 + # source://parser//lib/parser/source/buffer.rb#95 def reencode_string(input); end end end @@ -5124,80 +5128,80 @@ end # source://parser//lib/parser/source/tree_rewriter.rb#391 Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) -# source://parser//lib/parser/source/tree_rewriter/action.rb#13 +# source://parser//lib/parser/source/tree_rewriter/action.rb#14 class Parser::Source::TreeRewriter::Action - # source://parser//lib/parser/source/tree_rewriter/action.rb#16 + # source://parser//lib/parser/source/tree_rewriter/action.rb#17 def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#28 + # source://parser//lib/parser/source/tree_rewriter/action.rb#29 def combine(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#67 + # source://parser//lib/parser/source/tree_rewriter/action.rb#68 def contract; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#33 + # source://parser//lib/parser/source/tree_rewriter/action.rb#34 def empty?; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def insert_after; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def insert_before; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#57 + # source://parser//lib/parser/source/tree_rewriter/action.rb#58 def insertion?; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#80 + # source://parser//lib/parser/source/tree_rewriter/action.rb#81 def moved(source_buffer, offset); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#49 + # source://parser//lib/parser/source/tree_rewriter/action.rb#50 def nested_actions; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#40 + # source://parser//lib/parser/source/tree_rewriter/action.rb#41 def ordered_replacements; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def range; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def replacement; end protected - # source://parser//lib/parser/source/tree_rewriter/action.rb#158 + # source://parser//lib/parser/source/tree_rewriter/action.rb#159 def analyse_hierarchy(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#145 + # source://parser//lib/parser/source/tree_rewriter/action.rb#146 def bsearch_child_index(from = T.unsafe(nil)); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#224 + # source://parser//lib/parser/source/tree_rewriter/action.rb#225 def call_enforcer_for_merge(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#204 + # source://parser//lib/parser/source/tree_rewriter/action.rb#205 def check_fusible(action, *fusible); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#94 + # source://parser//lib/parser/source/tree_rewriter/action.rb#95 def children; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#129 + # source://parser//lib/parser/source/tree_rewriter/action.rb#130 def combine_children(more_children); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#102 + # source://parser//lib/parser/source/tree_rewriter/action.rb#103 def do_combine(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#135 + # source://parser//lib/parser/source/tree_rewriter/action.rb#136 def fuse_deletions(action, fusible, other_sibblings); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#215 + # source://parser//lib/parser/source/tree_rewriter/action.rb#216 def merge(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#110 + # source://parser//lib/parser/source/tree_rewriter/action.rb#111 def place_in_hierarchy(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#232 + # source://parser//lib/parser/source/tree_rewriter/action.rb#233 def swallow(children); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#96 + # source://parser//lib/parser/source/tree_rewriter/action.rb#97 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 end @@ -5215,90 +5219,122 @@ Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) class Parser::StaticEnvironment # @return [StaticEnvironment] a new instance of StaticEnvironment # - # source://parser//lib/parser/static_environment.rb#11 + # source://parser//lib/parser/static_environment.rb#17 def initialize; end - # source://parser//lib/parser/static_environment.rb#40 + # source://parser//lib/parser/static_environment.rb#55 def declare(name); end - # source://parser//lib/parser/static_environment.rb#58 + # Anonymous blockarg + # + # source://parser//lib/parser/static_environment.rb#77 def declare_anonymous_blockarg; end - # source://parser//lib/parser/static_environment.rb#82 + # Anonymous kwresarg + # + # source://parser//lib/parser/static_environment.rb#113 def declare_anonymous_kwrestarg; end - # source://parser//lib/parser/static_environment.rb#70 + # Anonymous restarg + # + # source://parser//lib/parser/static_environment.rb#95 def declare_anonymous_restarg; end - # source://parser//lib/parser/static_environment.rb#50 + # Forward args + # + # source://parser//lib/parser/static_environment.rb#67 def declare_forward_args; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#46 + # source://parser//lib/parser/static_environment.rb#61 def declared?(name); end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#62 + # source://parser//lib/parser/static_environment.rb#81 def declared_anonymous_blockarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#86 + # source://parser//lib/parser/static_environment.rb#85 + def declared_anonymous_blockarg_in_current_scpe?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#117 def declared_anonymous_kwrestarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#74 + # source://parser//lib/parser/static_environment.rb#121 + def declared_anonymous_kwrestarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#99 def declared_anonymous_restarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#54 + # source://parser//lib/parser/static_environment.rb#103 + def declared_anonymous_restarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#71 def declared_forward_args?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#94 + # source://parser//lib/parser/static_environment.rb#129 def empty?; end - # source://parser//lib/parser/static_environment.rb#27 + # source://parser//lib/parser/static_environment.rb#33 def extend_dynamic; end - # source://parser//lib/parser/static_environment.rb#20 + # source://parser//lib/parser/static_environment.rb#26 def extend_static; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#66 + # source://parser//lib/parser/static_environment.rb#89 def parent_has_anonymous_blockarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#90 + # source://parser//lib/parser/static_environment.rb#125 def parent_has_anonymous_kwrestarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#78 + # source://parser//lib/parser/static_environment.rb#107 def parent_has_anonymous_restarg?; end - # source://parser//lib/parser/static_environment.rb#15 + # source://parser//lib/parser/static_environment.rb#21 def reset; end - # source://parser//lib/parser/static_environment.rb#34 + # source://parser//lib/parser/static_environment.rb#49 def unextend; end end -# source://parser//lib/parser/static_environment.rb#7 -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) +# source://parser//lib/parser/static_environment.rb#15 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#14 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#12 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#11 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) # source://parser//lib/parser/static_environment.rb#9 -Parser::StaticEnvironment::ANONYMOUS_KWRESTARG = T.let(T.unsafe(nil), Symbol) +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) # source://parser//lib/parser/static_environment.rb#8 -Parser::StaticEnvironment::ANONYMOUS_RESTARG = T.let(T.unsafe(nil), Symbol) +Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) # source://parser//lib/parser/static_environment.rb#6 Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) @@ -5438,6 +5474,17 @@ class Parser::TreeRewriter < ::Parser::AST::Processor def wrap(range, before, after); end end +# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding +# comment is encountered that the currently running Ruby version doesn't +# recognize. It inherits from {ArgumentError} since that is the exception +# Ruby itself raises when trying to execute a file with an unknown encoding. +# As such, it is also not a {Parser::SyntaxError}. +# +# @api public +# +# source://parser//lib/parser/unknown_encoding_in_magic_comment_error.rb#13 +class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end + # source://parser//lib/parser/version.rb#4 Parser::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/prettier_print@1.2.1.rbi b/sorbet/rbi/gems/prettier_print@1.2.1.rbi deleted file mode 100644 index 4e88525..0000000 --- a/sorbet/rbi/gems/prettier_print@1.2.1.rbi +++ /dev/null @@ -1,951 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `prettier_print` gem. -# Please instead update this file by running `bin/tapioca gem prettier_print`. - -# This class implements a pretty printing algorithm. It finds line breaks and -# nice indentations for grouped structure. -# -# By default, the class assumes that primitive elements are strings and each -# byte in the strings is a single column in width. But it can be used for other -# situations by giving suitable arguments for some methods: -# -# * newline object and space generation block for PrettierPrint.new -# * optional width argument for PrettierPrint#text -# * PrettierPrint#breakable -# -# There are several candidate uses: -# * text formatting using proportional fonts -# * multibyte characters which has columns different to number of bytes -# * non-string formatting -# -# == Usage -# -# To use this module, you will need to generate a tree of print nodes that -# represent indentation and newline behavior before it gets sent to the printer. -# Each node has different semantics, depending on the desired output. -# -# The most basic node is a Text node. This represents plain text content that -# cannot be broken up even if it doesn't fit on one line. You would create one -# of those with the text method, as in: -# -# PrettierPrint.format { |q| q.text('my content') } -# -# No matter what the desired output width is, the output for the snippet above -# will always be the same. -# -# If you want to allow the printer to break up the content on the space -# character when there isn't enough width for the full string on the same line, -# you can use the Breakable and Group nodes. For example: -# -# PrettierPrint.format do |q| -# q.group do -# q.text("my") -# q.breakable -# q.text("content") -# end -# end -# -# Now, if everything fits on one line (depending on the maximum width specified) -# then it will be the same output as the first example. If, however, there is -# not enough room on the line, then you will get two lines of output, one for -# the first string and one for the second. -# -# There are other nodes for the print tree as well, described in the -# documentation below. They control alignment, indentation, conditional -# formatting, and more. -# -# == References -# Christian Lindig, Strictly Pretty, March 2000 -# https://lindig.github.io/papers/strictly-pretty-2000.pdf -# -# Philip Wadler, A prettier printer, March 1998 -# https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf -# -# source://prettier_print//lib/prettier_print.rb#62 -class PrettierPrint - # Creates a buffer for pretty printing. - # - # +output+ is an output target. If it is not specified, '' is assumed. It - # should have a << method which accepts the first argument +obj+ of - # PrettierPrint#text, the first argument +separator+ of PrettierPrint#breakable, - # the first argument +newline+ of PrettierPrint.new, and the result of a given - # block for PrettierPrint.new. - # - # +maxwidth+ specifies maximum line length. If it is not specified, 80 is - # assumed. However actual outputs may overflow +maxwidth+ if long - # non-breakable texts are provided. - # - # +newline+ is used for line breaks. "\n" is used if it is not specified. - # - # The block is used to generate spaces. ->(n) { ' ' * n } is used if it is not - # given. - # - # @return [PrettierPrint] a new instance of PrettierPrint - # - # source://prettier_print//lib/prettier_print.rb#441 - def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end - - # This inserts a BreakParent node into the print tree which forces the - # surrounding and all parent group nodes to break. - # - # source://prettier_print//lib/prettier_print.rb#814 - def break_parent; end - - # This says "you can break a line here if necessary", and a +width+\-column - # text +separator+ is inserted if a line is not broken at the point. - # - # If +separator+ is not specified, ' ' is used. - # - # If +width+ is not specified, +separator.length+ is used. You will have to - # specify this when +separator+ is a multibyte character, for example. - # - # By default, if the surrounding group is broken and a newline is inserted, - # the printer will indent the subsequent line up to the current level of - # indentation. You can disable this behavior with the +indent+ argument if - # that's not desired (rare). - # - # By default, when you insert a Breakable into the print tree, it only breaks - # the surrounding group when the group's contents cannot fit onto the - # remaining space of the current line. You can force it to break the - # surrounding group instead if you always want the newline with the +force+ - # argument. - # - # There are a few circumstances where you'll want to force the newline into - # the output but no insert a break parent (because you don't want to - # necessarily force the groups to break unless they need to). In this case you - # can pass `force: :skip_break_parent` to this method and it will not insert - # a break parent.` - # - # source://prettier_print//lib/prettier_print.rb#802 - def breakable(separator = T.unsafe(nil), width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end - - # Another very common breakable call you receive while formatting is an - # empty string in flat mode and a newline in break mode. Similar to - # breakable_space, this is here for avoid unnecessary calculation. - # - # source://prettier_print//lib/prettier_print.rb#646 - def breakable_empty; end - - # The final of the very common breakable calls you receive while formatting - # is the normal breakable space but with the addition of the break_parent. - # - # source://prettier_print//lib/prettier_print.rb#652 - def breakable_force; end - - # This is the same shortcut as breakable_force, except that it doesn't indent - # the next line. This is necessary if you're trying to preserve some custom - # formatting like a multi-line string. - # - # source://prettier_print//lib/prettier_print.rb#660 - def breakable_return; end - - # The vast majority of breakable calls you receive while formatting are a - # space in flat mode and a newline in break mode. Since this is so common, - # we have a method here to skip past unnecessary calculation. - # - # source://prettier_print//lib/prettier_print.rb#639 - def breakable_space; end - - # This is an output buffer that wraps the output object and provides - # additional functionality depending on its type. - # - # This defaults to Buffer::StringBuffer.new("".dup) - # - # source://prettier_print//lib/prettier_print.rb#400 - def buffer; end - - # A convenience method which is same as follows: - # - # text(",") - # breakable - # - # source://prettier_print//lib/prettier_print.rb#669 - def comma_breakable; end - - # Returns the group most recently added to the stack. - # - # Contrived example: - # out = "" - # => "" - # q = PrettierPrint.new(out) - # => # - # q.group { - # q.text q.current_group.inspect - # q.text q.newline - # q.group(q.current_group.depth + 1) { - # q.text q.current_group.inspect - # q.text q.newline - # q.group(q.current_group.depth + 1) { - # q.text q.current_group.inspect - # q.text q.newline - # q.group(q.current_group.depth + 1) { - # q.text q.current_group.inspect - # q.text q.newline - # } - # } - # } - # } - # => 284 - # puts out - # # - # # - # # - # # - # - # source://prettier_print//lib/prettier_print.rb#484 - def current_group; end - - # This is similar to #breakable except the decision to break or not is - # determined individually. - # - # Two #fill_breakable under a group may cause 4 results: - # (break,break), (break,non-break), (non-break,break), (non-break,non-break). - # This is different to #breakable because two #breakable under a group - # may cause 2 results: (break,break), (non-break,non-break). - # - # The text +separator+ is inserted if a line is not broken at this point. - # - # If +separator+ is not specified, ' ' is used. - # - # If +width+ is not specified, +separator.length+ is used. You will have to - # specify this when +separator+ is a multibyte character, for example. - # - # source://prettier_print//lib/prettier_print.rb#688 - def fill_breakable(separator = T.unsafe(nil), width = T.unsafe(nil)); end - - # Flushes all of the generated print tree onto the output buffer, then clears - # the generated tree from memory. - # - # source://prettier_print//lib/prettier_print.rb#490 - def flush(base_indentation = T.unsafe(nil)); end - - # An object that responds to call that takes one argument, of an Integer, and - # returns the corresponding number of spaces. - # - # By default this is: ->(n) { ' ' * n } - # - # source://prettier_print//lib/prettier_print.rb#416 - def genspace; end - - # Groups line break hints added in the block. The line break hints are all to - # be used or not. - # - # If +indent+ is specified, the method call is regarded as nested by - # nest(indent) { ... }. - # - # If +open_object+ is specified, text(open_object, open_width) is - # called before grouping. If +close_object+ is specified, - # text(close_object, close_width) is called after grouping. - # - # source://prettier_print//lib/prettier_print.rb#845 - def group(indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end - - # The stack of groups that are being printed. - # - # source://prettier_print//lib/prettier_print.rb#419 - def groups; end - - # Inserts an IfBreak node with the contents of the block being added to its - # list of nodes that should be printed if the surrounding node breaks. If it - # doesn't, then you can specify the contents to be printed with the #if_flat - # method used on the return object from this method. For example, - # - # q.if_break { q.text('do') }.if_flat { q.text('{') } - # - # In the example above, if the surrounding group is broken it will print 'do' - # and if it is not it will print '{'. - # - # source://prettier_print//lib/prettier_print.rb#917 - def if_break; end - - # This is similar to if_break in that it also inserts an IfBreak node into the - # print tree, however it's starting from the flat contents, and cannot be used - # to build the break contents. - # - # source://prettier_print//lib/prettier_print.rb#936 - def if_flat; end - - # Very similar to the #nest method, this indents the nested content by one - # level by inserting an Indent node into the print tree. The contents of the - # node are determined by the block. - # - # source://prettier_print//lib/prettier_print.rb#956 - def indent; end - - # This method calculates the position of the text relative to the current - # indentation level when the doc has been printed. It's useful for - # determining how to align text to doc nodes that are already built into the - # tree. - # - # source://prettier_print//lib/prettier_print.rb#696 - def last_position(node); end - - # Inserts a LineSuffix node into the print tree. The contents of the node are - # determined by the block. - # - # source://prettier_print//lib/prettier_print.rb#967 - def line_suffix(priority: T.unsafe(nil)); end - - # The maximum width of a line, before it is separated in to a newline - # - # This defaults to 80, and should be an Integer - # - # source://prettier_print//lib/prettier_print.rb#405 - def maxwidth; end - - # Increases left margin after newline with +indent+ for line breaks added in - # the block. - # - # source://prettier_print//lib/prettier_print.rb#977 - def nest(indent); end - - # The value that is appended to +output+ to add a new line. - # - # This defaults to "\n", and should be String - # - # source://prettier_print//lib/prettier_print.rb#410 - def newline; end - - # The output object. It represents the final destination of the contents of - # the print tree. It should respond to <<. - # - # This defaults to "".dup - # - # source://prettier_print//lib/prettier_print.rb#394 - def output; end - - # This method will remove any breakables from the list of contents so that - # no newlines are present in the output. If a newline is being forced into - # the output, the replace value will be used. - # - # source://prettier_print//lib/prettier_print.rb#721 - def remove_breaks(node, replace = T.unsafe(nil)); end - - # Adds a separated list. - # The list is separated by comma with breakable space, by default. - # - # #seplist iterates the +list+ using +iter_method+. - # It yields each object to the block given for #seplist. - # The procedure +separator_proc+ is called between each yields. - # - # If the iteration is zero times, +separator_proc+ is not called at all. - # - # If +separator_proc+ is nil or not given, - # +lambda { comma_breakable }+ is used. - # If +iter_method+ is not given, :each is used. - # - # For example, following 3 code fragments has similar effect. - # - # q.seplist([1,2,3]) {|v| xxx v } - # - # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } - # - # xxx 1 - # q.comma_breakable - # xxx 2 - # q.comma_breakable - # xxx 3 - # - # source://prettier_print//lib/prettier_print.rb#760 - def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end - - # The current array of contents that calls to methods that generate print tree - # nodes will append to. - # - # source://prettier_print//lib/prettier_print.rb#423 - def target; end - - # This adds +object+ as a text of +width+ columns in width. - # - # If +width+ is not specified, object.length is used. - # - # source://prettier_print//lib/prettier_print.rb#989 - def text(object = T.unsafe(nil), width = T.unsafe(nil)); end - - # This inserts a Trim node into the print tree which, when printed, will clear - # all whitespace at the end of the output buffer. This is useful for the rare - # case where you need to delete printed indentation and force the next node - # to start at the beginning of the line. - # - # source://prettier_print//lib/prettier_print.rb#828 - def trim; end - - # A convenience method used by a lot of the print tree node builders that - # temporarily changes the target that the builders will append to. - # - # source://prettier_print//lib/prettier_print.rb#1007 - def with_target(target); end - - private - - # This method returns a boolean as to whether or not the remaining commands - # fit onto the remaining space on the current line. If we finish printing - # all of the commands or if we hit a newline, then we return true. Otherwise - # if we continue printing past the remaining space, we return false. - # - # @return [Boolean] - # - # source://prettier_print//lib/prettier_print.rb#1019 - def fits?(next_commands, rest_commands, remaining); end - - # source://prettier_print//lib/prettier_print.rb#1091 - def remove_breaks_with(doc, replace); end - - # Resets the group stack and target array so that this pretty printer object - # can continue to be used before calling flush again if desired. - # - # source://prettier_print//lib/prettier_print.rb#1085 - def reset; end - - class << self - # This is a convenience method which is same as follows: - # - # begin - # q = PrettierPrint.new(output, maxwidth, newline, &genspace) - # ... - # q.flush - # output - # end - # - # @yield [q] - # - # source://prettier_print//lib/prettier_print.rb#377 - def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil), indentation = T.unsafe(nil)); end - - # This is similar to PrettierPrint::format but the result has no breaks. - # - # +maxwidth+, +newline+ and +genspace+ are ignored. - # - # The invocation of +breakable+ in the block doesn't break a line and is - # treated as just an invocation of +text+. - # - # @yield [q] - # - # source://prettier_print//lib/prettier_print/single_line.rb#156 - def singleline_format(output = T.unsafe(nil), _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil), _genspace = T.unsafe(nil)); end - end -end - -# A node in the print tree that represents aligning nested nodes to a certain -# prefix width or string. -# -# source://prettier_print//lib/prettier_print.rb#65 -class PrettierPrint::Align - # @return [Align] a new instance of Align - # - # source://prettier_print//lib/prettier_print.rb#68 - def initialize(indent:, contents: T.unsafe(nil)); end - - # Returns the value of attribute contents. - # - # source://prettier_print//lib/prettier_print.rb#66 - def contents; end - - # Returns the value of attribute indent. - # - # source://prettier_print//lib/prettier_print.rb#66 - def indent; end - - # source://prettier_print//lib/prettier_print.rb#73 - def pretty_print(q); end -end - -# source://prettier_print//lib/prettier_print.rb#126 -PrettierPrint::BREAKABLE_EMPTY = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# source://prettier_print//lib/prettier_print.rb#127 -PrettierPrint::BREAKABLE_FORCE = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# source://prettier_print//lib/prettier_print.rb#128 -PrettierPrint::BREAKABLE_RETURN = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# Below here are the most common combination of options that are created when -# creating new breakables. They are here to cut down on some allocations. -# -# source://prettier_print//lib/prettier_print.rb#125 -PrettierPrint::BREAKABLE_SPACE = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# Since there's really no difference in these instances, just using the same -# one saves on some allocations. -# -# source://prettier_print//lib/prettier_print.rb#141 -PrettierPrint::BREAK_PARENT = T.let(T.unsafe(nil), PrettierPrint::BreakParent) - -# A node in the print tree that forces the surrounding group to print out in -# the "break" mode as opposed to the "flat" mode. Useful for when you need to -# force a newline into a group. -# -# source://prettier_print//lib/prettier_print.rb#133 -class PrettierPrint::BreakParent - # source://prettier_print//lib/prettier_print.rb#134 - def pretty_print(q); end -end - -# A node in the print tree that represents a place in the buffer that the -# content can be broken onto multiple lines. -# -# source://prettier_print//lib/prettier_print.rb#82 -class PrettierPrint::Breakable - # @return [Breakable] a new instance of Breakable - # - # source://prettier_print//lib/prettier_print.rb#85 - def initialize(separator = T.unsafe(nil), width = T.unsafe(nil), force: T.unsafe(nil), indent: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://prettier_print//lib/prettier_print.rb#97 - def force?; end - - # @return [Boolean] - # - # source://prettier_print//lib/prettier_print.rb#101 - def indent?; end - - # source://prettier_print//lib/prettier_print.rb#105 - def pretty_print(q); end - - # Returns the value of attribute separator. - # - # source://prettier_print//lib/prettier_print.rb#83 - def separator; end - - # Returns the value of attribute width. - # - # source://prettier_print//lib/prettier_print.rb#83 - def width; end -end - -# When building up the contents in the output buffer, it's convenient to be -# able to trim trailing whitespace before newlines. If the output object is a -# string or array or strings, then we can do this with some gsub calls. If -# not, then this effectively just wraps the output object and forwards on -# calls to <<. -# -# source://prettier_print//lib/prettier_print.rb#277 -module PrettierPrint::Buffer - class << self - # This is a switch for building the correct output buffer wrapper class for - # the given output object. - # - # source://prettier_print//lib/prettier_print.rb#336 - def for(output); end - end -end - -# This is an output buffer that wraps an array output object. It provides a -# trim! method that trims off trailing whitespace from the last element in -# the array if it's an unfrozen string using the same method as the -# StringBuffer. -# -# source://prettier_print//lib/prettier_print.rb#303 -class PrettierPrint::Buffer::ArrayBuffer - # @return [ArrayBuffer] a new instance of ArrayBuffer - # - # source://prettier_print//lib/prettier_print.rb#306 - def initialize(output = T.unsafe(nil)); end - - # source://prettier_print//lib/prettier_print.rb#310 - def <<(object); end - - # Returns the value of attribute output. - # - # source://prettier_print//lib/prettier_print.rb#304 - def output; end - - # source://prettier_print//lib/prettier_print.rb#314 - def trim!; end -end - -# This is an output buffer that wraps a string output object. It provides a -# trim! method that trims off trailing whitespace from the string using -# gsub!. -# -# source://prettier_print//lib/prettier_print.rb#281 -class PrettierPrint::Buffer::StringBuffer - # @return [StringBuffer] a new instance of StringBuffer - # - # source://prettier_print//lib/prettier_print.rb#284 - def initialize(output = T.unsafe(nil)); end - - # source://prettier_print//lib/prettier_print.rb#288 - def <<(object); end - - # Returns the value of attribute output. - # - # source://prettier_print//lib/prettier_print.rb#282 - def output; end - - # source://prettier_print//lib/prettier_print.rb#292 - def trim!; end -end - -# When generating spaces after a newline for indentation, by default we -# generate one space per character needed for indentation. You can change this -# behavior (for instance to use tabs) by passing a different genspace -# procedure. -# -# source://prettier_print//lib/prettier_print.rb#350 -PrettierPrint::DEFAULT_GENSPACE = T.let(T.unsafe(nil), Proc) - -# The default indentation for printing is zero, assuming that the code starts -# at the top level. That can be changed if desired to start from a different -# indentation level. -# -# source://prettier_print//lib/prettier_print.rb#366 -PrettierPrint::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) - -# When printing, you can optionally specify the value that should be used -# whenever a group needs to be broken onto multiple lines. In this case the -# default is \n. -# -# source://prettier_print//lib/prettier_print.rb#344 -PrettierPrint::DEFAULT_NEWLINE = T.let(T.unsafe(nil), String) - -# A node in the print tree that represents a group of items which the printer -# should try to fit onto one line. This is the basic command to tell the -# printer when to break. Groups are usually nested, and the printer will try -# to fit everything on one line, but if it doesn't fit it will break the -# outermost group first and try again. It will continue breaking groups until -# everything fits (or there are no more groups to break). -# -# source://prettier_print//lib/prettier_print.rb#149 -class PrettierPrint::Group - # @return [Group] a new instance of Group - # - # source://prettier_print//lib/prettier_print.rb#152 - def initialize(depth, contents: T.unsafe(nil)); end - - # source://prettier_print//lib/prettier_print.rb#158 - def break; end - - # @return [Boolean] - # - # source://prettier_print//lib/prettier_print.rb#162 - def break?; end - - # Returns the value of attribute contents. - # - # source://prettier_print//lib/prettier_print.rb#150 - def contents; end - - # Returns the value of attribute depth. - # - # source://prettier_print//lib/prettier_print.rb#150 - def depth; end - - # source://prettier_print//lib/prettier_print.rb#166 - def pretty_print(q); end -end - -# A node in the print tree that represents printing one thing if the -# surrounding group node is broken and another thing if the surrounding group -# node is flat. -# -# source://prettier_print//lib/prettier_print.rb#176 -class PrettierPrint::IfBreak - # @return [IfBreak] a new instance of IfBreak - # - # source://prettier_print//lib/prettier_print.rb#179 - def initialize(break_contents: T.unsafe(nil), flat_contents: T.unsafe(nil)); end - - # Returns the value of attribute break_contents. - # - # source://prettier_print//lib/prettier_print.rb#177 - def break_contents; end - - # Returns the value of attribute flat_contents. - # - # source://prettier_print//lib/prettier_print.rb#177 - def flat_contents; end - - # source://prettier_print//lib/prettier_print.rb#184 - def pretty_print(q); end -end - -# A small DSL-like object used for specifying the alternative contents to be -# printed if the surrounding group doesn't break for an IfBreak node. -# -# source://prettier_print//lib/prettier_print.rb#874 -class PrettierPrint::IfBreakBuilder - # @return [IfBreakBuilder] a new instance of IfBreakBuilder - # - # source://prettier_print//lib/prettier_print.rb#877 - def initialize(q, flat_contents); end - - # Returns the value of attribute flat_contents. - # - # source://prettier_print//lib/prettier_print.rb#875 - def flat_contents; end - - # source://prettier_print//lib/prettier_print.rb#882 - def if_flat; end - - # Returns the value of attribute q. - # - # source://prettier_print//lib/prettier_print.rb#875 - def q; end -end - -# When we already know that groups are broken, we don't actually need to track -# the flat versions of the contents. So this builder version is effectively a -# no-op, but we need it to maintain the same API. The only thing this can -# impact is that if there's a forced break in the flat contents, then we need -# to propagate that break up the whole tree. -# -# source://prettier_print//lib/prettier_print.rb#892 -class PrettierPrint::IfFlatIgnore - # @return [IfFlatIgnore] a new instance of IfFlatIgnore - # - # source://prettier_print//lib/prettier_print.rb#895 - def initialize(q); end - - # source://prettier_print//lib/prettier_print.rb#899 - def if_flat; end - - # Returns the value of attribute q. - # - # source://prettier_print//lib/prettier_print.rb#893 - def q; end -end - -# A node in the print tree that is a variant of the Align node that indents -# its contents by one level. -# -# source://prettier_print//lib/prettier_print.rb#200 -class PrettierPrint::Indent - # @return [Indent] a new instance of Indent - # - # source://prettier_print//lib/prettier_print.rb#203 - def initialize(contents: T.unsafe(nil)); end - - # Returns the value of attribute contents. - # - # source://prettier_print//lib/prettier_print.rb#201 - def contents; end - - # source://prettier_print//lib/prettier_print.rb#207 - def pretty_print(q); end -end - -# A node in the print tree that has its own special buffer for implementing -# content that should flush before any newline. -# -# Useful for implementating trailing content, as it's not always practical to -# constantly check where the line ends to avoid accidentally printing some -# content after a line suffix node. -# -# source://prettier_print//lib/prettier_print.rb#220 -class PrettierPrint::LineSuffix - # @return [LineSuffix] a new instance of LineSuffix - # - # source://prettier_print//lib/prettier_print.rb#225 - def initialize(priority: T.unsafe(nil), contents: T.unsafe(nil)); end - - # Returns the value of attribute contents. - # - # source://prettier_print//lib/prettier_print.rb#223 - def contents; end - - # source://prettier_print//lib/prettier_print.rb#230 - def pretty_print(q); end - - # Returns the value of attribute priority. - # - # source://prettier_print//lib/prettier_print.rb#223 - def priority; end -end - -# source://prettier_print//lib/prettier_print.rb#221 -PrettierPrint::LineSuffix::DEFAULT_PRIORITY = T.let(T.unsafe(nil), Integer) - -# There are two modes in printing, break and flat. When we're in break mode, -# any lines will use their newline, any if-breaks will use their break -# contents, etc. -# -# source://prettier_print//lib/prettier_print.rb#356 -PrettierPrint::MODE_BREAK = T.let(T.unsafe(nil), Integer) - -# This is another print mode much like MODE_BREAK. When we're in flat mode, we -# attempt to print everything on one line until we either hit a broken group, -# a forced line, or the maximum width. -# -# source://prettier_print//lib/prettier_print.rb#361 -PrettierPrint::MODE_FLAT = T.let(T.unsafe(nil), Integer) - -# PrettierPrint::SingleLine is used by PrettierPrint.singleline_format -# -# It is passed to be similar to a PrettierPrint object itself, by responding to -# all of the same print tree node builder methods, as well as the #flush -# method. -# -# The significant difference here is that there are no line breaks in the -# output. If an IfBreak node is used, only the flat contents are printed. -# LineSuffix nodes are printed at the end of the buffer when #flush is called. -# -# source://prettier_print//lib/prettier_print/single_line.rb#13 -class PrettierPrint::SingleLine - # Create a PrettierPrint::SingleLine object - # - # Arguments: - # * +output+ - String (or similar) to store rendered text. Needs to respond - # to '<<'. - # * +maxwidth+ - Argument position expected to be here for compatibility. - # This argument is a noop. - # * +newline+ - Argument position expected to be here for compatibility. - # This argument is a noop. - # - # @return [SingleLine] a new instance of SingleLine - # - # source://prettier_print//lib/prettier_print/single_line.rb#34 - def initialize(output, _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil)); end - - # Here for compatibility, does nothing. - # - # source://prettier_print//lib/prettier_print/single_line.rb#64 - def break_parent; end - - # Appends +separator+ to the text to be output. By default +separator+ is - # ' ' - # - # The +width+, +indent+, and +force+ arguments are here for compatibility. - # They are all noop arguments. - # - # source://prettier_print//lib/prettier_print/single_line.rb#54 - def breakable(separator = T.unsafe(nil), _width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end - - # Appends +separator+ to the output buffer. +width+ is a noop here for - # compatibility. - # - # source://prettier_print//lib/prettier_print/single_line.rb#69 - def fill_breakable(separator = T.unsafe(nil), _width = T.unsafe(nil)); end - - # Flushes the line suffixes onto the output buffer. - # - # source://prettier_print//lib/prettier_print/single_line.rb#41 - def flush; end - - # Opens a block for grouping objects to be pretty printed. - # - # Arguments: - # * +indent+ - noop argument. Present for compatibility. - # * +open_obj+ - text appended before the &block. Default is '' - # * +close_obj+ - text appended after the &block. Default is '' - # * +open_width+ - noop argument. Present for compatibility. - # * +close_width+ - noop argument. Present for compatibility. - # - # source://prettier_print//lib/prettier_print/single_line.rb#90 - def group(_indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), _open_width = T.unsafe(nil), _close_width = T.unsafe(nil)); end - - # Effectively unnecessary, but here for compatibility. - # - # source://prettier_print//lib/prettier_print/single_line.rb#113 - def if_break; end - - # Also effectively unnecessary, but here for compatibility. - # - # source://prettier_print//lib/prettier_print/single_line.rb#118 - def if_flat; end - - # A noop that immediately yields. - # - # source://prettier_print//lib/prettier_print/single_line.rb#122 - def indent; end - - # Changes the target output buffer to the line suffix output buffer which - # will get flushed at the end of printing. - # - # source://prettier_print//lib/prettier_print/single_line.rb#128 - def line_suffix; end - - # A buffer output that wraps any calls to line_suffix that will be flushed - # at the end of printing. - # - # source://prettier_print//lib/prettier_print/single_line.rb#23 - def line_suffixes; end - - # Takes +indent+ arg, but does nothing with it. - # - # Yields to a block. - # - # source://prettier_print//lib/prettier_print/single_line.rb#137 - def nest(_indent); end - - # The output object. It stores rendered text and should respond to <<. - # - # source://prettier_print//lib/prettier_print/single_line.rb#15 - def output; end - - # The current array of contents that the print tree builder methods should - # append to. - # - # source://prettier_print//lib/prettier_print/single_line.rb#19 - def target; end - - # Add +object+ to the text to be output. - # - # +width+ argument is here for compatibility. It is a noop argument. - # - # source://prettier_print//lib/prettier_print/single_line.rb#144 - def text(object = T.unsafe(nil), _width = T.unsafe(nil)); end - - # Immediately trims the output buffer. - # - # source://prettier_print//lib/prettier_print/single_line.rb#74 - def trim; end -end - -# A class that wraps the ability to call #if_flat. The contents of the -# #if_flat block are executed immediately, so effectively this class and the -# #if_break method that triggers it are unnecessary, but they're here to -# maintain compatibility. -# -# source://prettier_print//lib/prettier_print/single_line.rb#106 -class PrettierPrint::SingleLine::IfBreakBuilder - # source://prettier_print//lib/prettier_print/single_line.rb#107 - def if_flat; end -end - -# Since all of the instances here are the same, we can reuse the same one to -# cut down on allocations. -# -# source://prettier_print//lib/prettier_print.rb#270 -PrettierPrint::TRIM = T.let(T.unsafe(nil), PrettierPrint::Trim) - -# A node in the print tree that represents plain content that cannot be broken -# up (by default this assumes strings, but it can really be anything). -# -# source://prettier_print//lib/prettier_print.rb#239 -class PrettierPrint::Text - # @return [Text] a new instance of Text - # - # source://prettier_print//lib/prettier_print.rb#242 - def initialize; end - - # source://prettier_print//lib/prettier_print.rb#247 - def add(object: T.unsafe(nil), width: T.unsafe(nil)); end - - # Returns the value of attribute objects. - # - # source://prettier_print//lib/prettier_print.rb#240 - def objects; end - - # source://prettier_print//lib/prettier_print.rb#252 - def pretty_print(q); end - - # Returns the value of attribute width. - # - # source://prettier_print//lib/prettier_print.rb#240 - def width; end -end - -# A node in the print tree that represents trimming all of the indentation of -# the current line, in the rare case that you need to ignore the indentation -# that you've already created. This node should be placed after a Breakable. -# -# source://prettier_print//lib/prettier_print.rb#262 -class PrettierPrint::Trim - # source://prettier_print//lib/prettier_print.rb#263 - def pretty_print(q); end -end diff --git a/sorbet/rbi/gems/prism@0.24.0.rbi b/sorbet/rbi/gems/prism@0.24.0.rbi deleted file mode 100644 index 07688d1..0000000 --- a/sorbet/rbi/gems/prism@0.24.0.rbi +++ /dev/null @@ -1,31040 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `prism` gem. -# Please instead update this file by running `bin/tapioca gem prism`. - -# =begin -# This file is generated by the templates/template.rb script and should not be -# modified manually. See templates/rbi/prism.rbi.erb -# if you are looking to modify the template -# =end - -# The Prism Ruby parser. -# -# "Parsing Ruby is suddenly manageable!" -# - You, hopefully -# -# source://prism//lib/prism.rb#8 -module Prism - class << self - # Mirror the Prism.dump API by using the serialization API. - def dump(*_arg0); end - - # Mirror the Prism.dump_file API by using the serialization API. - def dump_file(*_arg0); end - - # Mirror the Prism.lex API by using the serialization API. - def lex(*_arg0); end - - # :call-seq: - # Prism::lex_compat(source, **options) -> ParseResult - # - # Returns a parse result whose value is an array of tokens that closely - # resembles the return value of Ripper::lex. The main difference is that the - # `:on_sp` token is not emitted. - # - # For supported options, see Prism::parse. - # - # source://prism//lib/prism.rb#46 - def lex_compat(source, **options); end - - # Mirror the Prism.lex_file API by using the serialization API. - def lex_file(*_arg0); end - - # :call-seq: - # Prism::lex_ripper(source) -> Array - # - # This lexes with the Ripper lex. It drops any space events but otherwise - # returns the same tokens. Raises SyntaxError if the syntax in source is - # invalid. - # - # source://prism//lib/prism.rb#56 - def lex_ripper(source); end - - # :call-seq: - # Prism::load(source, serialized) -> ParseResult - # - # Load the serialized AST using the source as a reference into a tree. - # - # source://prism//lib/prism.rb#64 - def load(source, serialized); end - - # Mirror the Prism.parse API by using the serialization API. - def parse(*_arg0); end - - # Mirror the Prism.parse_comments API by using the serialization API. - def parse_comments(*_arg0); end - - # :call-seq: - # Prism::parse_failure?(source, **options) -> bool - # - # Returns true if the source parses with errors. - # - # @return [Boolean] - # - # source://prism//lib/prism.rb#72 - def parse_failure?(source, **options); end - - # Mirror the Prism.parse_file API by using the serialization API. This uses - # native strings instead of Ruby strings because it allows us to use mmap when - # it is available. - def parse_file(*_arg0); end - - # Mirror the Prism.parse_file_comments API by using the serialization - # API. This uses native strings instead of Ruby strings because it allows us - # to use mmap when it is available. - def parse_file_comments(*_arg0); end - - # :call-seq: - # Prism::parse_file_failure?(filepath, **options) -> bool - # - # Returns true if the file at filepath parses with errors. - # - # @return [Boolean] - # - # source://prism//lib/prism.rb#80 - def parse_file_failure?(filepath, **options); end - - # Mirror the Prism.parse_file_success? API by using the serialization API. - # - # @return [Boolean] - def parse_file_success?(*_arg0); end - - # Mirror the Prism.parse_lex API by using the serialization API. - def parse_lex(*_arg0); end - - # Mirror the Prism.parse_lex_file API by using the serialization API. - def parse_lex_file(*_arg0); end - - # Mirror the Prism.parse_success? API by using the serialization API. - # - # @return [Boolean] - def parse_success?(*_arg0); end - end -end - -# Represents the use of the `alias` keyword to alias a global variable. -# -# alias $foo $bar -# ^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#97 -class Prism::AliasGlobalVariableNode < ::Prism::Node - # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void - # - # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode - # - # source://prism//lib/prism/node.rb#99 - def initialize(source, new_name, old_name, keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#109 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#124 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#119 - def compact_child_nodes; end - - # def copy: (**params) -> AliasGlobalVariableNode - # - # source://prism//lib/prism/node.rb#129 - sig { params(params: T.untyped).returns(Prism::AliasGlobalVariableNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#143 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#166 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#161 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#154 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader new_name: Node - # - # source://prism//lib/prism/node.rb#148 - sig { returns(Prism::Node) } - def new_name; end - - # attr_reader old_name: Node - # - # source://prism//lib/prism/node.rb#151 - sig { returns(Prism::Node) } - def old_name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#190 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#200 - def type; end - end -end - -# Represents the use of the `alias` keyword to alias a method. -# -# alias foo bar -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#209 -class Prism::AliasMethodNode < ::Prism::Node - # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void - # - # @return [AliasMethodNode] a new instance of AliasMethodNode - # - # source://prism//lib/prism/node.rb#211 - def initialize(source, new_name, old_name, keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#221 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#236 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#231 - def compact_child_nodes; end - - # def copy: (**params) -> AliasMethodNode - # - # source://prism//lib/prism/node.rb#241 - sig { params(params: T.untyped).returns(Prism::AliasMethodNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#255 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#278 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#273 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#266 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader new_name: Node - # - # source://prism//lib/prism/node.rb#260 - sig { returns(Prism::Node) } - def new_name; end - - # attr_reader old_name: Node - # - # source://prism//lib/prism/node.rb#263 - sig { returns(Prism::Node) } - def old_name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#302 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#312 - def type; end - end -end - -# Represents an alternation pattern in pattern matching. -# -# foo => bar | baz -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#321 -class Prism::AlternationPatternNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void - # - # @return [AlternationPatternNode] a new instance of AlternationPatternNode - # - # source://prism//lib/prism/node.rb#323 - def initialize(source, left, right, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#333 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#338 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#348 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#343 - def compact_child_nodes; end - - # def copy: (**params) -> AlternationPatternNode - # - # source://prism//lib/prism/node.rb#353 - sig { params(params: T.untyped).returns(Prism::AlternationPatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#338 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#367 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#390 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://prism//lib/prism/node.rb#372 - sig { returns(Prism::Node) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#385 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#378 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader right: Node - # - # source://prism//lib/prism/node.rb#375 - sig { returns(Prism::Node) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#414 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#424 - def type; end - end -end - -# Represents the use of the `&&` operator or the `and` keyword. -# -# left and right -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#433 -class Prism::AndNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void - # - # @return [AndNode] a new instance of AndNode - # - # source://prism//lib/prism/node.rb#435 - def initialize(source, left, right, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#445 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#450 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#460 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#455 - def compact_child_nodes; end - - # def copy: (**params) -> AndNode - # - # source://prism//lib/prism/node.rb#465 - sig { params(params: T.untyped).returns(Prism::AndNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#450 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#479 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#517 - def inspect(inspector = T.unsafe(nil)); end - - # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # left and right - # ^^^^ - # - # 1 && 2 - # ^ - # - # source://prism//lib/prism/node.rb#490 - sig { returns(Prism::Node) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#512 - sig { returns(String) } - def operator; end - - # The location of the `and` keyword or the `&&` operator. - # - # left and right - # ^^^ - # - # source://prism//lib/prism/node.rb#505 - sig { returns(Prism::Location) } - def operator_loc; end - - # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # left && right - # ^^^^^ - # - # 1 and 2 - # ^ - # - # source://prism//lib/prism/node.rb#499 - sig { returns(Prism::Node) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#541 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#551 - def type; end - end -end - -# Represents a set of arguments to a method or a keyword. -# -# return foo, bar, baz -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#560 -class Prism::ArgumentsNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] arguments, Location location) -> void - # - # @return [ArgumentsNode] a new instance of ArgumentsNode - # - # source://prism//lib/prism/node.rb#562 - def initialize(source, flags, arguments, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#571 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: Array[Node] - # - # source://prism//lib/prism/node.rb#613 - sig { returns(T::Array[Prism::Node]) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#576 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#586 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#581 - def compact_child_nodes; end - - # def contains_keyword_splat?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#617 - sig { returns(T::Boolean) } - def contains_keyword_splat?; end - - # def copy: (**params) -> ArgumentsNode - # - # source://prism//lib/prism/node.rb#591 - sig { params(params: T.untyped).returns(Prism::ArgumentsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#576 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Node], location: Location } - # - # source://prism//lib/prism/node.rb#604 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#622 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#644 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#609 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#654 - def type; end - end -end - -# Flags for arguments nodes. -# -# source://prism//lib/prism/node.rb#19241 -module Prism::ArgumentsNodeFlags; end - -# if arguments contain keyword splat -# -# source://prism//lib/prism/node.rb#19243 -Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) - -# Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. -# -# [1, 2, 3] -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#663 -class Prism::ArrayNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void - # - # @return [ArrayNode] a new instance of ArrayNode - # - # source://prism//lib/prism/node.rb#665 - def initialize(source, flags, elements, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#676 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#681 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#758 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#735 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#691 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#686 - def compact_child_nodes; end - - # def contains_splat?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#748 - sig { returns(T::Boolean) } - def contains_splat?; end - - # def copy: (**params) -> ArrayNode - # - # source://prism//lib/prism/node.rb#696 - sig { params(params: T.untyped).returns(Prism::ArrayNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#681 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#711 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://prism//lib/prism/node.rb#720 - sig { returns(T::Array[Prism::Node]) } - def elements; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#763 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#753 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#723 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#787 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#716 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#797 - def type; end - end -end - -# Flags for array nodes. -# -# source://prism//lib/prism/node.rb#19247 -module Prism::ArrayNodeFlags; end - -# if array contains splat nodes -# -# source://prism//lib/prism/node.rb#19249 -Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) - -# Represents an array pattern in pattern matching. -# -# foo in 1, 2 -# ^^^^^^^^^^^ -# -# foo in [1, 2] -# ^^^^^^^^^^^^^ -# -# foo in *1 -# ^^^^^^^^^ -# -# foo in Bar[] -# ^^^^^^^^^^^^ -# -# foo in Bar[1, 2, 3] -# ^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#818 -class Prism::ArrayPatternNode < ::Prism::Node - # def initialize: (Node? constant, Array[Node] requireds, Node? rest, Array[Node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void - # - # @return [ArrayPatternNode] a new instance of ArrayPatternNode - # - # source://prism//lib/prism/node.rb#820 - def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#833 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#838 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#922 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#904 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#853 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#843 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://prism//lib/prism/node.rb#880 - sig { returns(T.nilable(Prism::Node)) } - def constant; end - - # def copy: (**params) -> ArrayPatternNode - # - # source://prism//lib/prism/node.rb#858 - sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#838 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#875 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#927 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#917 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#892 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader posts: Array[Node] - # - # source://prism//lib/prism/node.rb#889 - sig { returns(T::Array[Prism::Node]) } - def posts; end - - # attr_reader requireds: Array[Node] - # - # source://prism//lib/prism/node.rb#883 - sig { returns(T::Array[Prism::Node]) } - def requireds; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#886 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#962 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#972 - def type; end - end -end - -# Represents a hash key/value pair. -# -# { a => b } -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#981 -class Prism::AssocNode < ::Prism::Node - # def initialize: (Node key, Node value, Location? operator_loc, Location location) -> void - # - # @return [AssocNode] a new instance of AssocNode - # - # source://prism//lib/prism/node.rb#983 - def initialize(source, key, value, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#993 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1008 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1003 - def compact_child_nodes; end - - # def copy: (**params) -> AssocNode - # - # source://prism//lib/prism/node.rb#1013 - sig { params(params: T.untyped).returns(Prism::AssocNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { key: Node, value: Node, operator_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#1027 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#1074 - def inspect(inspector = T.unsafe(nil)); end - - # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # { a: b } - # ^ - # - # { foo => bar } - # ^^^ - # - # { def a; end => 1 } - # ^^^^^^^^^^ - # - # source://prism//lib/prism/node.rb#1041 - sig { returns(Prism::Node) } - def key; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#1069 - sig { returns(T.nilable(String)) } - def operator; end - - # The location of the `=>` operator, if present. - # - # { foo => bar } - # ^^ - # - # source://prism//lib/prism/node.rb#1056 - sig { returns(T.nilable(Prism::Location)) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1098 - def type; end - - # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # { foo => bar } - # ^^^ - # - # { x: 1 } - # ^ - # - # source://prism//lib/prism/node.rb#1050 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1108 - def type; end - end -end - -# Represents a splat in a hash literal. -# -# { **foo } -# ^^^^^ -# -# source://prism//lib/prism/node.rb#1117 -class Prism::AssocSplatNode < ::Prism::Node - # def initialize: (Node? value, Location operator_loc, Location location) -> void - # - # @return [AssocSplatNode] a new instance of AssocSplatNode - # - # source://prism//lib/prism/node.rb#1119 - def initialize(source, value, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1128 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1145 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1138 - def compact_child_nodes; end - - # def copy: (**params) -> AssocSplatNode - # - # source://prism//lib/prism/node.rb#1150 - sig { params(params: T.untyped).returns(Prism::AssocSplatNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node?, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#1163 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#1189 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1184 - sig { returns(String) } - def operator; end - - # The location of the `**` operator. - # - # { **x } - # ^^ - # - # source://prism//lib/prism/node.rb#1177 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1215 - def type; end - - # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. - # - # { **foo } - # ^^^ - # - # source://prism//lib/prism/node.rb#1171 - sig { returns(T.nilable(Prism::Node)) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1225 - def type; end - end -end - -Prism::BACKEND = T.let(T.unsafe(nil), Symbol) - -# Represents reading a reference to a field in the previous match. -# -# $' -# ^^ -# -# source://prism//lib/prism/node.rb#1234 -class Prism::BackReferenceReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode - # - # source://prism//lib/prism/node.rb#1236 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1244 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1249 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1259 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1254 - def compact_child_nodes; end - - # def copy: (**params) -> BackReferenceReadNode - # - # source://prism//lib/prism/node.rb#1264 - sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1249 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#1276 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#1289 - def inspect(inspector = T.unsafe(nil)); end - - # The name of the back-reference variable, including the leading `$`. - # - # $& # name `:$&` - # - # $+ # name `:$+` - # - # source://prism//lib/prism/node.rb#1285 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1309 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1319 - def type; end - end -end - -# A class that knows how to walk down the tree. None of the individual visit -# methods are implemented on this visitor, so it forces the consumer to -# implement each one that they need. For a default implementation that -# continues walking the tree, see the Visitor class. -# -# source://prism//lib/prism/visitor.rb#13 -class Prism::BasicVisitor - # Calls `accept` on the given node if it is not `nil`, which in turn should - # call back into this visitor by calling the appropriate `visit_*` method. - # - # source://prism//lib/prism/visitor.rb#16 - sig { params(node: T.nilable(Prism::Node)).void } - def visit(node); end - - # Visits each node in `nodes` by calling `accept` on each one. - # - # source://prism//lib/prism/visitor.rb#21 - sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } - def visit_all(nodes); end - - # Visits the child nodes of `node` by calling `accept` on each one. - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::Node).void } - def visit_child_nodes(node); end -end - -# Represents a begin statement. -# -# begin -# foo -# end -# ^^^^^ -# -# source://prism//lib/prism/node.rb#1330 -class Prism::BeginNode < ::Prism::Node - # def initialize: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void - # - # @return [BeginNode] a new instance of BeginNode - # - # source://prism//lib/prism/node.rb#1332 - def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1345 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def begin_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#1433 - sig { returns(T.nilable(String)) } - def begin_keyword; end - - # attr_reader begin_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#1396 - sig { returns(T.nilable(Prism::Location)) } - def begin_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1369 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1359 - def compact_child_nodes; end - - # def copy: (**params) -> BeginNode - # - # source://prism//lib/prism/node.rb#1374 - sig { params(params: T.untyped).returns(Prism::BeginNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#1391 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader else_clause: ElseNode? - # - # source://prism//lib/prism/node.rb#1414 - sig { returns(T.nilable(Prism::ElseNode)) } - def else_clause; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#1438 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#1420 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # attr_reader ensure_clause: EnsureNode? - # - # source://prism//lib/prism/node.rb#1417 - sig { returns(T.nilable(Prism::EnsureNode)) } - def ensure_clause; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#1443 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader rescue_clause: RescueNode? - # - # source://prism//lib/prism/node.rb#1411 - sig { returns(T.nilable(Prism::RescueNode)) } - def rescue_clause; end - - # source://prism//lib/prism/node.rb#1349 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#1408 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1488 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1498 - def type; end - end -end - -# Represents block method arguments. -# -# bar(&args) -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1507 -class Prism::BlockArgumentNode < ::Prism::Node - # def initialize: (Node? expression, Location operator_loc, Location location) -> void - # - # @return [BlockArgumentNode] a new instance of BlockArgumentNode - # - # source://prism//lib/prism/node.rb#1509 - def initialize(source, expression, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1518 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1523 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1535 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1528 - def compact_child_nodes; end - - # def copy: (**params) -> BlockArgumentNode - # - # source://prism//lib/prism/node.rb#1540 - sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1523 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node?, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#1553 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader expression: Node? - # - # source://prism//lib/prism/node.rb#1558 - sig { returns(T.nilable(Prism::Node)) } - def expression; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#1573 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1568 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#1561 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1599 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1609 - def type; end - end -end - -# Represents a block local variable. -# -# a { |; b| } -# ^ -# -# source://prism//lib/prism/node.rb#1618 -class Prism::BlockLocalVariableNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location location) -> void - # - # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode - # - # source://prism//lib/prism/node.rb#1620 - def initialize(source, flags, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1629 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1634 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1644 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1639 - def compact_child_nodes; end - - # def copy: (**params) -> BlockLocalVariableNode - # - # source://prism//lib/prism/node.rb#1649 - sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1634 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#1662 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#1680 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#1671 - sig { returns(Symbol) } - def name; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#1675 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1702 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#1667 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1712 - def type; end - end -end - -# Represents a block of ruby code. -# -# [1, 2, 3].each { |i| puts x } -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1721 -class Prism::BlockNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Node? parameters, Node? body, Location opening_loc, Location closing_loc, Location location) -> void - # - # @return [BlockNode] a new instance of BlockNode - # - # source://prism//lib/prism/node.rb#1723 - def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1735 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#1785 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1740 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#1806 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#1794 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1753 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1745 - def compact_child_nodes; end - - # def copy: (**params) -> BlockNode - # - # source://prism//lib/prism/node.rb#1758 - sig { params(params: T.untyped).returns(Prism::BlockNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1740 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#1774 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#1811 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#1779 - sig { returns(T::Array[Symbol]) } - def locals; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#1801 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#1788 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader parameters: Node? - # - # source://prism//lib/prism/node.rb#1782 - sig { returns(T.nilable(Prism::Node)) } - def parameters; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1845 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1855 - def type; end - end -end - -# Represents a block parameter to a method, block, or lambda definition. -# -# def a(&b) -# ^^ -# end -# -# source://prism//lib/prism/node.rb#1865 -class Prism::BlockParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void - # - # @return [BlockParameterNode] a new instance of BlockParameterNode - # - # source://prism//lib/prism/node.rb#1867 - def initialize(source, flags, name, name_loc, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1878 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1883 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1893 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1888 - def compact_child_nodes; end - - # def copy: (**params) -> BlockParameterNode - # - # source://prism//lib/prism/node.rb#1898 - sig { params(params: T.untyped).returns(Prism::BlockParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1883 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#1913 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#1954 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#1922 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#1925 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1949 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#1937 - sig { returns(Prism::Location) } - def operator_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#1944 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1982 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#1918 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1992 - def type; end - end -end - -# Represents a block's parameters declaration. -# -# -> (a, b = 1; local) { } -# ^^^^^^^^^^^^^^^^^ -# -# foo do |a, b = 1; local| -# ^^^^^^^^^^^^^^^^^ -# end -# -# source://prism//lib/prism/node.rb#2005 -class Prism::BlockParametersNode < ::Prism::Node - # def initialize: (ParametersNode? parameters, Array[Node] locals, Location? opening_loc, Location? closing_loc, Location location) -> void - # - # @return [BlockParametersNode] a new instance of BlockParametersNode - # - # source://prism//lib/prism/node.rb#2007 - def initialize(source, parameters, locals, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2018 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2023 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#2097 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#2079 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2036 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2028 - def compact_child_nodes; end - - # def copy: (**params) -> BlockParametersNode - # - # source://prism//lib/prism/node.rb#2041 - sig { params(params: T.untyped).returns(Prism::BlockParametersNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2023 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#2056 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#2102 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Node] - # - # source://prism//lib/prism/node.rb#2064 - sig { returns(T::Array[Prism::Node]) } - def locals; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#2092 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#2067 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader parameters: ParametersNode? - # - # source://prism//lib/prism/node.rb#2061 - sig { returns(T.nilable(Prism::ParametersNode)) } - def parameters; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2130 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2140 - def type; end - end -end - -# Represents the use of the `break` keyword. -# -# break foo -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2149 -class Prism::BreakNode < ::Prism::Node - # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void - # - # @return [BreakNode] a new instance of BreakNode - # - # source://prism//lib/prism/node.rb#2151 - def initialize(source, arguments, keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2160 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#2200 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2165 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2177 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2170 - def compact_child_nodes; end - - # def copy: (**params) -> BreakNode - # - # source://prism//lib/prism/node.rb#2182 - sig { params(params: T.untyped).returns(Prism::BreakNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2165 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#2195 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#2215 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#2210 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#2203 - sig { returns(Prism::Location) } - def keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2241 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2251 - def type; end - end -end - -# Represents the use of the `&&=` operator on a call. -# -# foo.bar &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2260 -class Prism::CallAndWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Node value, Location location) -> void - # - # @return [CallAndWriteNode] a new instance of CallAndWriteNode - # - # source://prism//lib/prism/node.rb#2262 - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2277 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2381 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2391 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2331 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2282 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2295 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2287 - def compact_child_nodes; end - - # def copy: (**params) -> CallAndWriteNode - # - # source://prism//lib/prism/node.rb#2300 - sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2282 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#2319 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2386 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#2406 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2396 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2343 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#2401 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#2361 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#2355 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#2328 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2371 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2440 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#2367 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2376 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#2358 - sig { returns(Symbol) } - def write_name; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2324 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2450 - def type; end - end -end - -# Represents a method call, in all of the various forms that can take. -# -# foo -# ^^^ -# -# foo() -# ^^^^^ -# -# +foo -# ^^^^ -# -# foo + bar -# ^^^^^^^^^ -# -# foo.bar -# ^^^^^^^ -# -# foo&.bar -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2474 -class Prism::CallNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Node? block, Location location) -> void - # - # @return [CallNode] a new instance of CallNode - # - # source://prism//lib/prism/node.rb#2476 - def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2492 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#2596 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2625 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#2611 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2635 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2557 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2497 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#2650 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#2599 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2511 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2502 - def compact_child_nodes; end - - # def copy: (**params) -> CallNode - # - # source://prism//lib/prism/node.rb#2516 - sig { params(params: T.untyped).returns(Prism::CallNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2497 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location } - # - # source://prism//lib/prism/node.rb#2536 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2630 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#2655 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2640 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2572 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#2569 - sig { returns(Symbol) } - def name; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#2645 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#2584 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # foo.bar - # ^^^ - # - # +foo - # ^^^ - # - # foo + bar - # ^^^ - # - # source://prism//lib/prism/node.rb#2554 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2615 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2699 - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2620 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2541 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2709 - def type; end - end -end - -# Flags for call nodes. -# -# source://prism//lib/prism/node.rb#19253 -module Prism::CallNodeFlags; end - -# a call that is an attribute write, so the value being written should be returned -# -# source://prism//lib/prism/node.rb#19261 -Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) - -# a call that ignores method visibility -# -# source://prism//lib/prism/node.rb#19264 -Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) - -# &. operator -# -# source://prism//lib/prism/node.rb#19255 -Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) - -# a call that could have been a local variable -# -# source://prism//lib/prism/node.rb#19258 -Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) - -# Represents the use of an assignment operator on a call. -# -# foo.bar += baz -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2718 -class Prism::CallOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, Node value, Location location) -> void - # - # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode - # - # source://prism//lib/prism/node.rb#2720 - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2736 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2844 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2854 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2791 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2754 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2746 - def compact_child_nodes; end - - # def copy: (**params) -> CallOperatorWriteNode - # - # source://prism//lib/prism/node.rb#2759 - sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#2779 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2849 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#2864 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2859 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2803 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#2821 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#2824 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#2815 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#2788 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2834 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2899 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#2830 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2839 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#2818 - sig { returns(Symbol) } - def write_name; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2784 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2909 - def type; end - end -end - -# Represents the use of the `||=` operator on a call. -# -# foo.bar ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2918 -class Prism::CallOrWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Node value, Location location) -> void - # - # @return [CallOrWriteNode] a new instance of CallOrWriteNode - # - # source://prism//lib/prism/node.rb#2920 - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2935 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3039 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#3049 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2989 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2940 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2953 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2945 - def compact_child_nodes; end - - # def copy: (**params) -> CallOrWriteNode - # - # source://prism//lib/prism/node.rb#2958 - sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2940 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#2977 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3044 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#3064 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#3054 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#3001 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3059 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3019 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#3013 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#2986 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3029 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3098 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#3025 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3034 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#3016 - sig { returns(Symbol) } - def write_name; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2982 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3108 - def type; end - end -end - -# Represents assigning to a method call. -# -# foo.bar, = 1 -# ^^^^^^^ -# -# begin -# rescue => foo.bar -# ^^^^^^^ -# end -# -# for foo.bar in baz do end -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#3125 -class Prism::CallTargetNode < ::Prism::Node - # def initialize: (Integer flags, Node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void - # - # @return [CallTargetNode] a new instance of CallTargetNode - # - # source://prism//lib/prism/node.rb#3127 - def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3139 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3213 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String - # - # source://prism//lib/prism/node.rb#3223 - sig { returns(String) } - def call_operator; end - - # attr_reader call_operator_loc: Location - # - # source://prism//lib/prism/node.rb#3187 - sig { returns(Prism::Location) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3144 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3154 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3149 - def compact_child_nodes; end - - # def copy: (**params) -> CallTargetNode - # - # source://prism//lib/prism/node.rb#3159 - sig { params(params: T.untyped).returns(Prism::CallTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3144 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#3175 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3218 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#3233 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String - # - # source://prism//lib/prism/node.rb#3228 - sig { returns(String) } - def message; end - - # attr_reader message_loc: Location - # - # source://prism//lib/prism/node.rb#3196 - sig { returns(Prism::Location) } - def message_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3193 - sig { returns(Symbol) } - def name; end - - # attr_reader receiver: Node - # - # source://prism//lib/prism/node.rb#3184 - sig { returns(Prism::Node) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3203 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3259 - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#3208 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#3180 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3269 - def type; end - end -end - -# Represents assigning to a local variable in pattern matching. -# -# foo => [bar => baz] -# ^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3278 -class Prism::CapturePatternNode < ::Prism::Node - # def initialize: (Node value, Node target, Location operator_loc, Location location) -> void - # - # @return [CapturePatternNode] a new instance of CapturePatternNode - # - # source://prism//lib/prism/node.rb#3280 - def initialize(source, value, target, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3290 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3295 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3305 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3300 - def compact_child_nodes; end - - # def copy: (**params) -> CapturePatternNode - # - # source://prism//lib/prism/node.rb#3310 - sig { params(params: T.untyped).returns(Prism::CapturePatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3295 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, target: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#3324 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#3347 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3342 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3335 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: Node - # - # source://prism//lib/prism/node.rb#3332 - sig { returns(Prism::Node) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3371 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#3329 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3381 - def type; end - end -end - -# Represents the use of a case statement for pattern matching. -# -# case true -# in false -# end -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3392 -class Prism::CaseMatchNode < ::Prism::Node - # def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void - # - # @return [CaseMatchNode] a new instance of CaseMatchNode - # - # source://prism//lib/prism/node.rb#3394 - def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3406 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def case_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3473 - sig { returns(String) } - def case_keyword; end - - # attr_reader case_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3460 - sig { returns(Prism::Location) } - def case_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3411 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3425 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3416 - def compact_child_nodes; end - - # attr_reader conditions: Array[Node] - # - # source://prism//lib/prism/node.rb#3454 - sig { returns(T::Array[Prism::Node]) } - def conditions; end - - # attr_reader consequent: ElseNode? - # - # source://prism//lib/prism/node.rb#3457 - sig { returns(T.nilable(Prism::ElseNode)) } - def consequent; end - - # def copy: (**params) -> CaseMatchNode - # - # source://prism//lib/prism/node.rb#3430 - sig { params(params: T.untyped).returns(Prism::CaseMatchNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3411 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#3446 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3478 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3466 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#3483 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader predicate: Node? - # - # source://prism//lib/prism/node.rb#3451 - sig { returns(T.nilable(Prism::Node)) } - def predicate; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3517 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3527 - def type; end - end -end - -# Represents the use of a case statement. -# -# case true -# when false -# end -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3538 -class Prism::CaseNode < ::Prism::Node - # def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void - # - # @return [CaseNode] a new instance of CaseNode - # - # source://prism//lib/prism/node.rb#3540 - def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3552 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def case_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3619 - sig { returns(String) } - def case_keyword; end - - # attr_reader case_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3606 - sig { returns(Prism::Location) } - def case_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3557 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3571 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3562 - def compact_child_nodes; end - - # attr_reader conditions: Array[Node] - # - # source://prism//lib/prism/node.rb#3600 - sig { returns(T::Array[Prism::Node]) } - def conditions; end - - # attr_reader consequent: ElseNode? - # - # source://prism//lib/prism/node.rb#3603 - sig { returns(T.nilable(Prism::ElseNode)) } - def consequent; end - - # def copy: (**params) -> CaseNode - # - # source://prism//lib/prism/node.rb#3576 - sig { params(params: T.untyped).returns(Prism::CaseNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3557 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#3592 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3624 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3612 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#3629 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader predicate: Node? - # - # source://prism//lib/prism/node.rb#3597 - sig { returns(T.nilable(Prism::Node)) } - def predicate; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3663 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3673 - def type; end - end -end - -# Represents a class declaration involving the `class` keyword. -# -# class Foo end -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3682 -class Prism::ClassNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Node constant_path, Location? inheritance_operator_loc, Node? superclass, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void - # - # @return [ClassNode] a new instance of ClassNode - # - # source://prism//lib/prism/node.rb#3684 - def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3699 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#3774 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3704 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def class_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3787 - sig { returns(String) } - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3750 - sig { returns(Prism::Location) } - def class_keyword_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3718 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3709 - def compact_child_nodes; end - - # attr_reader constant_path: Node - # - # source://prism//lib/prism/node.rb#3756 - sig { returns(Prism::Node) } - def constant_path; end - - # def copy: (**params) -> ClassNode - # - # source://prism//lib/prism/node.rb#3723 - sig { params(params: T.untyped).returns(Prism::ClassNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3704 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#3742 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3797 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3777 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def inheritance_operator: () -> String? - # - # source://prism//lib/prism/node.rb#3792 - sig { returns(T.nilable(String)) } - def inheritance_operator; end - - # attr_reader inheritance_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#3759 - sig { returns(T.nilable(Prism::Location)) } - def inheritance_operator_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#3802 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#3747 - sig { returns(T::Array[Symbol]) } - def locals; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3783 - sig { returns(Symbol) } - def name; end - - # attr_reader superclass: Node? - # - # source://prism//lib/prism/node.rb#3771 - sig { returns(T.nilable(Prism::Node)) } - def superclass; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3840 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3850 - def type; end - end -end - -# Represents the use of the `&&=` operator for assignment to a class variable. -# -# @@target &&= value -# ^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3859 -class Prism::ClassVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#3861 - def initialize(source, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3872 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3877 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3887 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3882 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#3892 - sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3877 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#3907 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#125 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#3936 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3912 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3915 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3931 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3921 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3960 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#3927 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3970 - def type; end - end -end - -# Represents assigning to a class variable using an operator that isn't `=`. -# -# @@target += value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3979 -class Prism::ClassVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void - # - # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#3981 - def initialize(source, name, name_loc, operator_loc, value, operator, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3993 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4008 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4003 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4013 - sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#4029 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#137 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4056 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4034 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4037 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#4052 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4043 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4081 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4049 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4091 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a class variable. -# -# @@target ||= value -# ^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4100 -class Prism::ClassVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#4102 - def initialize(source, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4113 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4118 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4128 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4123 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#4133 - sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4118 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#4148 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#131 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4177 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4153 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4156 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4172 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4162 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4201 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4168 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4211 - def type; end - end -end - -# Represents referencing a class variable. -# -# @@foo -# ^^^^^ -# -# source://prism//lib/prism/node.rb#4220 -class Prism::ClassVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode - # - # source://prism//lib/prism/node.rb#4222 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4230 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4235 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4245 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4240 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableReadNode - # - # source://prism//lib/prism/node.rb#4250 - sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4235 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#4262 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4275 - def inspect(inspector = T.unsafe(nil)); end - - # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). - # - # @@abc # name `:@@abc` - # - # @@_test # name `:@@_test` - # - # source://prism//lib/prism/node.rb#4271 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4295 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4305 - def type; end - end -end - -# Represents writing to a class variable in a context that doesn't have an explicit value. -# -# @@foo, @@bar = baz -# ^^^^^ ^^^^^ -# -# source://prism//lib/prism/node.rb#4314 -class Prism::ClassVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode - # - # source://prism//lib/prism/node.rb#4316 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4324 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4329 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4339 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4334 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableTargetNode - # - # source://prism//lib/prism/node.rb#4344 - sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4329 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#4356 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4365 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4361 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4385 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4395 - def type; end - end -end - -# Represents writing to a class variable. -# -# @@foo = 1 -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4404 -class Prism::ClassVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location? operator_loc, Location location) -> void - # - # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode - # - # source://prism//lib/prism/node.rb#4406 - def initialize(source, name, name_loc, value, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4417 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4422 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4432 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4427 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableWriteNode - # - # source://prism//lib/prism/node.rb#4437 - sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4422 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#4452 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4487 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4457 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4460 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#4482 - sig { returns(T.nilable(String)) } - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#4469 - sig { returns(T.nilable(Prism::Location)) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4511 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4466 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4521 - def type; end - end -end - -# This represents a comment that was encountered during parsing. It is the -# base class for all comment types. -# -# source://prism//lib/prism/parse_result.rb#258 -class Prism::Comment - # Create a new comment object with the given location. - # - # @return [Comment] a new instance of Comment - # - # source://prism//lib/prism/parse_result.rb#263 - def initialize(location); end - - # Implement the hash pattern matching interface for Comment. - # - # source://prism//lib/prism/parse_result.rb#268 - def deconstruct_keys(keys); end - - # The location of this comment in the source. - # - # source://prism//lib/prism/parse_result.rb#260 - sig { returns(Prism::Location) } - def location; end - - sig { returns(T::Boolean) } - def trailing?; end -end - -# A compiler is a visitor that returns the value of each node as it visits. -# This is as opposed to a visitor which will only walk the tree. This can be -# useful when you are trying to compile a tree into a different format. -# -# For example, to build a representation of the tree as s-expressions, you -# could write: -# -# class SExpressions < Prism::Compiler -# def visit_arguments_node(node) = [:arguments, super] -# def visit_call_node(node) = [:call, super] -# def visit_integer_node(node) = [:integer] -# def visit_program_node(node) = [:program, super] -# end -# -# Prism.parse("1 + 2").value.accept(SExpressions.new) -# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] -# -# source://prism//lib/prism/compiler.rb#26 -class Prism::Compiler - # Visit an individual node. - # - # source://prism//lib/prism/compiler.rb#28 - def visit(node); end - - # Visit the child nodes of the given node. - # Compile a AliasGlobalVariableNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_alias_global_variable_node(node); end - - # Visit the child nodes of the given node. - # Compile a AliasMethodNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_alias_method_node(node); end - - # Visit a list of nodes. - # - # source://prism//lib/prism/compiler.rb#33 - def visit_all(nodes); end - - # Visit the child nodes of the given node. - # Compile a AlternationPatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_alternation_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a AndNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_and_node(node); end - - # Visit the child nodes of the given node. - # Compile a ArgumentsNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_arguments_node(node); end - - # Visit the child nodes of the given node. - # Compile a ArrayNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_array_node(node); end - - # Visit the child nodes of the given node. - # Compile a ArrayPatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_array_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a AssocNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_assoc_node(node); end - - # Visit the child nodes of the given node. - # Compile a AssocSplatNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_assoc_splat_node(node); end - - # Visit the child nodes of the given node. - # Compile a BackReferenceReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_back_reference_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a BeginNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_begin_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockArgumentNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_argument_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockLocalVariableNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_local_variable_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockParametersNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_parameters_node(node); end - - # Visit the child nodes of the given node. - # Compile a BreakNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_break_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a CapturePatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_capture_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a CaseMatchNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_case_match_node(node); end - - # Visit the child nodes of the given node. - # Compile a CaseNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_case_node(node); end - - # Visit the child nodes of the given node. - # - # source://prism//lib/prism/compiler.rb#38 - def visit_child_nodes(node); end - - # Visit the child nodes of the given node. - # Compile a ClassNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a DefNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_def_node(node); end - - # Visit the child nodes of the given node. - # Compile a DefinedNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_defined_node(node); end - - # Visit the child nodes of the given node. - # Compile a ElseNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_else_node(node); end - - # Visit the child nodes of the given node. - # Compile a EmbeddedStatementsNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_embedded_statements_node(node); end - - # Visit the child nodes of the given node. - # Compile a EmbeddedVariableNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_embedded_variable_node(node); end - - # Visit the child nodes of the given node. - # Compile a EnsureNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_ensure_node(node); end - - # Visit the child nodes of the given node. - # Compile a FalseNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_false_node(node); end - - # Visit the child nodes of the given node. - # Compile a FindPatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_find_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a FlipFlopNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_flip_flop_node(node); end - - # Visit the child nodes of the given node. - # Compile a FloatNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_float_node(node); end - - # Visit the child nodes of the given node. - # Compile a ForNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_for_node(node); end - - # Visit the child nodes of the given node. - # Compile a ForwardingArgumentsNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_forwarding_arguments_node(node); end - - # Visit the child nodes of the given node. - # Compile a ForwardingParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_forwarding_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a ForwardingSuperNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_forwarding_super_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a HashNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_hash_node(node); end - - # Visit the child nodes of the given node. - # Compile a HashPatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_hash_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a IfNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_if_node(node); end - - # Visit the child nodes of the given node. - # Compile a ImaginaryNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_imaginary_node(node); end - - # Visit the child nodes of the given node. - # Compile a ImplicitNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_implicit_node(node); end - - # Visit the child nodes of the given node. - # Compile a ImplicitRestNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_implicit_rest_node(node); end - - # Visit the child nodes of the given node. - # Compile a InNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_in_node(node); end - - # Visit the child nodes of the given node. - # Compile a IndexAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_index_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a IndexOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_index_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a IndexOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_index_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a IndexTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_index_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a IntegerNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_integer_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedMatchLastLineNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_match_last_line_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedRegularExpressionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_regular_expression_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedStringNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_string_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedSymbolNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_symbol_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedXStringNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_x_string_node(node); end - - # Visit the child nodes of the given node. - # Compile a KeywordHashNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_keyword_hash_node(node); end - - # Visit the child nodes of the given node. - # Compile a KeywordRestParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_keyword_rest_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a LambdaNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_lambda_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a MatchLastLineNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_match_last_line_node(node); end - - # Visit the child nodes of the given node. - # Compile a MatchPredicateNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_match_predicate_node(node); end - - # Visit the child nodes of the given node. - # Compile a MatchRequiredNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_match_required_node(node); end - - # Visit the child nodes of the given node. - # Compile a MatchWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_match_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a MissingNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_missing_node(node); end - - # Visit the child nodes of the given node. - # Compile a ModuleNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_module_node(node); end - - # Visit the child nodes of the given node. - # Compile a MultiTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_multi_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a MultiWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_multi_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a NextNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_next_node(node); end - - # Visit the child nodes of the given node. - # Compile a NilNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_nil_node(node); end - - # Visit the child nodes of the given node. - # Compile a NoKeywordsParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_no_keywords_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a NumberedParametersNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_numbered_parameters_node(node); end - - # Visit the child nodes of the given node. - # Compile a NumberedReferenceReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_numbered_reference_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a OptionalKeywordParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_optional_keyword_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a OptionalParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_optional_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a OrNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_or_node(node); end - - # Visit the child nodes of the given node. - # Compile a ParametersNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_parameters_node(node); end - - # Visit the child nodes of the given node. - # Compile a ParenthesesNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_parentheses_node(node); end - - # Visit the child nodes of the given node. - # Compile a PinnedExpressionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_pinned_expression_node(node); end - - # Visit the child nodes of the given node. - # Compile a PinnedVariableNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_pinned_variable_node(node); end - - # Visit the child nodes of the given node. - # Compile a PostExecutionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_post_execution_node(node); end - - # Visit the child nodes of the given node. - # Compile a PreExecutionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_pre_execution_node(node); end - - # Visit the child nodes of the given node. - # Compile a ProgramNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_program_node(node); end - - # Visit the child nodes of the given node. - # Compile a RangeNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_range_node(node); end - - # Visit the child nodes of the given node. - # Compile a RationalNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_rational_node(node); end - - # Visit the child nodes of the given node. - # Compile a RedoNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_redo_node(node); end - - # Visit the child nodes of the given node. - # Compile a RegularExpressionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_regular_expression_node(node); end - - # Visit the child nodes of the given node. - # Compile a RequiredKeywordParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_required_keyword_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a RequiredParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_required_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a RescueModifierNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_rescue_modifier_node(node); end - - # Visit the child nodes of the given node. - # Compile a RescueNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_rescue_node(node); end - - # Visit the child nodes of the given node. - # Compile a RestParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_rest_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a RetryNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_retry_node(node); end - - # Visit the child nodes of the given node. - # Compile a ReturnNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_return_node(node); end - - # Visit the child nodes of the given node. - # Compile a SelfNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_self_node(node); end - - # Visit the child nodes of the given node. - # Compile a SingletonClassNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_singleton_class_node(node); end - - # Visit the child nodes of the given node. - # Compile a SourceEncodingNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_source_encoding_node(node); end - - # Visit the child nodes of the given node. - # Compile a SourceFileNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_source_file_node(node); end - - # Visit the child nodes of the given node. - # Compile a SourceLineNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_source_line_node(node); end - - # Visit the child nodes of the given node. - # Compile a SplatNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_splat_node(node); end - - # Visit the child nodes of the given node. - # Compile a StatementsNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_statements_node(node); end - - # Visit the child nodes of the given node. - # Compile a StringNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_string_node(node); end - - # Visit the child nodes of the given node. - # Compile a SuperNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_super_node(node); end - - # Visit the child nodes of the given node. - # Compile a SymbolNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_symbol_node(node); end - - # Visit the child nodes of the given node. - # Compile a TrueNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_true_node(node); end - - # Visit the child nodes of the given node. - # Compile a UndefNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_undef_node(node); end - - # Visit the child nodes of the given node. - # Compile a UnlessNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_unless_node(node); end - - # Visit the child nodes of the given node. - # Compile a UntilNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_until_node(node); end - - # Visit the child nodes of the given node. - # Compile a WhenNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_when_node(node); end - - # Visit the child nodes of the given node. - # Compile a WhileNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_while_node(node); end - - # Visit the child nodes of the given node. - # Compile a XStringNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_x_string_node(node); end - - # Visit the child nodes of the given node. - # Compile a YieldNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_yield_node(node); end -end - -# Represents the use of the `&&=` operator for assignment to a constant. -# -# Target &&= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4530 -class Prism::ConstantAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode - # - # source://prism//lib/prism/node.rb#4532 - def initialize(source, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4543 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4548 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4558 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4553 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantAndWriteNode - # - # source://prism//lib/prism/node.rb#4563 - sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4548 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#4578 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#143 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4607 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4583 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4586 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4602 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4592 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4631 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4598 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4641 - def type; end - end -end - -# Represents assigning to a constant using an operator that isn't `=`. -# -# Target += value -# ^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4650 -class Prism::ConstantOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void - # - # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4652 - def initialize(source, name, name_loc, operator_loc, value, operator, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4664 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4669 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4679 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4674 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4684 - sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4669 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#4700 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#155 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4727 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4705 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4708 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#4723 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4714 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4752 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4720 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4762 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a constant. -# -# Target ||= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4771 -class Prism::ConstantOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode - # - # source://prism//lib/prism/node.rb#4773 - def initialize(source, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4784 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4789 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4799 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4794 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantOrWriteNode - # - # source://prism//lib/prism/node.rb#4804 - sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4789 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#4819 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#149 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4848 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4824 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4827 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4843 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4833 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4872 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4839 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4882 - def type; end - end -end - -# Represents the use of the `&&=` operator for assignment to a constant path. -# -# Parent::Child &&= value -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4891 -class Prism::ConstantPathAndWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void - # - # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode - # - # source://prism//lib/prism/node.rb#4893 - def initialize(source, target, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4903 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4908 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4918 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4913 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathAndWriteNode - # - # source://prism//lib/prism/node.rb#4923 - sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4908 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#4937 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#4960 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4955 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4945 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#4942 - sig { returns(Prism::ConstantPathNode) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4984 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4951 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4994 - def type; end - end -end - -# Represents accessing a constant through a path of `::` operators. -# -# Foo::Bar -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5003 -class Prism::ConstantPathNode < ::Prism::Node - # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void - # - # @return [ConstantPathNode] a new instance of ConstantPathNode - # - # source://prism//lib/prism/node.rb#5005 - def initialize(source, parent, child, delimiter_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5015 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader child: Node - # - # source://prism//lib/prism/node.rb#5060 - sig { returns(Prism::Node) } - def child; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5020 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5033 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5025 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathNode - # - # source://prism//lib/prism/node.rb#5038 - sig { params(params: T.untyped).returns(Prism::ConstantPathNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5020 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#5052 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def delimiter: () -> String - # - # source://prism//lib/prism/node.rb#5070 - sig { returns(String) } - def delimiter; end - - # attr_reader delimiter_loc: Location - # - # source://prism//lib/prism/node.rb#5063 - sig { returns(Prism::Location) } - def delimiter_loc; end - - # Returns the full name of this constant path. For example: "Foo::Bar" - # - # source://prism//lib/prism/node_ext.rb#129 - def full_name; end - - # Returns the list of parts for the full name of this constant path. - # For example: [:Foo, :Bar] - # - # source://prism//lib/prism/node_ext.rb#112 - def full_name_parts; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#5075 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader parent: Node? - # - # source://prism//lib/prism/node.rb#5057 - sig { returns(T.nilable(Prism::Node)) } - def parent; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5103 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5113 - def type; end - end -end - -# An error class raised when dynamic parts are found while computing a -# constant path's full name. For example: -# Foo::Bar::Baz -> does not raise because all parts of the constant path are -# simple constants -# var::Bar::Baz -> raises because the first part of the constant path is a -# local variable -# -# source://prism//lib/prism/node_ext.rb#108 -class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end - -# Represents assigning to a constant path using an operator that isn't `=`. -# -# Parent::Child += value -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5122 -class Prism::ConstantPathOperatorWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Symbol operator, Location location) -> void - # - # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode - # - # source://prism//lib/prism/node.rb#5124 - def initialize(source, target, operator_loc, value, operator, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5135 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5140 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5150 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5145 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathOperatorWriteNode - # - # source://prism//lib/prism/node.rb#5155 - sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5140 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#5170 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#5191 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#5187 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#5178 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#5175 - sig { returns(Prism::ConstantPathNode) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5216 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#5184 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5226 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a constant path. -# -# Parent::Child ||= value -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5235 -class Prism::ConstantPathOrWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void - # - # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode - # - # source://prism//lib/prism/node.rb#5237 - def initialize(source, target, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5247 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5252 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5262 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5257 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathOrWriteNode - # - # source://prism//lib/prism/node.rb#5267 - sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5252 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#5281 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#5304 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#5299 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#5289 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#5286 - sig { returns(Prism::ConstantPathNode) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5328 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#5295 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5338 - def type; end - end -end - -# Represents writing to a constant path in a context that doesn't have an explicit value. -# -# Foo::Foo, Bar::Bar = baz -# ^^^^^^^^ ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5347 -class Prism::ConstantPathTargetNode < ::Prism::Node - # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void - # - # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode - # - # source://prism//lib/prism/node.rb#5349 - def initialize(source, parent, child, delimiter_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5359 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader child: Node - # - # source://prism//lib/prism/node.rb#5404 - sig { returns(Prism::Node) } - def child; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5364 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5377 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5369 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathTargetNode - # - # source://prism//lib/prism/node.rb#5382 - sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5364 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#5396 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def delimiter: () -> String - # - # source://prism//lib/prism/node.rb#5414 - sig { returns(String) } - def delimiter; end - - # attr_reader delimiter_loc: Location - # - # source://prism//lib/prism/node.rb#5407 - sig { returns(Prism::Location) } - def delimiter_loc; end - - # Returns the full name of this constant path. For example: "Foo::Bar" - # - # source://prism//lib/prism/node_ext.rb#152 - def full_name; end - - # Returns the list of parts for the full name of this constant path. - # For example: [:Foo, :Bar] - # - # source://prism//lib/prism/node_ext.rb#137 - def full_name_parts; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#5419 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader parent: Node? - # - # source://prism//lib/prism/node.rb#5401 - sig { returns(T.nilable(Prism::Node)) } - def parent; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5447 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5457 - def type; end - end -end - -# Represents writing to a constant path. -# -# ::Foo = 1 -# ^^^^^^^^^ -# -# Foo::Bar = 1 -# ^^^^^^^^^^^^ -# -# ::Foo::Bar = 1 -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5472 -class Prism::ConstantPathWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void - # - # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode - # - # source://prism//lib/prism/node.rb#5474 - def initialize(source, target, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5484 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5489 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5499 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5494 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathWriteNode - # - # source://prism//lib/prism/node.rb#5504 - sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5489 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#5518 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#5541 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#5536 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#5526 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#5523 - sig { returns(Prism::ConstantPathNode) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5565 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#5532 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5575 - def type; end - end -end - -# Represents referencing a constant. -# -# Foo -# ^^^ -# -# source://prism//lib/prism/node.rb#5584 -class Prism::ConstantReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [ConstantReadNode] a new instance of ConstantReadNode - # - # source://prism//lib/prism/node.rb#5586 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5594 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5599 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5609 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5604 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantReadNode - # - # source://prism//lib/prism/node.rb#5614 - sig { params(params: T.untyped).returns(Prism::ConstantReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5599 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#5626 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # Returns the full name of this constant. For example: "Foo" - # - # source://prism//lib/prism/node_ext.rb#96 - def full_name; end - - # Returns the list of parts for the full name of this constant. - # For example: [:Foo] - # - # source://prism//lib/prism/node_ext.rb#91 - def full_name_parts; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#5639 - def inspect(inspector = T.unsafe(nil)); end - - # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). - # - # X # name `:X` - # - # SOME_CONSTANT # name `:SOME_CONSTANT` - # - # source://prism//lib/prism/node.rb#5635 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5659 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5669 - def type; end - end -end - -# Represents writing to a constant in a context that doesn't have an explicit value. -# -# Foo, Bar = baz -# ^^^ ^^^ -# -# source://prism//lib/prism/node.rb#5678 -class Prism::ConstantTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [ConstantTargetNode] a new instance of ConstantTargetNode - # - # source://prism//lib/prism/node.rb#5680 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5688 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5693 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5703 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5698 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantTargetNode - # - # source://prism//lib/prism/node.rb#5708 - sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5693 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#5720 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # Returns the full name of this constant. For example: "Foo" - # - # source://prism//lib/prism/node_ext.rb#165 - def full_name; end - - # Returns the list of parts for the full name of this constant. - # For example: [:Foo] - # - # source://prism//lib/prism/node_ext.rb#160 - def full_name_parts; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#5729 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5725 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5749 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5759 - def type; end - end -end - -# Represents writing to a constant. -# -# Foo = 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#5768 -class Prism::ConstantWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void - # - # @return [ConstantWriteNode] a new instance of ConstantWriteNode - # - # source://prism//lib/prism/node.rb#5770 - def initialize(source, name, name_loc, value, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5781 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5786 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5796 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5791 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantWriteNode - # - # source://prism//lib/prism/node.rb#5801 - sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5786 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#5816 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#5845 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5821 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#5824 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#5840 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#5833 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5869 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#5830 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5879 - def type; end - end -end - -class Prism::DATAComment < Prism::Comment; end - -# The DSL module provides a set of methods that can be used to create prism -# nodes in a more concise manner. For example, instead of writing: -# -# source = Prism::Source.new("[1]") -# -# Prism::ArrayNode.new( -# [ -# Prism::IntegerNode.new( -# Prism::IntegerBaseFlags::DECIMAL, -# Prism::Location.new(source, 1, 1), -# source -# ) -# ], -# Prism::Location.new(source, 0, 1), -# Prism::Location.new(source, 2, 1), -# source -# ) -# -# you could instead write: -# -# source = Prism::Source.new("[1]") -# -# ArrayNode( -# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1)), source), -# Location(source, 0, 1), -# Location(source, 2, 1), -# source -# ) -# -# This is mostly helpful in the context of writing tests, but can also be used -# to generate trees programmatically. -# -# source://prism//lib/prism/dsl.rb#40 -module Prism::DSL - private - - # Create a new AliasGlobalVariableNode node - # - # source://prism//lib/prism/dsl.rb#49 - def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new AliasMethodNode node - # - # source://prism//lib/prism/dsl.rb#54 - def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new AlternationPatternNode node - # - # source://prism//lib/prism/dsl.rb#59 - def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new AndNode node - # - # source://prism//lib/prism/dsl.rb#64 - def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ArgumentsNode node - # - # source://prism//lib/prism/dsl.rb#69 - def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ArrayNode node - # - # source://prism//lib/prism/dsl.rb#74 - def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ArrayPatternNode node - # - # source://prism//lib/prism/dsl.rb#79 - def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new AssocNode node - # - # source://prism//lib/prism/dsl.rb#84 - def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new AssocSplatNode node - # - # source://prism//lib/prism/dsl.rb#89 - def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new BackReferenceReadNode node - # - # source://prism//lib/prism/dsl.rb#94 - def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new BeginNode node - # - # source://prism//lib/prism/dsl.rb#99 - def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new BlockArgumentNode node - # - # source://prism//lib/prism/dsl.rb#104 - def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new BlockLocalVariableNode node - # - # source://prism//lib/prism/dsl.rb#109 - def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new BlockNode node - # - # source://prism//lib/prism/dsl.rb#114 - def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new BlockParameterNode node - # - # source://prism//lib/prism/dsl.rb#119 - def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new BlockParametersNode node - # - # source://prism//lib/prism/dsl.rb#124 - def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new BreakNode node - # - # source://prism//lib/prism/dsl.rb#129 - def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new CallAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#134 - def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new CallNode node - # - # source://prism//lib/prism/dsl.rb#139 - def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new CallOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#144 - def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new CallOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#149 - def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new CallTargetNode node - # - # source://prism//lib/prism/dsl.rb#154 - def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new CapturePatternNode node - # - # source://prism//lib/prism/dsl.rb#159 - def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new CaseMatchNode node - # - # source://prism//lib/prism/dsl.rb#164 - def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new CaseNode node - # - # source://prism//lib/prism/dsl.rb#169 - def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ClassNode node - # - # source://prism//lib/prism/dsl.rb#174 - def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ClassVariableAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#179 - def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ClassVariableOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#184 - def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ClassVariableOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#189 - def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ClassVariableReadNode node - # - # source://prism//lib/prism/dsl.rb#194 - def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ClassVariableTargetNode node - # - # source://prism//lib/prism/dsl.rb#199 - def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ClassVariableWriteNode node - # - # source://prism//lib/prism/dsl.rb#204 - def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#209 - def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#214 - def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#219 - def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantPathAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#224 - def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantPathNode node - # - # source://prism//lib/prism/dsl.rb#229 - def ConstantPathNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantPathOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#234 - def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantPathOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#239 - def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantPathTargetNode node - # - # source://prism//lib/prism/dsl.rb#244 - def ConstantPathTargetNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantPathWriteNode node - # - # source://prism//lib/prism/dsl.rb#249 - def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantReadNode node - # - # source://prism//lib/prism/dsl.rb#254 - def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantTargetNode node - # - # source://prism//lib/prism/dsl.rb#259 - def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ConstantWriteNode node - # - # source://prism//lib/prism/dsl.rb#264 - def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new DefNode node - # - # source://prism//lib/prism/dsl.rb#269 - def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new DefinedNode node - # - # source://prism//lib/prism/dsl.rb#274 - def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ElseNode node - # - # source://prism//lib/prism/dsl.rb#279 - def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new EmbeddedStatementsNode node - # - # source://prism//lib/prism/dsl.rb#284 - def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new EmbeddedVariableNode node - # - # source://prism//lib/prism/dsl.rb#289 - def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new EnsureNode node - # - # source://prism//lib/prism/dsl.rb#294 - def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new FalseNode node - # - # source://prism//lib/prism/dsl.rb#299 - def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new FindPatternNode node - # - # source://prism//lib/prism/dsl.rb#304 - def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new FlipFlopNode node - # - # source://prism//lib/prism/dsl.rb#309 - def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new FloatNode node - # - # source://prism//lib/prism/dsl.rb#314 - def FloatNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ForNode node - # - # source://prism//lib/prism/dsl.rb#319 - def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ForwardingArgumentsNode node - # - # source://prism//lib/prism/dsl.rb#324 - def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ForwardingParameterNode node - # - # source://prism//lib/prism/dsl.rb#329 - def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ForwardingSuperNode node - # - # source://prism//lib/prism/dsl.rb#334 - def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new GlobalVariableAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#339 - def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new GlobalVariableOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#344 - def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new GlobalVariableOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#349 - def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new GlobalVariableReadNode node - # - # source://prism//lib/prism/dsl.rb#354 - def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new GlobalVariableTargetNode node - # - # source://prism//lib/prism/dsl.rb#359 - def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new GlobalVariableWriteNode node - # - # source://prism//lib/prism/dsl.rb#364 - def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new HashNode node - # - # source://prism//lib/prism/dsl.rb#369 - def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new HashPatternNode node - # - # source://prism//lib/prism/dsl.rb#374 - def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new IfNode node - # - # source://prism//lib/prism/dsl.rb#379 - def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ImaginaryNode node - # - # source://prism//lib/prism/dsl.rb#384 - def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ImplicitNode node - # - # source://prism//lib/prism/dsl.rb#389 - def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ImplicitRestNode node - # - # source://prism//lib/prism/dsl.rb#394 - def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InNode node - # - # source://prism//lib/prism/dsl.rb#399 - def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new IndexAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#404 - def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new IndexOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#409 - def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new IndexOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#414 - def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new IndexTargetNode node - # - # source://prism//lib/prism/dsl.rb#419 - def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InstanceVariableAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#424 - def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InstanceVariableOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#429 - def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InstanceVariableOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#434 - def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InstanceVariableReadNode node - # - # source://prism//lib/prism/dsl.rb#439 - def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InstanceVariableTargetNode node - # - # source://prism//lib/prism/dsl.rb#444 - def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InstanceVariableWriteNode node - # - # source://prism//lib/prism/dsl.rb#449 - def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new IntegerNode node - # - # source://prism//lib/prism/dsl.rb#454 - def IntegerNode(flags, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InterpolatedMatchLastLineNode node - # - # source://prism//lib/prism/dsl.rb#459 - def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InterpolatedRegularExpressionNode node - # - # source://prism//lib/prism/dsl.rb#464 - def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InterpolatedStringNode node - # - # source://prism//lib/prism/dsl.rb#469 - def InterpolatedStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InterpolatedSymbolNode node - # - # source://prism//lib/prism/dsl.rb#474 - def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new InterpolatedXStringNode node - # - # source://prism//lib/prism/dsl.rb#479 - def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new KeywordHashNode node - # - # source://prism//lib/prism/dsl.rb#484 - def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new KeywordRestParameterNode node - # - # source://prism//lib/prism/dsl.rb#489 - def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new LambdaNode node - # - # source://prism//lib/prism/dsl.rb#494 - def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new LocalVariableAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#499 - def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#504 - def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new LocalVariableOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#509 - def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new LocalVariableReadNode node - # - # source://prism//lib/prism/dsl.rb#514 - def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new LocalVariableTargetNode node - # - # source://prism//lib/prism/dsl.rb#519 - def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new LocalVariableWriteNode node - # - # source://prism//lib/prism/dsl.rb#524 - def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new Location object - # - # source://prism//lib/prism/dsl.rb#44 - def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end - - # Create a new MatchLastLineNode node - # - # source://prism//lib/prism/dsl.rb#529 - def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new MatchPredicateNode node - # - # source://prism//lib/prism/dsl.rb#534 - def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new MatchRequiredNode node - # - # source://prism//lib/prism/dsl.rb#539 - def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new MatchWriteNode node - # - # source://prism//lib/prism/dsl.rb#544 - def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new MissingNode node - # - # source://prism//lib/prism/dsl.rb#549 - def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ModuleNode node - # - # source://prism//lib/prism/dsl.rb#554 - def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new MultiTargetNode node - # - # source://prism//lib/prism/dsl.rb#559 - def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new MultiWriteNode node - # - # source://prism//lib/prism/dsl.rb#564 - def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new NextNode node - # - # source://prism//lib/prism/dsl.rb#569 - def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new NilNode node - # - # source://prism//lib/prism/dsl.rb#574 - def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new NoKeywordsParameterNode node - # - # source://prism//lib/prism/dsl.rb#579 - def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new NumberedParametersNode node - # - # source://prism//lib/prism/dsl.rb#584 - def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new NumberedReferenceReadNode node - # - # source://prism//lib/prism/dsl.rb#589 - def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new OptionalKeywordParameterNode node - # - # source://prism//lib/prism/dsl.rb#594 - def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new OptionalParameterNode node - # - # source://prism//lib/prism/dsl.rb#599 - def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new OrNode node - # - # source://prism//lib/prism/dsl.rb#604 - def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ParametersNode node - # - # source://prism//lib/prism/dsl.rb#609 - def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ParenthesesNode node - # - # source://prism//lib/prism/dsl.rb#614 - def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new PinnedExpressionNode node - # - # source://prism//lib/prism/dsl.rb#619 - def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new PinnedVariableNode node - # - # source://prism//lib/prism/dsl.rb#624 - def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new PostExecutionNode node - # - # source://prism//lib/prism/dsl.rb#629 - def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new PreExecutionNode node - # - # source://prism//lib/prism/dsl.rb#634 - def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ProgramNode node - # - # source://prism//lib/prism/dsl.rb#639 - def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RangeNode node - # - # source://prism//lib/prism/dsl.rb#644 - def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RationalNode node - # - # source://prism//lib/prism/dsl.rb#649 - def RationalNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RedoNode node - # - # source://prism//lib/prism/dsl.rb#654 - def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RegularExpressionNode node - # - # source://prism//lib/prism/dsl.rb#659 - def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RequiredKeywordParameterNode node - # - # source://prism//lib/prism/dsl.rb#664 - def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RequiredParameterNode node - # - # source://prism//lib/prism/dsl.rb#669 - def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RescueModifierNode node - # - # source://prism//lib/prism/dsl.rb#674 - def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RescueNode node - # - # source://prism//lib/prism/dsl.rb#679 - def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RestParameterNode node - # - # source://prism//lib/prism/dsl.rb#684 - def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new RetryNode node - # - # source://prism//lib/prism/dsl.rb#689 - def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new ReturnNode node - # - # source://prism//lib/prism/dsl.rb#694 - def ReturnNode(keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new SelfNode node - # - # source://prism//lib/prism/dsl.rb#699 - def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new SingletonClassNode node - # - # source://prism//lib/prism/dsl.rb#704 - def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new SourceEncodingNode node - # - # source://prism//lib/prism/dsl.rb#709 - def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new SourceFileNode node - # - # source://prism//lib/prism/dsl.rb#714 - def SourceFileNode(filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new SourceLineNode node - # - # source://prism//lib/prism/dsl.rb#719 - def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new SplatNode node - # - # source://prism//lib/prism/dsl.rb#724 - def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new StatementsNode node - # - # source://prism//lib/prism/dsl.rb#729 - def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new StringNode node - # - # source://prism//lib/prism/dsl.rb#734 - def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new SuperNode node - # - # source://prism//lib/prism/dsl.rb#739 - def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new SymbolNode node - # - # source://prism//lib/prism/dsl.rb#744 - def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new TrueNode node - # - # source://prism//lib/prism/dsl.rb#749 - def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new UndefNode node - # - # source://prism//lib/prism/dsl.rb#754 - def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new UnlessNode node - # - # source://prism//lib/prism/dsl.rb#759 - def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new UntilNode node - # - # source://prism//lib/prism/dsl.rb#764 - def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new WhenNode node - # - # source://prism//lib/prism/dsl.rb#769 - def WhenNode(keyword_loc, conditions, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new WhileNode node - # - # source://prism//lib/prism/dsl.rb#774 - def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new XStringNode node - # - # source://prism//lib/prism/dsl.rb#779 - def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end - - # Create a new YieldNode node - # - # source://prism//lib/prism/dsl.rb#784 - def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end -end - -# This module is used for testing and debugging and is not meant to be used by -# consumers of this library. -# -# source://prism//lib/prism/debug.rb#6 -module Prism::Debug - class << self - # :call-seq: - # Debug::cruby_locals(source) -> Array - # - # For the given source, compiles with CRuby and returns a list of all of the - # sets of local variables that were encountered. - # - # source://prism//lib/prism/debug.rb#54 - def cruby_locals(source); end - - def format_errors(_arg0, _arg1); end - def inspect_node(_arg0); end - def memsize(_arg0); end - def named_captures(_arg0); end - - # :call-seq: - # Debug::newlines(source) -> Array - # - # For the given source string, return the byte offsets of every newline in - # the source. - # - # source://prism//lib/prism/debug.rb#202 - def newlines(source); end - - # :call-seq: - # Debug::prism_locals(source) -> Array - # - # For the given source, parses with prism and returns a list of all of the - # sets of local variables that were encountered. - # - # source://prism//lib/prism/debug.rb#98 - def prism_locals(source); end - - def profile_file(_arg0); end - end -end - -# Used to hold the place of a local that will be in the local table but -# cannot be accessed directly from the source code. For example, the -# iteration variable in a for loop or the positional parameter on a method -# definition that is destructured. -# -# source://prism//lib/prism/debug.rb#90 -Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) - -# A wrapper around a RubyVM::InstructionSequence that provides a more -# convenient interface for accessing parts of the iseq. -# -# source://prism//lib/prism/debug.rb#9 -class Prism::Debug::ISeq - # @return [ISeq] a new instance of ISeq - # - # source://prism//lib/prism/debug.rb#12 - def initialize(parts); end - - # source://prism//lib/prism/debug.rb#28 - def each_child; end - - # source://prism//lib/prism/debug.rb#24 - def instructions; end - - # source://prism//lib/prism/debug.rb#20 - def local_table; end - - # source://prism//lib/prism/debug.rb#10 - def parts; end - - # source://prism//lib/prism/debug.rb#16 - def type; end -end - -# Represents a method definition. -# -# def method -# end -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5889 -class Prism::DefNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node? receiver, ParametersNode? parameters, Node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, Location location) -> void - # - # @return [DefNode] a new instance of DefNode - # - # source://prism//lib/prism/node.rb#5891 - def initialize(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5910 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#5977 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5915 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5929 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5920 - def compact_child_nodes; end - - # def copy: (**params) -> DefNode - # - # source://prism//lib/prism/node.rb#5934 - sig { params(params: T.untyped).returns(Prism::DefNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5915 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#5957 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def def_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6050 - sig { returns(String) } - def def_keyword; end - - # attr_reader def_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5983 - sig { returns(Prism::Location) } - def def_keyword_loc; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#6075 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#6037 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # def equal: () -> String? - # - # source://prism//lib/prism/node.rb#6070 - sig { returns(T.nilable(String)) } - def equal; end - - # attr_reader equal_loc: Location? - # - # source://prism//lib/prism/node.rb#6025 - sig { returns(T.nilable(Prism::Location)) } - def equal_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#6080 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#5980 - sig { returns(T::Array[Symbol]) } - def locals; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#6060 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#6001 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5962 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#5965 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#6055 - sig { returns(T.nilable(String)) } - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#5989 - sig { returns(T.nilable(Prism::Location)) } - def operator_loc; end - - # attr_reader parameters: ParametersNode? - # - # source://prism//lib/prism/node.rb#5974 - sig { returns(T.nilable(Prism::ParametersNode)) } - def parameters; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#5971 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#6065 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#6013 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6126 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6136 - def type; end - end -end - -# Represents the use of the `defined?` keyword. -# -# defined?(a) -# ^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6145 -class Prism::DefinedNode < ::Prism::Node - # def initialize: (Location? lparen_loc, Node value, Location? rparen_loc, Location keyword_loc, Location location) -> void - # - # @return [DefinedNode] a new instance of DefinedNode - # - # source://prism//lib/prism/node.rb#6147 - def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6158 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6173 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6168 - def compact_child_nodes; end - - # def copy: (**params) -> DefinedNode - # - # source://prism//lib/prism/node.rb#6178 - sig { params(params: T.untyped).returns(Prism::DefinedNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#6193 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#6247 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#6242 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#6225 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#6232 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#6198 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#6237 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#6213 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6271 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#6210 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6281 - def type; end - end -end - -# source://prism//lib/prism/desugar_compiler.rb#4 -class Prism::DesugarAndWriteNode - # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#7 - def initialize(node, source, read_class, write_class, *arguments); end - - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#5 - def arguments; end - - # Desugar `x &&= y` to `x && x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#16 - def compile; end - - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#5 - def node; end - - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#5 - def read_class; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#5 - def source; end - - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#5 - def write_class; end -end - -# DesugarCompiler is a compiler that desugars Ruby code into a more primitive -# form. This is useful for consumers that want to deal with fewer node types. -# -# source://prism//lib/prism/desugar_compiler.rb#216 -class Prism::DesugarCompiler < ::Prism::MutationCompiler - # @@foo &&= bar - # - # becomes - # - # @@foo && @@foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#222 - def visit_class_variable_and_write_node(node); end - - # @@foo += bar - # - # becomes - # - # @@foo = @@foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#240 - def visit_class_variable_operator_write_node(node); end - - # @@foo ||= bar - # - # becomes - # - # defined?(@@foo) ? @@foo : @@foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#231 - def visit_class_variable_or_write_node(node); end - - # Foo &&= bar - # - # becomes - # - # Foo && Foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#249 - def visit_constant_and_write_node(node); end - - # Foo += bar - # - # becomes - # - # Foo = Foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#267 - def visit_constant_operator_write_node(node); end - - # Foo ||= bar - # - # becomes - # - # defined?(Foo) ? Foo : Foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#258 - def visit_constant_or_write_node(node); end - - # $foo &&= bar - # - # becomes - # - # $foo && $foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#276 - def visit_global_variable_and_write_node(node); end - - # $foo += bar - # - # becomes - # - # $foo = $foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#294 - def visit_global_variable_operator_write_node(node); end - - # $foo ||= bar - # - # becomes - # - # defined?($foo) ? $foo : $foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#285 - def visit_global_variable_or_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#303 - def visit_instance_variable_and_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#321 - def visit_instance_variable_operator_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#312 - def visit_instance_variable_or_write_node(node); end - - # foo &&= bar - # - # becomes - # - # foo && foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#330 - def visit_local_variable_and_write_node(node); end - - # foo += bar - # - # becomes - # - # foo = foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#348 - def visit_local_variable_operator_write_node(node); end - - # foo ||= bar - # - # becomes - # - # foo || foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#339 - def visit_local_variable_or_write_node(node); end -end - -# source://prism//lib/prism/desugar_compiler.rb#63 -class Prism::DesugarOperatorWriteNode - # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#66 - def initialize(node, source, read_class, write_class, *arguments); end - - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#64 - def arguments; end - - # Desugar `x += y` to `x = x + y` - # - # source://prism//lib/prism/desugar_compiler.rb#75 - def compile; end - - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#64 - def node; end - - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#64 - def read_class; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#64 - def source; end - - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#64 - def write_class; end -end - -# source://prism//lib/prism/desugar_compiler.rb#27 -class Prism::DesugarOrWriteDefinedNode - # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode - # - # source://prism//lib/prism/desugar_compiler.rb#30 - def initialize(node, source, read_class, write_class, *arguments); end - - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#28 - def arguments; end - - # Desugar `x ||= y` to `defined?(x) ? x : x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#39 - def compile; end - - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#28 - def node; end - - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#28 - def read_class; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#28 - def source; end - - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#28 - def write_class; end -end - -# source://prism//lib/prism/desugar_compiler.rb#99 -class Prism::DesugarOrWriteNode - # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#102 - def initialize(node, source, read_class, write_class, *arguments); end - - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#100 - def arguments; end - - # Desugar `x ||= y` to `x || x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#111 - def compile; end - - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#100 - def node; end - - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#100 - def read_class; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#100 - def source; end - - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#100 - def write_class; end -end - -# The dispatcher class fires events for nodes that are found while walking an -# AST to all registered listeners. It's useful for performing different types -# of analysis on the AST while only having to walk the tree once. -# -# To use the dispatcher, you would first instantiate it and register listeners -# for the events you're interested in: -# -# class OctalListener -# def on_integer_node_enter(node) -# if node.octal? && !node.slice.start_with?("0o") -# warn("Octal integers should be written with the 0o prefix") -# end -# end -# end -# -# dispatcher = Dispatcher.new -# dispatcher.register(listener, :on_integer_node_enter) -# -# Then, you can walk any number of trees and dispatch events to the listeners: -# -# result = Prism.parse("001 + 002 + 003") -# dispatcher.dispatch(result.value) -# -# Optionally, you can also use `#dispatch_once` to dispatch enter and leave -# events for a single node without recursing further down the tree. This can -# be useful in circumstances where you want to reuse the listeners you already -# have registers but want to stop walking the tree at a certain point. -# -# integer = result.value.statements.body.first.receiver.receiver -# dispatcher.dispatch_once(integer) -# -# source://prism//lib/prism/dispatcher.rb#40 -class Prism::Dispatcher < ::Prism::Visitor - # Initialize a new dispatcher. - # - # @return [Dispatcher] a new instance of Dispatcher - # - # source://prism//lib/prism/dispatcher.rb#45 - def initialize; end - - # Walks `root` dispatching events to all registered listeners. - # - # def dispatch: (Node) -> void - # - # source://prism//lib/prism/visitor.rb#16 - def dispatch(node); end - - # Dispatches a single event for `node` to all registered listeners. - # - # def dispatch_once: (Node) -> void - # - # source://prism//lib/prism/dispatcher.rb#64 - def dispatch_once(node); end - - # attr_reader listeners: Hash[Symbol, Array[Listener]] - # - # source://prism//lib/prism/dispatcher.rb#42 - def listeners; end - - # Register a listener for one or more events. - # - # def register: (Listener, *Symbol) -> void - # - # source://prism//lib/prism/dispatcher.rb#52 - def register(listener, *events); end - - # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#70 - def visit_alias_global_variable_node(node); end - - # Dispatch enter and leave events for AliasMethodNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#78 - def visit_alias_method_node(node); end - - # Dispatch enter and leave events for AlternationPatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#86 - def visit_alternation_pattern_node(node); end - - # Dispatch enter and leave events for AndNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#94 - def visit_and_node(node); end - - # Dispatch enter and leave events for ArgumentsNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#102 - def visit_arguments_node(node); end - - # Dispatch enter and leave events for ArrayNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#110 - def visit_array_node(node); end - - # Dispatch enter and leave events for ArrayPatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#118 - def visit_array_pattern_node(node); end - - # Dispatch enter and leave events for AssocNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#126 - def visit_assoc_node(node); end - - # Dispatch enter and leave events for AssocSplatNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#134 - def visit_assoc_splat_node(node); end - - # Dispatch enter and leave events for BackReferenceReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#142 - def visit_back_reference_read_node(node); end - - # Dispatch enter and leave events for BeginNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#150 - def visit_begin_node(node); end - - # Dispatch enter and leave events for BlockArgumentNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#158 - def visit_block_argument_node(node); end - - # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#166 - def visit_block_local_variable_node(node); end - - # Dispatch enter and leave events for BlockNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#174 - def visit_block_node(node); end - - # Dispatch enter and leave events for BlockParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#182 - def visit_block_parameter_node(node); end - - # Dispatch enter and leave events for BlockParametersNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#190 - def visit_block_parameters_node(node); end - - # Dispatch enter and leave events for BreakNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#198 - def visit_break_node(node); end - - # Dispatch enter and leave events for CallAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#206 - def visit_call_and_write_node(node); end - - # Dispatch enter and leave events for CallNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#214 - def visit_call_node(node); end - - # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#222 - def visit_call_operator_write_node(node); end - - # Dispatch enter and leave events for CallOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#230 - def visit_call_or_write_node(node); end - - # Dispatch enter and leave events for CallTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#238 - def visit_call_target_node(node); end - - # Dispatch enter and leave events for CapturePatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#246 - def visit_capture_pattern_node(node); end - - # Dispatch enter and leave events for CaseMatchNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#254 - def visit_case_match_node(node); end - - # Dispatch enter and leave events for CaseNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#262 - def visit_case_node(node); end - - # Dispatch enter and leave events for ClassNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#270 - def visit_class_node(node); end - - # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#278 - def visit_class_variable_and_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#286 - def visit_class_variable_operator_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#294 - def visit_class_variable_or_write_node(node); end - - # Dispatch enter and leave events for ClassVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#302 - def visit_class_variable_read_node(node); end - - # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#310 - def visit_class_variable_target_node(node); end - - # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#318 - def visit_class_variable_write_node(node); end - - # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#326 - def visit_constant_and_write_node(node); end - - # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#334 - def visit_constant_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#342 - def visit_constant_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#350 - def visit_constant_path_and_write_node(node); end - - # Dispatch enter and leave events for ConstantPathNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#358 - def visit_constant_path_node(node); end - - # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#366 - def visit_constant_path_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#374 - def visit_constant_path_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#382 - def visit_constant_path_target_node(node); end - - # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#390 - def visit_constant_path_write_node(node); end - - # Dispatch enter and leave events for ConstantReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#398 - def visit_constant_read_node(node); end - - # Dispatch enter and leave events for ConstantTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#406 - def visit_constant_target_node(node); end - - # Dispatch enter and leave events for ConstantWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#414 - def visit_constant_write_node(node); end - - # Dispatch enter and leave events for DefNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#422 - def visit_def_node(node); end - - # Dispatch enter and leave events for DefinedNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#430 - def visit_defined_node(node); end - - # Dispatch enter and leave events for ElseNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#438 - def visit_else_node(node); end - - # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#446 - def visit_embedded_statements_node(node); end - - # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#454 - def visit_embedded_variable_node(node); end - - # Dispatch enter and leave events for EnsureNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#462 - def visit_ensure_node(node); end - - # Dispatch enter and leave events for FalseNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#470 - def visit_false_node(node); end - - # Dispatch enter and leave events for FindPatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#478 - def visit_find_pattern_node(node); end - - # Dispatch enter and leave events for FlipFlopNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#486 - def visit_flip_flop_node(node); end - - # Dispatch enter and leave events for FloatNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#494 - def visit_float_node(node); end - - # Dispatch enter and leave events for ForNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#502 - def visit_for_node(node); end - - # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#510 - def visit_forwarding_arguments_node(node); end - - # Dispatch enter and leave events for ForwardingParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#518 - def visit_forwarding_parameter_node(node); end - - # Dispatch enter and leave events for ForwardingSuperNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#526 - def visit_forwarding_super_node(node); end - - # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#534 - def visit_global_variable_and_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#542 - def visit_global_variable_operator_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#550 - def visit_global_variable_or_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#558 - def visit_global_variable_read_node(node); end - - # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#566 - def visit_global_variable_target_node(node); end - - # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#574 - def visit_global_variable_write_node(node); end - - # Dispatch enter and leave events for HashNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#582 - def visit_hash_node(node); end - - # Dispatch enter and leave events for HashPatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#590 - def visit_hash_pattern_node(node); end - - # Dispatch enter and leave events for IfNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#598 - def visit_if_node(node); end - - # Dispatch enter and leave events for ImaginaryNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#606 - def visit_imaginary_node(node); end - - # Dispatch enter and leave events for ImplicitNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#614 - def visit_implicit_node(node); end - - # Dispatch enter and leave events for ImplicitRestNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#622 - def visit_implicit_rest_node(node); end - - # Dispatch enter and leave events for InNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#630 - def visit_in_node(node); end - - # Dispatch enter and leave events for IndexAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#638 - def visit_index_and_write_node(node); end - - # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#646 - def visit_index_operator_write_node(node); end - - # Dispatch enter and leave events for IndexOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#654 - def visit_index_or_write_node(node); end - - # Dispatch enter and leave events for IndexTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#662 - def visit_index_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#670 - def visit_instance_variable_and_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#678 - def visit_instance_variable_operator_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#686 - def visit_instance_variable_or_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#694 - def visit_instance_variable_read_node(node); end - - # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#702 - def visit_instance_variable_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#710 - def visit_instance_variable_write_node(node); end - - # Dispatch enter and leave events for IntegerNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#718 - def visit_integer_node(node); end - - # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#726 - def visit_interpolated_match_last_line_node(node); end - - # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#734 - def visit_interpolated_regular_expression_node(node); end - - # Dispatch enter and leave events for InterpolatedStringNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#742 - def visit_interpolated_string_node(node); end - - # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#750 - def visit_interpolated_symbol_node(node); end - - # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#758 - def visit_interpolated_x_string_node(node); end - - # Dispatch enter and leave events for KeywordHashNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#766 - def visit_keyword_hash_node(node); end - - # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#774 - def visit_keyword_rest_parameter_node(node); end - - # Dispatch enter and leave events for LambdaNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#782 - def visit_lambda_node(node); end - - # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#790 - def visit_local_variable_and_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#798 - def visit_local_variable_operator_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#806 - def visit_local_variable_or_write_node(node); end - - # Dispatch enter and leave events for LocalVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#814 - def visit_local_variable_read_node(node); end - - # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#822 - def visit_local_variable_target_node(node); end - - # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#830 - def visit_local_variable_write_node(node); end - - # Dispatch enter and leave events for MatchLastLineNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#838 - def visit_match_last_line_node(node); end - - # Dispatch enter and leave events for MatchPredicateNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#846 - def visit_match_predicate_node(node); end - - # Dispatch enter and leave events for MatchRequiredNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#854 - def visit_match_required_node(node); end - - # Dispatch enter and leave events for MatchWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#862 - def visit_match_write_node(node); end - - # Dispatch enter and leave events for MissingNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#870 - def visit_missing_node(node); end - - # Dispatch enter and leave events for ModuleNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#878 - def visit_module_node(node); end - - # Dispatch enter and leave events for MultiTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#886 - def visit_multi_target_node(node); end - - # Dispatch enter and leave events for MultiWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#894 - def visit_multi_write_node(node); end - - # Dispatch enter and leave events for NextNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#902 - def visit_next_node(node); end - - # Dispatch enter and leave events for NilNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#910 - def visit_nil_node(node); end - - # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#918 - def visit_no_keywords_parameter_node(node); end - - # Dispatch enter and leave events for NumberedParametersNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#926 - def visit_numbered_parameters_node(node); end - - # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#934 - def visit_numbered_reference_read_node(node); end - - # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#942 - def visit_optional_keyword_parameter_node(node); end - - # Dispatch enter and leave events for OptionalParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#950 - def visit_optional_parameter_node(node); end - - # Dispatch enter and leave events for OrNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#958 - def visit_or_node(node); end - - # Dispatch enter and leave events for ParametersNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#966 - def visit_parameters_node(node); end - - # Dispatch enter and leave events for ParenthesesNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#974 - def visit_parentheses_node(node); end - - # Dispatch enter and leave events for PinnedExpressionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#982 - def visit_pinned_expression_node(node); end - - # Dispatch enter and leave events for PinnedVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#990 - def visit_pinned_variable_node(node); end - - # Dispatch enter and leave events for PostExecutionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#998 - def visit_post_execution_node(node); end - - # Dispatch enter and leave events for PreExecutionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1006 - def visit_pre_execution_node(node); end - - # Dispatch enter and leave events for ProgramNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1014 - def visit_program_node(node); end - - # Dispatch enter and leave events for RangeNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1022 - def visit_range_node(node); end - - # Dispatch enter and leave events for RationalNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1030 - def visit_rational_node(node); end - - # Dispatch enter and leave events for RedoNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1038 - def visit_redo_node(node); end - - # Dispatch enter and leave events for RegularExpressionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1046 - def visit_regular_expression_node(node); end - - # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1054 - def visit_required_keyword_parameter_node(node); end - - # Dispatch enter and leave events for RequiredParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1062 - def visit_required_parameter_node(node); end - - # Dispatch enter and leave events for RescueModifierNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1070 - def visit_rescue_modifier_node(node); end - - # Dispatch enter and leave events for RescueNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1078 - def visit_rescue_node(node); end - - # Dispatch enter and leave events for RestParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1086 - def visit_rest_parameter_node(node); end - - # Dispatch enter and leave events for RetryNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1094 - def visit_retry_node(node); end - - # Dispatch enter and leave events for ReturnNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1102 - def visit_return_node(node); end - - # Dispatch enter and leave events for SelfNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1110 - def visit_self_node(node); end - - # Dispatch enter and leave events for SingletonClassNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1118 - def visit_singleton_class_node(node); end - - # Dispatch enter and leave events for SourceEncodingNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1126 - def visit_source_encoding_node(node); end - - # Dispatch enter and leave events for SourceFileNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1134 - def visit_source_file_node(node); end - - # Dispatch enter and leave events for SourceLineNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1142 - def visit_source_line_node(node); end - - # Dispatch enter and leave events for SplatNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1150 - def visit_splat_node(node); end - - # Dispatch enter and leave events for StatementsNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1158 - def visit_statements_node(node); end - - # Dispatch enter and leave events for StringNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1166 - def visit_string_node(node); end - - # Dispatch enter and leave events for SuperNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1174 - def visit_super_node(node); end - - # Dispatch enter and leave events for SymbolNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1182 - def visit_symbol_node(node); end - - # Dispatch enter and leave events for TrueNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1190 - def visit_true_node(node); end - - # Dispatch enter and leave events for UndefNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1198 - def visit_undef_node(node); end - - # Dispatch enter and leave events for UnlessNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1206 - def visit_unless_node(node); end - - # Dispatch enter and leave events for UntilNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1214 - def visit_until_node(node); end - - # Dispatch enter and leave events for WhenNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1222 - def visit_when_node(node); end - - # Dispatch enter and leave events for WhileNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1230 - def visit_while_node(node); end - - # Dispatch enter and leave events for XStringNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1238 - def visit_x_string_node(node); end - - # Dispatch enter and leave events for YieldNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1246 - def visit_yield_node(node); end -end - -# source://prism//lib/prism/dispatcher.rb#1252 -class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor - # @return [DispatchOnce] a new instance of DispatchOnce - # - # source://prism//lib/prism/dispatcher.rb#1255 - def initialize(listeners); end - - # Returns the value of attribute listeners. - # - # source://prism//lib/prism/dispatcher.rb#1253 - def listeners; end - - # Dispatch enter and leave events for AliasGlobalVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1260 - def visit_alias_global_variable_node(node); end - - # Dispatch enter and leave events for AliasMethodNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1266 - def visit_alias_method_node(node); end - - # Dispatch enter and leave events for AlternationPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1272 - def visit_alternation_pattern_node(node); end - - # Dispatch enter and leave events for AndNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1278 - def visit_and_node(node); end - - # Dispatch enter and leave events for ArgumentsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1284 - def visit_arguments_node(node); end - - # Dispatch enter and leave events for ArrayNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1290 - def visit_array_node(node); end - - # Dispatch enter and leave events for ArrayPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1296 - def visit_array_pattern_node(node); end - - # Dispatch enter and leave events for AssocNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1302 - def visit_assoc_node(node); end - - # Dispatch enter and leave events for AssocSplatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1308 - def visit_assoc_splat_node(node); end - - # Dispatch enter and leave events for BackReferenceReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1314 - def visit_back_reference_read_node(node); end - - # Dispatch enter and leave events for BeginNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1320 - def visit_begin_node(node); end - - # Dispatch enter and leave events for BlockArgumentNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1326 - def visit_block_argument_node(node); end - - # Dispatch enter and leave events for BlockLocalVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1332 - def visit_block_local_variable_node(node); end - - # Dispatch enter and leave events for BlockNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1338 - def visit_block_node(node); end - - # Dispatch enter and leave events for BlockParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1344 - def visit_block_parameter_node(node); end - - # Dispatch enter and leave events for BlockParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1350 - def visit_block_parameters_node(node); end - - # Dispatch enter and leave events for BreakNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1356 - def visit_break_node(node); end - - # Dispatch enter and leave events for CallAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1362 - def visit_call_and_write_node(node); end - - # Dispatch enter and leave events for CallNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1368 - def visit_call_node(node); end - - # Dispatch enter and leave events for CallOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1374 - def visit_call_operator_write_node(node); end - - # Dispatch enter and leave events for CallOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1380 - def visit_call_or_write_node(node); end - - # Dispatch enter and leave events for CallTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1386 - def visit_call_target_node(node); end - - # Dispatch enter and leave events for CapturePatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1392 - def visit_capture_pattern_node(node); end - - # Dispatch enter and leave events for CaseMatchNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1398 - def visit_case_match_node(node); end - - # Dispatch enter and leave events for CaseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1404 - def visit_case_node(node); end - - # Dispatch enter and leave events for ClassNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1410 - def visit_class_node(node); end - - # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1416 - def visit_class_variable_and_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1422 - def visit_class_variable_operator_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1428 - def visit_class_variable_or_write_node(node); end - - # Dispatch enter and leave events for ClassVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1434 - def visit_class_variable_read_node(node); end - - # Dispatch enter and leave events for ClassVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1440 - def visit_class_variable_target_node(node); end - - # Dispatch enter and leave events for ClassVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1446 - def visit_class_variable_write_node(node); end - - # Dispatch enter and leave events for ConstantAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1452 - def visit_constant_and_write_node(node); end - - # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1458 - def visit_constant_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1464 - def visit_constant_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1470 - def visit_constant_path_and_write_node(node); end - - # Dispatch enter and leave events for ConstantPathNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1476 - def visit_constant_path_node(node); end - - # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1482 - def visit_constant_path_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1488 - def visit_constant_path_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1494 - def visit_constant_path_target_node(node); end - - # Dispatch enter and leave events for ConstantPathWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1500 - def visit_constant_path_write_node(node); end - - # Dispatch enter and leave events for ConstantReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1506 - def visit_constant_read_node(node); end - - # Dispatch enter and leave events for ConstantTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1512 - def visit_constant_target_node(node); end - - # Dispatch enter and leave events for ConstantWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1518 - def visit_constant_write_node(node); end - - # Dispatch enter and leave events for DefNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1524 - def visit_def_node(node); end - - # Dispatch enter and leave events for DefinedNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1530 - def visit_defined_node(node); end - - # Dispatch enter and leave events for ElseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1536 - def visit_else_node(node); end - - # Dispatch enter and leave events for EmbeddedStatementsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1542 - def visit_embedded_statements_node(node); end - - # Dispatch enter and leave events for EmbeddedVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1548 - def visit_embedded_variable_node(node); end - - # Dispatch enter and leave events for EnsureNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1554 - def visit_ensure_node(node); end - - # Dispatch enter and leave events for FalseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1560 - def visit_false_node(node); end - - # Dispatch enter and leave events for FindPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1566 - def visit_find_pattern_node(node); end - - # Dispatch enter and leave events for FlipFlopNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1572 - def visit_flip_flop_node(node); end - - # Dispatch enter and leave events for FloatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1578 - def visit_float_node(node); end - - # Dispatch enter and leave events for ForNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1584 - def visit_for_node(node); end - - # Dispatch enter and leave events for ForwardingArgumentsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1590 - def visit_forwarding_arguments_node(node); end - - # Dispatch enter and leave events for ForwardingParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1596 - def visit_forwarding_parameter_node(node); end - - # Dispatch enter and leave events for ForwardingSuperNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1602 - def visit_forwarding_super_node(node); end - - # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1608 - def visit_global_variable_and_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1614 - def visit_global_variable_operator_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1620 - def visit_global_variable_or_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1626 - def visit_global_variable_read_node(node); end - - # Dispatch enter and leave events for GlobalVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1632 - def visit_global_variable_target_node(node); end - - # Dispatch enter and leave events for GlobalVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1638 - def visit_global_variable_write_node(node); end - - # Dispatch enter and leave events for HashNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1644 - def visit_hash_node(node); end - - # Dispatch enter and leave events for HashPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1650 - def visit_hash_pattern_node(node); end - - # Dispatch enter and leave events for IfNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1656 - def visit_if_node(node); end - - # Dispatch enter and leave events for ImaginaryNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1662 - def visit_imaginary_node(node); end - - # Dispatch enter and leave events for ImplicitNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1668 - def visit_implicit_node(node); end - - # Dispatch enter and leave events for ImplicitRestNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1674 - def visit_implicit_rest_node(node); end - - # Dispatch enter and leave events for InNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1680 - def visit_in_node(node); end - - # Dispatch enter and leave events for IndexAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1686 - def visit_index_and_write_node(node); end - - # Dispatch enter and leave events for IndexOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1692 - def visit_index_operator_write_node(node); end - - # Dispatch enter and leave events for IndexOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1698 - def visit_index_or_write_node(node); end - - # Dispatch enter and leave events for IndexTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1704 - def visit_index_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1710 - def visit_instance_variable_and_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1716 - def visit_instance_variable_operator_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1722 - def visit_instance_variable_or_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1728 - def visit_instance_variable_read_node(node); end - - # Dispatch enter and leave events for InstanceVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1734 - def visit_instance_variable_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1740 - def visit_instance_variable_write_node(node); end - - # Dispatch enter and leave events for IntegerNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1746 - def visit_integer_node(node); end - - # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1752 - def visit_interpolated_match_last_line_node(node); end - - # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1758 - def visit_interpolated_regular_expression_node(node); end - - # Dispatch enter and leave events for InterpolatedStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1764 - def visit_interpolated_string_node(node); end - - # Dispatch enter and leave events for InterpolatedSymbolNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1770 - def visit_interpolated_symbol_node(node); end - - # Dispatch enter and leave events for InterpolatedXStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1776 - def visit_interpolated_x_string_node(node); end - - # Dispatch enter and leave events for KeywordHashNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1782 - def visit_keyword_hash_node(node); end - - # Dispatch enter and leave events for KeywordRestParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1788 - def visit_keyword_rest_parameter_node(node); end - - # Dispatch enter and leave events for LambdaNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1794 - def visit_lambda_node(node); end - - # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1800 - def visit_local_variable_and_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1806 - def visit_local_variable_operator_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1812 - def visit_local_variable_or_write_node(node); end - - # Dispatch enter and leave events for LocalVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1818 - def visit_local_variable_read_node(node); end - - # Dispatch enter and leave events for LocalVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1824 - def visit_local_variable_target_node(node); end - - # Dispatch enter and leave events for LocalVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1830 - def visit_local_variable_write_node(node); end - - # Dispatch enter and leave events for MatchLastLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1836 - def visit_match_last_line_node(node); end - - # Dispatch enter and leave events for MatchPredicateNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1842 - def visit_match_predicate_node(node); end - - # Dispatch enter and leave events for MatchRequiredNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1848 - def visit_match_required_node(node); end - - # Dispatch enter and leave events for MatchWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1854 - def visit_match_write_node(node); end - - # Dispatch enter and leave events for MissingNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1860 - def visit_missing_node(node); end - - # Dispatch enter and leave events for ModuleNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1866 - def visit_module_node(node); end - - # Dispatch enter and leave events for MultiTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1872 - def visit_multi_target_node(node); end - - # Dispatch enter and leave events for MultiWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1878 - def visit_multi_write_node(node); end - - # Dispatch enter and leave events for NextNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1884 - def visit_next_node(node); end - - # Dispatch enter and leave events for NilNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1890 - def visit_nil_node(node); end - - # Dispatch enter and leave events for NoKeywordsParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1896 - def visit_no_keywords_parameter_node(node); end - - # Dispatch enter and leave events for NumberedParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1902 - def visit_numbered_parameters_node(node); end - - # Dispatch enter and leave events for NumberedReferenceReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1908 - def visit_numbered_reference_read_node(node); end - - # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1914 - def visit_optional_keyword_parameter_node(node); end - - # Dispatch enter and leave events for OptionalParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1920 - def visit_optional_parameter_node(node); end - - # Dispatch enter and leave events for OrNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1926 - def visit_or_node(node); end - - # Dispatch enter and leave events for ParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1932 - def visit_parameters_node(node); end - - # Dispatch enter and leave events for ParenthesesNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1938 - def visit_parentheses_node(node); end - - # Dispatch enter and leave events for PinnedExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1944 - def visit_pinned_expression_node(node); end - - # Dispatch enter and leave events for PinnedVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1950 - def visit_pinned_variable_node(node); end - - # Dispatch enter and leave events for PostExecutionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1956 - def visit_post_execution_node(node); end - - # Dispatch enter and leave events for PreExecutionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1962 - def visit_pre_execution_node(node); end - - # Dispatch enter and leave events for ProgramNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1968 - def visit_program_node(node); end - - # Dispatch enter and leave events for RangeNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1974 - def visit_range_node(node); end - - # Dispatch enter and leave events for RationalNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1980 - def visit_rational_node(node); end - - # Dispatch enter and leave events for RedoNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1986 - def visit_redo_node(node); end - - # Dispatch enter and leave events for RegularExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1992 - def visit_regular_expression_node(node); end - - # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1998 - def visit_required_keyword_parameter_node(node); end - - # Dispatch enter and leave events for RequiredParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2004 - def visit_required_parameter_node(node); end - - # Dispatch enter and leave events for RescueModifierNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2010 - def visit_rescue_modifier_node(node); end - - # Dispatch enter and leave events for RescueNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2016 - def visit_rescue_node(node); end - - # Dispatch enter and leave events for RestParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2022 - def visit_rest_parameter_node(node); end - - # Dispatch enter and leave events for RetryNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2028 - def visit_retry_node(node); end - - # Dispatch enter and leave events for ReturnNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2034 - def visit_return_node(node); end - - # Dispatch enter and leave events for SelfNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2040 - def visit_self_node(node); end - - # Dispatch enter and leave events for SingletonClassNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2046 - def visit_singleton_class_node(node); end - - # Dispatch enter and leave events for SourceEncodingNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2052 - def visit_source_encoding_node(node); end - - # Dispatch enter and leave events for SourceFileNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2058 - def visit_source_file_node(node); end - - # Dispatch enter and leave events for SourceLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2064 - def visit_source_line_node(node); end - - # Dispatch enter and leave events for SplatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2070 - def visit_splat_node(node); end - - # Dispatch enter and leave events for StatementsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2076 - def visit_statements_node(node); end - - # Dispatch enter and leave events for StringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2082 - def visit_string_node(node); end - - # Dispatch enter and leave events for SuperNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2088 - def visit_super_node(node); end - - # Dispatch enter and leave events for SymbolNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2094 - def visit_symbol_node(node); end - - # Dispatch enter and leave events for TrueNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2100 - def visit_true_node(node); end - - # Dispatch enter and leave events for UndefNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2106 - def visit_undef_node(node); end - - # Dispatch enter and leave events for UnlessNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2112 - def visit_unless_node(node); end - - # Dispatch enter and leave events for UntilNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2118 - def visit_until_node(node); end - - # Dispatch enter and leave events for WhenNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2124 - def visit_when_node(node); end - - # Dispatch enter and leave events for WhileNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2130 - def visit_while_node(node); end - - # Dispatch enter and leave events for XStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2136 - def visit_x_string_node(node); end - - # Dispatch enter and leave events for YieldNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2142 - def visit_yield_node(node); end -end - -# This visitor provides the ability to call Node#to_dot, which converts a -# subtree into a graphviz dot graph. -# -# source://prism//lib/prism/dot_visitor.rb#13 -class Prism::DotVisitor < ::Prism::Visitor - # Initialize a new dot visitor. - # - # @return [DotVisitor] a new instance of DotVisitor - # - # source://prism//lib/prism/dot_visitor.rb#105 - def initialize; end - - # The digraph that is being built. - # - # source://prism//lib/prism/dot_visitor.rb#102 - def digraph; end - - # Convert this visitor into a graphviz dot graph string. - # - # source://prism//lib/prism/dot_visitor.rb#110 - def to_dot; end - - # Visit a AliasGlobalVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#115 - def visit_alias_global_variable_node(node); end - - # Visit a AliasMethodNode node. - # - # source://prism//lib/prism/dot_visitor.rb#140 - def visit_alias_method_node(node); end - - # Visit a AlternationPatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#165 - def visit_alternation_pattern_node(node); end - - # Visit a AndNode node. - # - # source://prism//lib/prism/dot_visitor.rb#190 - def visit_and_node(node); end - - # Visit a ArgumentsNode node. - # - # source://prism//lib/prism/dot_visitor.rb#215 - def visit_arguments_node(node); end - - # Visit a ArrayNode node. - # - # source://prism//lib/prism/dot_visitor.rb#245 - def visit_array_node(node); end - - # Visit a ArrayPatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#285 - def visit_array_pattern_node(node); end - - # Visit a AssocNode node. - # - # source://prism//lib/prism/dot_visitor.rb#347 - def visit_assoc_node(node); end - - # Visit a AssocSplatNode node. - # - # source://prism//lib/prism/dot_visitor.rb#374 - def visit_assoc_splat_node(node); end - - # Visit a BackReferenceReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#397 - def visit_back_reference_read_node(node); end - - # Visit a BeginNode node. - # - # source://prism//lib/prism/dot_visitor.rb#414 - def visit_begin_node(node); end - - # Visit a BlockArgumentNode node. - # - # source://prism//lib/prism/dot_visitor.rb#462 - def visit_block_argument_node(node); end - - # Visit a BlockLocalVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#485 - def visit_block_local_variable_node(node); end - - # Visit a BlockNode node. - # - # source://prism//lib/prism/dot_visitor.rb#505 - def visit_block_node(node); end - - # Visit a BlockParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#540 - def visit_block_parameter_node(node); end - - # Visit a BlockParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#568 - def visit_block_parameters_node(node); end - - # Visit a BreakNode node. - # - # source://prism//lib/prism/dot_visitor.rb#611 - def visit_break_node(node); end - - # Visit a CallAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#634 - def visit_call_and_write_node(node); end - - # Visit a CallNode node. - # - # source://prism//lib/prism/dot_visitor.rb#680 - def visit_call_node(node); end - - # Visit a CallOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#738 - def visit_call_operator_write_node(node); end - - # Visit a CallOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#787 - def visit_call_or_write_node(node); end - - # Visit a CallTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#833 - def visit_call_target_node(node); end - - # Visit a CapturePatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#863 - def visit_capture_pattern_node(node); end - - # Visit a CaseMatchNode node. - # - # source://prism//lib/prism/dot_visitor.rb#888 - def visit_case_match_node(node); end - - # Visit a CaseNode node. - # - # source://prism//lib/prism/dot_visitor.rb#933 - def visit_case_node(node); end - - # Visit a ClassNode node. - # - # source://prism//lib/prism/dot_visitor.rb#978 - def visit_class_node(node); end - - # Visit a ClassVariableAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1025 - def visit_class_variable_and_write_node(node); end - - # Visit a ClassVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1052 - def visit_class_variable_operator_write_node(node); end - - # Visit a ClassVariableOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1082 - def visit_class_variable_or_write_node(node); end - - # Visit a ClassVariableReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1109 - def visit_class_variable_read_node(node); end - - # Visit a ClassVariableTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1126 - def visit_class_variable_target_node(node); end - - # Visit a ClassVariableWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1143 - def visit_class_variable_write_node(node); end - - # Visit a ConstantAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1172 - def visit_constant_and_write_node(node); end - - # Visit a ConstantOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1199 - def visit_constant_operator_write_node(node); end - - # Visit a ConstantOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1229 - def visit_constant_or_write_node(node); end - - # Visit a ConstantPathAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1256 - def visit_constant_path_and_write_node(node); end - - # Visit a ConstantPathNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1281 - def visit_constant_path_node(node); end - - # Visit a ConstantPathOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1308 - def visit_constant_path_operator_write_node(node); end - - # Visit a ConstantPathOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1336 - def visit_constant_path_or_write_node(node); end - - # Visit a ConstantPathTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1361 - def visit_constant_path_target_node(node); end - - # Visit a ConstantPathWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1388 - def visit_constant_path_write_node(node); end - - # Visit a ConstantReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1413 - def visit_constant_read_node(node); end - - # Visit a ConstantTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1430 - def visit_constant_target_node(node); end - - # Visit a ConstantWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1447 - def visit_constant_write_node(node); end - - # Visit a DefNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1474 - def visit_def_node(node); end - - # Visit a DefinedNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1543 - def visit_defined_node(node); end - - # Visit a ElseNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1574 - def visit_else_node(node); end - - # Visit a EmbeddedStatementsNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1602 - def visit_embedded_statements_node(node); end - - # Visit a EmbeddedVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1628 - def visit_embedded_variable_node(node); end - - # Visit a EnsureNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1649 - def visit_ensure_node(node); end - - # Visit a FalseNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1675 - def visit_false_node(node); end - - # Visit a FindPatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1689 - def visit_find_pattern_node(node); end - - # Visit a FlipFlopNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1740 - def visit_flip_flop_node(node); end - - # Visit a FloatNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1772 - def visit_float_node(node); end - - # Visit a ForNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1786 - def visit_for_node(node); end - - # Visit a ForwardingArgumentsNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1828 - def visit_forwarding_arguments_node(node); end - - # Visit a ForwardingParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1842 - def visit_forwarding_parameter_node(node); end - - # Visit a ForwardingSuperNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1856 - def visit_forwarding_super_node(node); end - - # Visit a GlobalVariableAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1876 - def visit_global_variable_and_write_node(node); end - - # Visit a GlobalVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1903 - def visit_global_variable_operator_write_node(node); end - - # Visit a GlobalVariableOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1933 - def visit_global_variable_or_write_node(node); end - - # Visit a GlobalVariableReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1960 - def visit_global_variable_read_node(node); end - - # Visit a GlobalVariableTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1977 - def visit_global_variable_target_node(node); end - - # Visit a GlobalVariableWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1994 - def visit_global_variable_write_node(node); end - - # Visit a HashNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2021 - def visit_hash_node(node); end - - # Visit a HashPatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2054 - def visit_hash_pattern_node(node); end - - # Visit a IfNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2103 - def visit_if_node(node); end - - # Visit a ImaginaryNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2148 - def visit_imaginary_node(node); end - - # Visit a ImplicitNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2166 - def visit_implicit_node(node); end - - # Visit a ImplicitRestNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2184 - def visit_implicit_rest_node(node); end - - # Visit a InNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2198 - def visit_in_node(node); end - - # Visit a IndexAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2230 - def visit_index_and_write_node(node); end - - # Visit a IndexOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2283 - def visit_index_operator_write_node(node); end - - # Visit a IndexOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2339 - def visit_index_or_write_node(node); end - - # Visit a IndexTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2392 - def visit_index_target_node(node); end - - # Visit a InstanceVariableAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2431 - def visit_instance_variable_and_write_node(node); end - - # Visit a InstanceVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2458 - def visit_instance_variable_operator_write_node(node); end - - # Visit a InstanceVariableOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2488 - def visit_instance_variable_or_write_node(node); end - - # Visit a InstanceVariableReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2515 - def visit_instance_variable_read_node(node); end - - # Visit a InstanceVariableTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2532 - def visit_instance_variable_target_node(node); end - - # Visit a InstanceVariableWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2549 - def visit_instance_variable_write_node(node); end - - # Visit a IntegerNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2576 - def visit_integer_node(node); end - - # Visit a InterpolatedMatchLastLineNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2593 - def visit_interpolated_match_last_line_node(node); end - - # Visit a InterpolatedRegularExpressionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2629 - def visit_interpolated_regular_expression_node(node); end - - # Visit a InterpolatedStringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2665 - def visit_interpolated_string_node(node); end - - # Visit a InterpolatedSymbolNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2702 - def visit_interpolated_symbol_node(node); end - - # Visit a InterpolatedXStringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2739 - def visit_interpolated_x_string_node(node); end - - # Visit a KeywordHashNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2772 - def visit_keyword_hash_node(node); end - - # Visit a KeywordRestParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2802 - def visit_keyword_rest_parameter_node(node); end - - # Visit a LambdaNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2830 - def visit_lambda_node(node); end - - # Visit a LocalVariableAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2868 - def visit_local_variable_and_write_node(node); end - - # Visit a LocalVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2898 - def visit_local_variable_operator_write_node(node); end - - # Visit a LocalVariableOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2931 - def visit_local_variable_or_write_node(node); end - - # Visit a LocalVariableReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2961 - def visit_local_variable_read_node(node); end - - # Visit a LocalVariableTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2981 - def visit_local_variable_target_node(node); end - - # Visit a LocalVariableWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3001 - def visit_local_variable_write_node(node); end - - # Visit a MatchLastLineNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3031 - def visit_match_last_line_node(node); end - - # Visit a MatchPredicateNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3060 - def visit_match_predicate_node(node); end - - # Visit a MatchRequiredNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3085 - def visit_match_required_node(node); end - - # Visit a MatchWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3110 - def visit_match_write_node(node); end - - # Visit a MissingNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3141 - def visit_missing_node(node); end - - # Visit a ModuleNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3155 - def visit_module_node(node); end - - # Visit a MultiTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3191 - def visit_multi_target_node(node); end - - # Visit a MultiWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3247 - def visit_multi_write_node(node); end - - # Visit a NextNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3310 - def visit_next_node(node); end - - # Visit a NilNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3333 - def visit_nil_node(node); end - - # Visit a NoKeywordsParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3347 - def visit_no_keywords_parameter_node(node); end - - # Visit a NumberedParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3367 - def visit_numbered_parameters_node(node); end - - # Visit a NumberedReferenceReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3384 - def visit_numbered_reference_read_node(node); end - - # Visit a OptionalKeywordParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3401 - def visit_optional_keyword_parameter_node(node); end - - # Visit a OptionalParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3428 - def visit_optional_parameter_node(node); end - - # Visit a OrNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3458 - def visit_or_node(node); end - - # Visit a ParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3483 - def visit_parameters_node(node); end - - # Visit a ParenthesesNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3567 - def visit_parentheses_node(node); end - - # Visit a PinnedExpressionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3593 - def visit_pinned_expression_node(node); end - - # Visit a PinnedVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3620 - def visit_pinned_variable_node(node); end - - # Visit a PostExecutionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3641 - def visit_post_execution_node(node); end - - # Visit a PreExecutionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3670 - def visit_pre_execution_node(node); end - - # Visit a ProgramNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3699 - def visit_program_node(node); end - - # Visit a RangeNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3720 - def visit_range_node(node); end - - # Visit a RationalNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3752 - def visit_rational_node(node); end - - # Visit a RedoNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3770 - def visit_redo_node(node); end - - # Visit a RegularExpressionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3784 - def visit_regular_expression_node(node); end - - # Visit a RequiredKeywordParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3813 - def visit_required_keyword_parameter_node(node); end - - # Visit a RequiredParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3836 - def visit_required_parameter_node(node); end - - # Visit a RescueModifierNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3856 - def visit_rescue_modifier_node(node); end - - # Visit a RescueNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3881 - def visit_rescue_node(node); end - - # Visit a RestParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3934 - def visit_rest_parameter_node(node); end - - # Visit a RetryNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3962 - def visit_retry_node(node); end - - # Visit a ReturnNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3976 - def visit_return_node(node); end - - # Visit a SelfNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3999 - def visit_self_node(node); end - - # Visit a SingletonClassNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4013 - def visit_singleton_class_node(node); end - - # Visit a SourceEncodingNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4049 - def visit_source_encoding_node(node); end - - # Visit a SourceFileNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4063 - def visit_source_file_node(node); end - - # Visit a SourceLineNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4080 - def visit_source_line_node(node); end - - # Visit a SplatNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4094 - def visit_splat_node(node); end - - # Visit a StatementsNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4117 - def visit_statements_node(node); end - - # Visit a StringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4144 - def visit_string_node(node); end - - # Visit a SuperNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4177 - def visit_super_node(node); end - - # Visit a SymbolNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4216 - def visit_symbol_node(node); end - - # Visit a TrueNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4251 - def visit_true_node(node); end - - # Visit a UndefNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4265 - def visit_undef_node(node); end - - # Visit a UnlessNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4295 - def visit_unless_node(node); end - - # Visit a UntilNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4338 - def visit_until_node(node); end - - # Visit a WhenNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4373 - def visit_when_node(node); end - - # Visit a WhileNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4409 - def visit_while_node(node); end - - # Visit a XStringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4444 - def visit_x_string_node(node); end - - # Visit a YieldNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4473 - def visit_yield_node(node); end - - private - - # Inspect a node that has arguments_node_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4519 - def arguments_node_flags_inspect(node); end - - # Inspect a node that has array_node_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4527 - def array_node_flags_inspect(node); end - - # Inspect a node that has call_node_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4535 - def call_node_flags_inspect(node); end - - # Inspect a node that has encoding_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4546 - def encoding_flags_inspect(node); end - - # Inspect a node that has integer_base_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4555 - def integer_base_flags_inspect(node); end - - # Inspect a node that has keyword_hash_node_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4566 - def keyword_hash_node_flags_inspect(node); end - - # Inspect a location to display the start and end line and column numbers. - # - # source://prism//lib/prism/dot_visitor.rb#4513 - def location_inspect(location); end - - # Inspect a node that has loop_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4574 - def loop_flags_inspect(node); end - - # Generate a unique node ID for a node throughout the digraph. - # - # source://prism//lib/prism/dot_visitor.rb#4508 - def node_id(node); end - - # Inspect a node that has parameter_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4582 - def parameter_flags_inspect(node); end - - # Inspect a node that has range_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4590 - def range_flags_inspect(node); end - - # Inspect a node that has regular_expression_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4598 - def regular_expression_flags_inspect(node); end - - # Inspect a node that has string_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4616 - def string_flags_inspect(node); end - - # Inspect a node that has symbol_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4626 - def symbol_flags_inspect(node); end -end - -# source://prism//lib/prism/dot_visitor.rb#58 -class Prism::DotVisitor::Digraph - # @return [Digraph] a new instance of Digraph - # - # source://prism//lib/prism/dot_visitor.rb#61 - def initialize; end - - # source://prism//lib/prism/dot_visitor.rb#75 - def edge(value); end - - # Returns the value of attribute edges. - # - # source://prism//lib/prism/dot_visitor.rb#59 - def edges; end - - # source://prism//lib/prism/dot_visitor.rb#67 - def node(value); end - - # Returns the value of attribute nodes. - # - # source://prism//lib/prism/dot_visitor.rb#59 - def nodes; end - - # source://prism//lib/prism/dot_visitor.rb#79 - def to_dot; end - - # source://prism//lib/prism/dot_visitor.rb#71 - def waypoint(value); end - - # Returns the value of attribute waypoints. - # - # source://prism//lib/prism/dot_visitor.rb#59 - def waypoints; end -end - -# source://prism//lib/prism/dot_visitor.rb#14 -class Prism::DotVisitor::Field - # @return [Field] a new instance of Field - # - # source://prism//lib/prism/dot_visitor.rb#17 - def initialize(name, value, port); end - - # Returns the value of attribute name. - # - # source://prism//lib/prism/dot_visitor.rb#15 - def name; end - - # Returns the value of attribute port. - # - # source://prism//lib/prism/dot_visitor.rb#15 - def port; end - - # source://prism//lib/prism/dot_visitor.rb#23 - def to_dot; end - - # Returns the value of attribute value. - # - # source://prism//lib/prism/dot_visitor.rb#15 - def value; end -end - -# source://prism//lib/prism/dot_visitor.rb#32 -class Prism::DotVisitor::Table - # @return [Table] a new instance of Table - # - # source://prism//lib/prism/dot_visitor.rb#35 - def initialize(name); end - - # source://prism//lib/prism/dot_visitor.rb#40 - def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end - - # Returns the value of attribute fields. - # - # source://prism//lib/prism/dot_visitor.rb#33 - def fields; end - - # Returns the value of attribute name. - # - # source://prism//lib/prism/dot_visitor.rb#33 - def name; end - - # source://prism//lib/prism/dot_visitor.rb#44 - def to_dot; end -end - -# Represents an `else` clause in a `case`, `if`, or `unless` statement. -# -# if a then b else c end -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6290 -class Prism::ElseNode < ::Prism::Node - # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void - # - # @return [ElseNode] a new instance of ElseNode - # - # source://prism//lib/prism/node.rb#6292 - def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6302 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6307 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6319 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6312 - def compact_child_nodes; end - - # def copy: (**params) -> ElseNode - # - # source://prism//lib/prism/node.rb#6324 - sig { params(params: T.untyped).returns(Prism::ElseNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6307 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#6338 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def else_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6365 - sig { returns(String) } - def else_keyword; end - - # attr_reader else_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#6343 - sig { returns(Prism::Location) } - def else_keyword_loc; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#6370 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#6352 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#6375 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#6349 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6402 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6412 - def type; end - end -end - -# EmbDocComment objects correspond to comments that are surrounded by =begin -# and =end. -# -# source://prism//lib/prism/parse_result.rb#290 -class Prism::EmbDocComment < ::Prism::Comment - # Returns a string representation of this comment. - # - # source://prism//lib/prism/parse_result.rb#297 - def inspect; end - - # This can only be true for inline comments. - # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#292 - def trailing?; end -end - -# Represents an interpolated set of statements. -# -# "foo #{bar}" -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#6421 -class Prism::EmbeddedStatementsNode < ::Prism::Node - # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void - # - # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode - # - # source://prism//lib/prism/node.rb#6423 - def initialize(source, opening_loc, statements, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6433 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6438 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#6495 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#6483 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6450 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6443 - def compact_child_nodes; end - - # def copy: (**params) -> EmbeddedStatementsNode - # - # source://prism//lib/prism/node.rb#6455 - sig { params(params: T.untyped).returns(Prism::EmbeddedStatementsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6438 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#6469 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#6500 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#6490 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#6474 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#6480 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6527 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6537 - def type; end - end -end - -# Represents an interpolated variable. -# -# "foo #@bar" -# ^^^^^ -# -# source://prism//lib/prism/node.rb#6546 -class Prism::EmbeddedVariableNode < ::Prism::Node - # def initialize: (Location operator_loc, Node variable, Location location) -> void - # - # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode - # - # source://prism//lib/prism/node.rb#6548 - def initialize(source, operator_loc, variable, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6557 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6562 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6572 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6567 - def compact_child_nodes; end - - # def copy: (**params) -> EmbeddedVariableNode - # - # source://prism//lib/prism/node.rb#6577 - sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6562 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Node, location: Location } - # - # source://prism//lib/prism/node.rb#6590 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#6610 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#6605 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#6595 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6632 - def type; end - - # attr_reader variable: Node - # - # source://prism//lib/prism/node.rb#6601 - sig { returns(Prism::Node) } - def variable; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6642 - def type; end - end -end - -# Flags for nodes that have unescaped content. -# -# source://prism//lib/prism/node.rb#19268 -module Prism::EncodingFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#19273 -Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to UTF-8 -# -# source://prism//lib/prism/node.rb#19270 -Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) - -# Represents an `ensure` clause in a `begin` statement. -# -# begin -# foo -# ensure -# ^^^^^^ -# bar -# end -# -# source://prism//lib/prism/node.rb#6655 -class Prism::EnsureNode < ::Prism::Node - # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void - # - # @return [EnsureNode] a new instance of EnsureNode - # - # source://prism//lib/prism/node.rb#6657 - def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6667 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6672 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6684 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6677 - def compact_child_nodes; end - - # def copy: (**params) -> EnsureNode - # - # source://prism//lib/prism/node.rb#6689 - sig { params(params: T.untyped).returns(Prism::EnsureNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6672 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#6703 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6729 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#6717 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def ensure_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6724 - sig { returns(String) } - def ensure_keyword; end - - # attr_reader ensure_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#6708 - sig { returns(Prism::Location) } - def ensure_keyword_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#6734 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#6714 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6761 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6771 - def type; end - end -end - -# Represents the use of the literal `false` keyword. -# -# false -# ^^^^^ -# -# source://prism//lib/prism/node.rb#6780 -class Prism::FalseNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [FalseNode] a new instance of FalseNode - # - # source://prism//lib/prism/node.rb#6782 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6789 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6794 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6804 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6799 - def compact_child_nodes; end - - # def copy: (**params) -> FalseNode - # - # source://prism//lib/prism/node.rb#6809 - sig { params(params: T.untyped).returns(Prism::FalseNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6794 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#6820 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#6826 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6845 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6855 - def type; end - end -end - -# Represents a find pattern in pattern matching. -# -# foo in *bar, baz, *qux -# ^^^^^^^^^^^^^^^ -# -# foo in [*bar, baz, *qux] -# ^^^^^^^^^^^^^^^^^ -# -# foo in Foo(*bar, baz, *qux) -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6870 -class Prism::FindPatternNode < ::Prism::Node - # def initialize: (Node? constant, Node left, Array[Node] requireds, Node right, Location? opening_loc, Location? closing_loc, Location location) -> void - # - # @return [FindPatternNode] a new instance of FindPatternNode - # - # source://prism//lib/prism/node.rb#6872 - def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6885 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#6974 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#6956 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6905 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6895 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://prism//lib/prism/node.rb#6932 - sig { returns(T.nilable(Prism::Node)) } - def constant; end - - # def copy: (**params) -> FindPatternNode - # - # source://prism//lib/prism/node.rb#6910 - sig { params(params: T.untyped).returns(Prism::FindPatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#6927 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#6979 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://prism//lib/prism/node.rb#6935 - sig { returns(Prism::Node) } - def left; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#6969 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#6944 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader requireds: Array[Node] - # - # source://prism//lib/prism/node.rb#6938 - sig { returns(T::Array[Prism::Node]) } - def requireds; end - - # attr_reader right: Node - # - # source://prism//lib/prism/node.rb#6941 - sig { returns(Prism::Node) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7011 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7021 - def type; end - end -end - -# Represents the use of the `..` or `...` operators to create flip flops. -# -# baz if foo .. bar -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7030 -class Prism::FlipFlopNode < ::Prism::Node - # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void - # - # @return [FlipFlopNode] a new instance of FlipFlopNode - # - # source://prism//lib/prism/node.rb#7032 - def initialize(source, flags, left, right, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7043 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7061 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7053 - def compact_child_nodes; end - - # def copy: (**params) -> FlipFlopNode - # - # source://prism//lib/prism/node.rb#7066 - sig { params(params: T.untyped).returns(Prism::FlipFlopNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#7081 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def exclude_end?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#7103 - sig { returns(T::Boolean) } - def exclude_end?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#7113 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node? - # - # source://prism//lib/prism/node.rb#7090 - sig { returns(T.nilable(Prism::Node)) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#7108 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#7096 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader right: Node? - # - # source://prism//lib/prism/node.rb#7093 - sig { returns(T.nilable(Prism::Node)) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7147 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#7086 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7157 - def type; end - end -end - -# Represents a floating point number literal. -# -# 1.0 -# ^^^ -# -# source://prism//lib/prism/node.rb#7166 -class Prism::FloatNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [FloatNode] a new instance of FloatNode - # - # source://prism//lib/prism/node.rb#7168 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7175 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7180 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7190 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7185 - def compact_child_nodes; end - - # def copy: (**params) -> FloatNode - # - # source://prism//lib/prism/node.rb#7195 - sig { params(params: T.untyped).returns(Prism::FloatNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7180 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#7206 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#7212 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7231 - def type; end - - # Returns the value of the node as a Ruby Float. - # - # source://prism//lib/prism/node_ext.rb#62 - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7241 - def type; end - end -end - -# Represents the use of the `for` keyword. -# -# for i in a end -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7250 -class Prism::ForNode < ::Prism::Node - # def initialize: (Node index, Node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void - # - # @return [ForNode] a new instance of ForNode - # - # source://prism//lib/prism/node.rb#7252 - def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7266 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # attr_reader collection: Node - # - # source://prism//lib/prism/node.rb#7316 - sig { returns(Prism::Node) } - def collection; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7285 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7276 - def compact_child_nodes; end - - # def copy: (**params) -> ForNode - # - # source://prism//lib/prism/node.rb#7290 - sig { params(params: T.untyped).returns(Prism::ForNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#7308 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def do_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#7363 - sig { returns(T.nilable(String)) } - def do_keyword; end - - # attr_reader do_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#7334 - sig { returns(T.nilable(Prism::Location)) } - def do_keyword_loc; end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#7368 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#7346 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def for_keyword: () -> String - # - # source://prism//lib/prism/node.rb#7353 - sig { returns(String) } - def for_keyword; end - - # attr_reader for_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#7322 - sig { returns(Prism::Location) } - def for_keyword_loc; end - - # def in_keyword: () -> String - # - # source://prism//lib/prism/node.rb#7358 - sig { returns(String) } - def in_keyword; end - - # attr_reader in_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#7328 - sig { returns(Prism::Location) } - def in_keyword_loc; end - - # attr_reader index: Node - # - # source://prism//lib/prism/node.rb#7313 - sig { returns(Prism::Node) } - def index; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#7373 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#7319 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7406 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7416 - def type; end - end -end - -# Represents forwarding all arguments to this method to another method. -# -# def foo(...) -# bar(...) -# ^^^ -# end -# -# source://prism//lib/prism/node.rb#7427 -class Prism::ForwardingArgumentsNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode - # - # source://prism//lib/prism/node.rb#7429 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7436 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7441 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7451 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7446 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingArgumentsNode - # - # source://prism//lib/prism/node.rb#7456 - sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7441 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#7467 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#7473 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7492 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7502 - def type; end - end -end - -# Represents the use of the forwarding parameter in a method, block, or lambda declaration. -# -# def foo(...) -# ^^^ -# end -# -# source://prism//lib/prism/node.rb#7512 -class Prism::ForwardingParameterNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode - # - # source://prism//lib/prism/node.rb#7514 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7521 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7526 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7536 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7531 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingParameterNode - # - # source://prism//lib/prism/node.rb#7541 - sig { params(params: T.untyped).returns(Prism::ForwardingParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7526 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#7552 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#7558 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7577 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7587 - def type; end - end -end - -# Represents the use of the `super` keyword without parentheses or arguments. -# -# super -# ^^^^^ -# -# source://prism//lib/prism/node.rb#7596 -class Prism::ForwardingSuperNode < ::Prism::Node - # def initialize: (BlockNode? block, Location location) -> void - # - # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode - # - # source://prism//lib/prism/node.rb#7598 - def initialize(source, block, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7606 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader block: BlockNode? - # - # source://prism//lib/prism/node.rb#7645 - sig { returns(T.nilable(Prism::BlockNode)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7611 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7623 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7616 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingSuperNode - # - # source://prism//lib/prism/node.rb#7628 - sig { params(params: T.untyped).returns(Prism::ForwardingSuperNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7611 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } - # - # source://prism//lib/prism/node.rb#7640 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#7649 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7674 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7684 - def type; end - end -end - -# Represents the use of the `&&=` operator for assignment to a global variable. -# -# $target &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7693 -class Prism::GlobalVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#7695 - def initialize(source, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7706 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7711 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7721 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7716 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#7726 - sig { params(params: T.untyped).returns(Prism::GlobalVariableAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7711 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#7741 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#161 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#7770 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#7746 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#7749 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#7765 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#7755 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7794 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#7761 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7804 - def type; end - end -end - -# Represents assigning to a global variable using an operator that isn't `=`. -# -# $target += value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7813 -class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void - # - # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#7815 - def initialize(source, name, name_loc, operator_loc, value, operator, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7827 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7832 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7842 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7837 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#7847 - sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7832 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#7863 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#173 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#7890 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#7868 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#7871 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#7886 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#7877 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7915 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#7883 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7925 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a global variable. -# -# $target ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7934 -class Prism::GlobalVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#7936 - def initialize(source, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7947 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7952 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7962 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7957 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#7967 - sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7952 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#7982 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#167 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8011 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#7987 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#7990 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#8006 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#7996 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8035 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#8002 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8045 - def type; end - end -end - -# Represents referencing a global variable. -# -# $foo -# ^^^^ -# -# source://prism//lib/prism/node.rb#8054 -class Prism::GlobalVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode - # - # source://prism//lib/prism/node.rb#8056 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8064 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8069 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8079 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8074 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableReadNode - # - # source://prism//lib/prism/node.rb#8084 - sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8069 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#8096 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8109 - def inspect(inspector = T.unsafe(nil)); end - - # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. - # - # $foo # name `:$foo` - # - # $_Test # name `:$_Test` - # - # source://prism//lib/prism/node.rb#8105 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8129 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8139 - def type; end - end -end - -# Represents writing to a global variable in a context that doesn't have an explicit value. -# -# $foo, $bar = baz -# ^^^^ ^^^^ -# -# source://prism//lib/prism/node.rb#8148 -class Prism::GlobalVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode - # - # source://prism//lib/prism/node.rb#8150 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8158 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8173 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8168 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableTargetNode - # - # source://prism//lib/prism/node.rb#8178 - sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#8190 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8199 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#8195 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8219 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8229 - def type; end - end -end - -# Represents writing to a global variable. -# -# $foo = 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8238 -class Prism::GlobalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void - # - # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode - # - # source://prism//lib/prism/node.rb#8240 - def initialize(source, name, name_loc, value, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8251 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8256 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8266 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8261 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableWriteNode - # - # source://prism//lib/prism/node.rb#8271 - sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8256 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#8286 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8315 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#8291 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#8294 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#8310 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#8303 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8339 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#8300 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8349 - def type; end - end -end - -# Represents a hash literal. -# -# { a => b } -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8358 -class Prism::HashNode < ::Prism::Node - # def initialize: (Location opening_loc, Array[Node] elements, Location closing_loc, Location location) -> void - # - # @return [HashNode] a new instance of HashNode - # - # source://prism//lib/prism/node.rb#8360 - def initialize(source, opening_loc, elements, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8370 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8375 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8442 - sig { returns(String) } - def closing; end - - # The location of the closing brace. - # - # { a => b } - # ^ - # - # source://prism//lib/prism/node.rb#8430 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8385 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8380 - def compact_child_nodes; end - - # def copy: (**params) -> HashNode - # - # source://prism//lib/prism/node.rb#8390 - sig { params(params: T.untyped).returns(Prism::HashNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8375 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#8404 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. - # - # { a: b } - # ^^^^ - # - # { **foo } - # ^^^^^ - # - # source://prism//lib/prism/node.rb#8424 - sig { returns(T::Array[Prism::Node]) } - def elements; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8447 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8437 - sig { returns(String) } - def opening; end - - # The location of the opening brace. - # - # { a => b } - # ^ - # - # source://prism//lib/prism/node.rb#8412 - sig { returns(Prism::Location) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8469 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8479 - def type; end - end -end - -# Represents a hash pattern in pattern matching. -# -# foo => { a: 1, b: 2 } -# ^^^^^^^^^^^^^^ -# -# foo => { a: 1, b: 2, **c } -# ^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8491 -class Prism::HashPatternNode < ::Prism::Node - # def initialize: (Node? constant, Array[Node] elements, Node? rest, Location? opening_loc, Location? closing_loc, Location location) -> void - # - # @return [HashPatternNode] a new instance of HashPatternNode - # - # source://prism//lib/prism/node.rb#8493 - def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8505 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8510 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#8589 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#8571 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8524 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8515 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://prism//lib/prism/node.rb#8550 - sig { returns(T.nilable(Prism::Node)) } - def constant; end - - # def copy: (**params) -> HashPatternNode - # - # source://prism//lib/prism/node.rb#8529 - sig { params(params: T.untyped).returns(Prism::HashPatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8510 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#8545 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://prism//lib/prism/node.rb#8553 - sig { returns(T::Array[Prism::Node]) } - def elements; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8594 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#8584 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#8559 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#8556 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8628 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8638 - def type; end - end -end - -# source://prism//lib/prism/node_ext.rb#35 -module Prism::HeredocQuery - # Returns true if this node was represented as a heredoc in the source code. - # - # @return [Boolean] - # - # source://prism//lib/prism/node_ext.rb#37 - def heredoc?; end -end - -# Represents the use of the `if` keyword, either in the block form or the modifier form. -# -# bar if foo -# ^^^^^^^^^^ -# -# if foo then bar end -# ^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8650 -class Prism::IfNode < ::Prism::Node - # def initialize: (Location? if_keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, Node? consequent, Location? end_keyword_loc, Location location) -> void - # - # @return [IfNode] a new instance of IfNode - # - # source://prism//lib/prism/node.rb#8652 - def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8665 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8674 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8688 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8679 - def compact_child_nodes; end - - # attr_reader consequent: Node? - # - # source://prism//lib/prism/node.rb#8745 - sig { returns(T.nilable(Prism::Node)) } - def consequent; end - - # def copy: (**params) -> IfNode - # - # source://prism//lib/prism/node.rb#8693 - sig { params(params: T.untyped).returns(Prism::IfNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8674 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#8710 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#8771 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#8748 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # def if_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#8761 - sig { returns(T.nilable(String)) } - def if_keyword; end - - # attr_reader if_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#8715 - sig { returns(T.nilable(Prism::Location)) } - def if_keyword_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8776 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader predicate: Node - # - # source://prism//lib/prism/node.rb#8727 - sig { returns(Prism::Node) } - def predicate; end - - # source://prism//lib/prism/node.rb#8669 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#8742 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # def then_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#8766 - sig { returns(T.nilable(String)) } - def then_keyword; end - - # attr_reader then_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#8730 - sig { returns(T.nilable(Prism::Location)) } - def then_keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8812 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8822 - def type; end - end -end - -# Represents an imaginary number literal. -# -# 1.0i -# ^^^^ -# -# source://prism//lib/prism/node.rb#8831 -class Prism::ImaginaryNode < ::Prism::Node - # def initialize: (Node numeric, Location location) -> void - # - # @return [ImaginaryNode] a new instance of ImaginaryNode - # - # source://prism//lib/prism/node.rb#8833 - def initialize(source, numeric, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8841 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8846 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8856 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8851 - def compact_child_nodes; end - - # def copy: (**params) -> ImaginaryNode - # - # source://prism//lib/prism/node.rb#8861 - sig { params(params: T.untyped).returns(Prism::ImaginaryNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8846 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } - # - # source://prism//lib/prism/node.rb#8873 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8882 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader numeric: Node - # - # source://prism//lib/prism/node.rb#8878 - sig { returns(Prism::Node) } - def numeric; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8903 - def type; end - - # Returns the value of the node as a Ruby Complex. - # - # source://prism//lib/prism/node_ext.rb#69 - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8913 - def type; end - end -end - -# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. -# -# { foo: } -# ^^^^ -# -# { Foo: } -# ^^^^ -# -# foo in { bar: } -# ^^^^ -# -# source://prism//lib/prism/node.rb#8928 -class Prism::ImplicitNode < ::Prism::Node - # def initialize: (Node value, Location location) -> void - # - # @return [ImplicitNode] a new instance of ImplicitNode - # - # source://prism//lib/prism/node.rb#8930 - def initialize(source, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8938 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8943 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8953 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8948 - def compact_child_nodes; end - - # def copy: (**params) -> ImplicitNode - # - # source://prism//lib/prism/node.rb#8958 - sig { params(params: T.untyped).returns(Prism::ImplicitNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8943 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#8970 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#8979 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9000 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#8975 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9010 - def type; end - end -end - -# Represents using a trailing comma to indicate an implicit rest parameter. -# -# foo { |bar,| } -# ^ -# -# foo in [bar,] -# ^ -# -# for foo, in bar do end -# ^ -# -# foo, = bar -# ^ -# -# source://prism//lib/prism/node.rb#9028 -class Prism::ImplicitRestNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [ImplicitRestNode] a new instance of ImplicitRestNode - # - # source://prism//lib/prism/node.rb#9030 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9037 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9042 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9052 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9047 - def compact_child_nodes; end - - # def copy: (**params) -> ImplicitRestNode - # - # source://prism//lib/prism/node.rb#9057 - sig { params(params: T.untyped).returns(Prism::ImplicitRestNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9042 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#9068 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#9074 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9093 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9103 - def type; end - end -end - -# Represents the use of the `in` keyword in a case statement. -# -# case a; in b then c end -# ^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9112 -class Prism::InNode < ::Prism::Node - # def initialize: (Node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void - # - # @return [InNode] a new instance of InNode - # - # source://prism//lib/prism/node.rb#9114 - def initialize(source, pattern, statements, in_loc, then_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9125 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9130 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9143 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9135 - def compact_child_nodes; end - - # def copy: (**params) -> InNode - # - # source://prism//lib/prism/node.rb#9148 - sig { params(params: T.untyped).returns(Prism::InNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9130 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#9163 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def in: () -> String - # - # source://prism//lib/prism/node.rb#9193 - sig { returns(String) } - def in; end - - # attr_reader in_loc: Location - # - # source://prism//lib/prism/node.rb#9174 - sig { returns(Prism::Location) } - def in_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#9203 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader pattern: Node - # - # source://prism//lib/prism/node.rb#9168 - sig { returns(Prism::Node) } - def pattern; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#9171 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # def then: () -> String? - # - # source://prism//lib/prism/node.rb#9198 - sig { returns(T.nilable(String)) } - def then; end - - # attr_reader then_loc: Location? - # - # source://prism//lib/prism/node.rb#9180 - sig { returns(T.nilable(Prism::Location)) } - def then_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9232 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9242 - def type; end - end -end - -# Represents the use of the `&&=` operator on a call to the `[]` method. -# -# foo.bar[baz] &&= value -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9251 -class Prism::IndexAndWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, Node value, Location location) -> void - # - # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode - # - # source://prism//lib/prism/node.rb#9253 - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9269 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#9344 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9376 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#9353 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#9386 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#9326 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9274 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#9396 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9347 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9289 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9279 - def compact_child_nodes; end - - # def copy: (**params) -> IndexAndWriteNode - # - # source://prism//lib/prism/node.rb#9294 - sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9274 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#9314 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9381 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#9406 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#9391 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9338 - sig { returns(Prism::Location) } - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#9401 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#9356 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#9323 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9366 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9451 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#9362 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9371 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9319 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9461 - def type; end - end -end - -# Represents the use of an assignment operator on a call to `[]`. -# -# foo.bar[baz] += value -# ^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9470 -class Prism::IndexOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Symbol operator, Location operator_loc, Node value, Location location) -> void - # - # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#9472 - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9489 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#9565 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9600 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#9574 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#9610 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#9547 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9494 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#9620 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9568 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9509 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9499 - def compact_child_nodes; end - - # def copy: (**params) -> IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#9514 - sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9494 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#9535 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9605 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#9625 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#9615 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9559 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#9577 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#9580 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#9544 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9590 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9671 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#9586 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9595 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9540 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9681 - def type; end - end -end - -# Represents the use of the `||=` operator on a call to `[]`. -# -# foo.bar[baz] ||= value -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9690 -class Prism::IndexOrWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, Node value, Location location) -> void - # - # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#9692 - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9708 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#9783 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9815 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#9792 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#9825 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#9765 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9713 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#9835 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9786 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9728 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9718 - def compact_child_nodes; end - - # def copy: (**params) -> IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#9733 - sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9713 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#9753 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9820 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#9845 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#9830 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9777 - sig { returns(Prism::Location) } - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#9840 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#9795 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#9762 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9805 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9890 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#9801 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9810 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9758 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9900 - def type; end - end -end - -# Represents assigning to an index. -# -# foo[bar], = 1 -# ^^^^^^^^ -# -# begin -# rescue => foo[bar] -# ^^^^^^^^ -# end -# -# for foo[bar] in baz do end -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9917 -class Prism::IndexTargetNode < ::Prism::Node - # def initialize: (Integer flags, Node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location location) -> void - # - # @return [IndexTargetNode] a new instance of IndexTargetNode - # - # source://prism//lib/prism/node.rb#9919 - def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9932 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#9991 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10014 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#10000 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9937 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#10029 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9994 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9951 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9942 - def compact_child_nodes; end - - # def copy: (**params) -> IndexTargetNode - # - # source://prism//lib/prism/node.rb#9956 - sig { params(params: T.untyped).returns(Prism::IndexTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9937 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location } - # - # source://prism//lib/prism/node.rb#9973 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10019 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10034 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#10024 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9985 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader receiver: Node - # - # source://prism//lib/prism/node.rb#9982 - sig { returns(Prism::Node) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10004 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10071 - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10009 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9978 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10081 - def type; end - end -end - -# InlineComment objects are the most common. They correspond to comments in -# the source file like this one that start with #. -# -# source://prism//lib/prism/parse_result.rb#275 -class Prism::InlineComment < ::Prism::Comment - # Returns a string representation of this comment. - # - # source://prism//lib/prism/parse_result.rb#283 - def inspect; end - - # Returns true if this comment happens on the same line as other code and - # false if the comment is by itself. - # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#278 - sig { override.returns(T::Boolean) } - def trailing?; end -end - -# Represents the use of the `&&=` operator for assignment to an instance variable. -# -# @target &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10090 -class Prism::InstanceVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#10092 - def initialize(source, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10103 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10108 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10118 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10113 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#10123 - sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10108 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#10138 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#179 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10167 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10143 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10146 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10162 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10152 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10191 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#10158 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10201 - def type; end - end -end - -# Represents assigning to an instance variable using an operator that isn't `=`. -# -# @target += value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10210 -class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void - # - # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#10212 - def initialize(source, name, name_loc, operator_loc, value, operator, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10224 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10229 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10239 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10234 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#10244 - sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10229 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#10260 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#191 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10287 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10265 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10268 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#10283 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10274 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10312 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#10280 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10322 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to an instance variable. -# -# @target ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10331 -class Prism::InstanceVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#10333 - def initialize(source, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10344 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10349 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10359 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10354 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#10364 - sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10349 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#10379 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#185 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10408 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10384 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10387 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10403 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10393 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10432 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#10399 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10442 - def type; end - end -end - -# Represents referencing an instance variable. -# -# @foo -# ^^^^ -# -# source://prism//lib/prism/node.rb#10451 -class Prism::InstanceVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode - # - # source://prism//lib/prism/node.rb#10453 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10461 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10466 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10476 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10471 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableReadNode - # - # source://prism//lib/prism/node.rb#10481 - sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10466 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#10493 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10506 - def inspect(inspector = T.unsafe(nil)); end - - # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). - # - # @x # name `:@x` - # - # @_test # name `:@_test` - # - # source://prism//lib/prism/node.rb#10502 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10526 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10536 - def type; end - end -end - -# Represents writing to an instance variable in a context that doesn't have an explicit value. -# -# @foo, @bar = baz -# ^^^^ ^^^^ -# -# source://prism//lib/prism/node.rb#10545 -class Prism::InstanceVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void - # - # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode - # - # source://prism//lib/prism/node.rb#10547 - def initialize(source, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10555 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10560 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10570 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10565 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableTargetNode - # - # source://prism//lib/prism/node.rb#10575 - sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10560 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#10587 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10596 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10592 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10616 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10626 - def type; end - end -end - -# Represents writing to an instance variable. -# -# @foo = 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10635 -class Prism::InstanceVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void - # - # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode - # - # source://prism//lib/prism/node.rb#10637 - def initialize(source, name, name_loc, value, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10648 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10653 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10663 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10658 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableWriteNode - # - # source://prism//lib/prism/node.rb#10668 - sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10653 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#10683 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10712 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10688 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10691 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10707 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10700 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10736 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#10697 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10746 - def type; end - end -end - -# Flags for integer nodes that correspond to the base of the integer. -# -# source://prism//lib/prism/node.rb#19277 -module Prism::IntegerBaseFlags; end - -# 0b prefix -# -# source://prism//lib/prism/node.rb#19279 -Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) - -# 0d or no prefix -# -# source://prism//lib/prism/node.rb#19282 -Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) - -# 0x prefix -# -# source://prism//lib/prism/node.rb#19288 -Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) - -# 0o or 0 prefix -# -# source://prism//lib/prism/node.rb#19285 -Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) - -# Represents an integer number literal. -# -# 1 -# ^ -# -# source://prism//lib/prism/node.rb#10755 -class Prism::IntegerNode < ::Prism::Node - # def initialize: (Integer flags, Location location) -> void - # - # @return [IntegerNode] a new instance of IntegerNode - # - # source://prism//lib/prism/node.rb#10757 - def initialize(source, flags, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10765 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def binary?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10807 - sig { returns(T::Boolean) } - def binary?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10770 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10780 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10775 - def compact_child_nodes; end - - # def copy: (**params) -> IntegerNode - # - # source://prism//lib/prism/node.rb#10785 - sig { params(params: T.untyped).returns(Prism::IntegerNode) } - def copy(**params); end - - # def decimal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10812 - sig { returns(T::Boolean) } - def decimal?; end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10770 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#10797 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def hexadecimal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10822 - sig { returns(T::Boolean) } - def hexadecimal?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10827 - def inspect(inspector = T.unsafe(nil)); end - - # def octal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10817 - sig { returns(T::Boolean) } - def octal?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10848 - def type; end - - # Returns the value of the node as a Ruby Integer. - # - # source://prism//lib/prism/node_ext.rb#76 - def value; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#10802 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10858 - def type; end - end -end - -# Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. -# -# if /foo #{bar} baz/ then end -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10867 -class Prism::InterpolatedMatchLastLineNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void - # - # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode - # - # source://prism//lib/prism/node.rb#10869 - def initialize(source, flags, opening_loc, parts, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10880 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10970 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#11005 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#10938 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10900 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10895 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedMatchLastLineNode - # - # source://prism//lib/prism/node.rb#10905 - sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#10920 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10965 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10950 - sig { returns(T::Boolean) } - def extended?; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10990 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10995 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10985 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10945 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#11010 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10955 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10960 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#11000 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#10929 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#10935 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#10884 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11034 - def type; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10980 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10975 - sig { returns(T::Boolean) } - def windows_31j?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#10925 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11044 - def type; end - end -end - -# Represents a regular expression literal that contains interpolation. -# -# /foo #{bar} baz/ -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11053 -class Prism::InterpolatedRegularExpressionNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void - # - # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode - # - # source://prism//lib/prism/node.rb#11055 - def initialize(source, flags, opening_loc, parts, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11066 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11156 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11076 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#11191 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#11124 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11086 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11081 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedRegularExpressionNode - # - # source://prism//lib/prism/node.rb#11091 - sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11076 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#11106 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11151 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11136 - sig { returns(T::Boolean) } - def extended?; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11176 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11181 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11171 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11131 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#11196 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11141 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11146 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#11186 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#11115 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#11121 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#11070 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11220 - def type; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11166 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11161 - sig { returns(T::Boolean) } - def windows_31j?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11111 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11230 - def type; end - end -end - -# Represents a string literal that contains interpolation. -# -# "foo #{bar} baz" -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11239 -class Prism::InterpolatedStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void - # - # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode - # - # source://prism//lib/prism/node.rb#11241 - def initialize(source, opening_loc, parts, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11251 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11261 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#11328 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#11310 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11271 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11266 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedStringNode - # - # source://prism//lib/prism/node.rb#11276 - sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11261 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#11290 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#11333 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#11323 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#11295 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#11307 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#11255 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11355 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11365 - def type; end - end -end - -# Represents a symbol literal that contains interpolation. -# -# :"foo #{bar} baz" -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11374 -class Prism::InterpolatedSymbolNode < ::Prism::Node - # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void - # - # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#11376 - def initialize(source, opening_loc, parts, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11386 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11396 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#11463 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#11445 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11406 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11401 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#11411 - sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11396 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#11425 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#11468 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#11458 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#11430 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#11442 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#11390 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11490 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11500 - def type; end - end -end - -# Represents an xstring literal that contains interpolation. -# -# `foo #{bar} baz` -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11509 -class Prism::InterpolatedXStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # def initialize: (Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void - # - # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode - # - # source://prism//lib/prism/node.rb#11511 - def initialize(source, opening_loc, parts, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11521 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#11586 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#11574 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11541 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11536 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedXStringNode - # - # source://prism//lib/prism/node.rb#11546 - sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#11560 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#11591 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#11581 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#11565 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#11571 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#11525 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11613 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11623 - def type; end - end -end - -# Represents a hash literal without opening and closing braces. -# -# foo(a: b) -# ^^^^ -# -# source://prism//lib/prism/node.rb#11632 -class Prism::KeywordHashNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] elements, Location location) -> void - # - # @return [KeywordHashNode] a new instance of KeywordHashNode - # - # source://prism//lib/prism/node.rb#11634 - def initialize(source, flags, elements, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11643 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11648 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11658 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11653 - def compact_child_nodes; end - - # def copy: (**params) -> KeywordHashNode - # - # source://prism//lib/prism/node.rb#11663 - sig { params(params: T.untyped).returns(Prism::KeywordHashNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11648 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], location: Location } - # - # source://prism//lib/prism/node.rb#11676 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://prism//lib/prism/node.rb#11685 - sig { returns(T::Array[Prism::Node]) } - def elements; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#11694 - def inspect(inspector = T.unsafe(nil)); end - - # def symbol_keys?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11689 - sig { returns(T::Boolean) } - def symbol_keys?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11716 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11681 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11726 - def type; end - end -end - -# Flags for keyword hash nodes. -# -# source://prism//lib/prism/node.rb#19292 -module Prism::KeywordHashNodeFlags; end - -# a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments -# -# source://prism//lib/prism/node.rb#19294 -Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) - -# Represents a keyword rest parameter to a method, block, or lambda definition. -# -# def a(**b) -# ^^^ -# end -# -# source://prism//lib/prism/node.rb#11736 -class Prism::KeywordRestParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void - # - # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode - # - # source://prism//lib/prism/node.rb#11738 - def initialize(source, flags, name, name_loc, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11749 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11754 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11764 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11759 - def compact_child_nodes; end - - # def copy: (**params) -> KeywordRestParameterNode - # - # source://prism//lib/prism/node.rb#11769 - sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11754 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#11784 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#11825 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#11793 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#11796 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11820 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#11808 - sig { returns(Prism::Location) } - def operator_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11815 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11853 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11789 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11863 - def type; end - end -end - -# Represents using a lambda literal (not the lambda method call). -# -# ->(value) { value * 2 } -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11872 -class Prism::LambdaNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Node? parameters, Node? body, Location location) -> void - # - # @return [LambdaNode] a new instance of LambdaNode - # - # source://prism//lib/prism/node.rb#11874 - def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11887 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#11956 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11892 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#11970 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#11947 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11905 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11897 - def compact_child_nodes; end - - # def copy: (**params) -> LambdaNode - # - # source://prism//lib/prism/node.rb#11910 - sig { params(params: T.untyped).returns(Prism::LambdaNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11892 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location } - # - # source://prism//lib/prism/node.rb#11927 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#11975 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#11932 - sig { returns(T::Array[Symbol]) } - def locals; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#11965 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#11941 - sig { returns(Prism::Location) } - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11960 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#11935 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader parameters: Node? - # - # source://prism//lib/prism/node.rb#11953 - sig { returns(T.nilable(Prism::Node)) } - def parameters; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12010 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12020 - def type; end - end -end - -# This class is responsible for lexing the source using prism and then -# converting those tokens to be compatible with Ripper. In the vast majority -# of cases, this is a one-to-one mapping of the token type. Everything else -# generally lines up. However, there are a few cases that require special -# handling. -# -# source://prism//lib/prism/lex_compat.rb#12 -class Prism::LexCompat - # @return [LexCompat] a new instance of LexCompat - # - # source://prism//lib/prism/lex_compat.rb#600 - def initialize(source, **options); end - - # Returns the value of attribute options. - # - # source://prism//lib/prism/lex_compat.rb#598 - def options; end - - # source://prism//lib/prism/lex_compat.rb#605 - def result; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/lex_compat.rb#598 - def source; end -end - -# Ripper doesn't include the rest of the token in the event, so we need to -# trim it down to just the content on the first line when comparing. -# -# source://prism//lib/prism/lex_compat.rb#211 -class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#212 - def ==(other); end -end - -# A heredoc in this case is a list of tokens that belong to the body of the -# heredoc that should be appended onto the list of tokens when the heredoc -# closes. -# -# source://prism//lib/prism/lex_compat.rb#272 -module Prism::LexCompat::Heredoc - class << self - # Here we will split between the two types of heredocs and return the - # object that will store their tokens. - # - # source://prism//lib/prism/lex_compat.rb#584 - def build(opening); end - end -end - -# Dash heredocs are a little more complicated. They are a list of tokens -# that need to be split on "\\\n" to mimic Ripper's behavior. We also need -# to keep track of the state that the heredoc was opened in. -# -# source://prism//lib/prism/lex_compat.rb#296 -class Prism::LexCompat::Heredoc::DashHeredoc - # @return [DashHeredoc] a new instance of DashHeredoc - # - # source://prism//lib/prism/lex_compat.rb#299 - def initialize(split); end - - # source://prism//lib/prism/lex_compat.rb#304 - def <<(token); end - - # source://prism//lib/prism/lex_compat.rb#297 - def split; end - - # source://prism//lib/prism/lex_compat.rb#308 - def to_a; end - - # source://prism//lib/prism/lex_compat.rb#297 - def tokens; end -end - -# Heredocs that are dedenting heredocs are a little more complicated. -# Ripper outputs on_ignored_sp tokens for the whitespace that is being -# removed from the output. prism only modifies the node itself and keeps -# the token the same. This simplifies prism, but makes comparing against -# Ripper much harder because there is a length mismatch. -# -# Fortunately, we already have to pull out the heredoc tokens in order to -# insert them into the stream in the correct order. As such, we can do -# some extra manipulation on the tokens to make them match Ripper's -# output by mirroring the dedent logic that Ripper uses. -# -# source://prism//lib/prism/lex_compat.rb#355 -class Prism::LexCompat::Heredoc::DedentingHeredoc - # @return [DedentingHeredoc] a new instance of DedentingHeredoc - # - # source://prism//lib/prism/lex_compat.rb#360 - def initialize; end - - # As tokens are coming in, we track the minimum amount of common leading - # whitespace on plain string content tokens. This allows us to later - # remove that amount of whitespace from the beginning of each line. - # - # source://prism//lib/prism/lex_compat.rb#371 - def <<(token); end - - # Returns the value of attribute dedent. - # - # source://prism//lib/prism/lex_compat.rb#358 - def dedent; end - - # Returns the value of attribute dedent_next. - # - # source://prism//lib/prism/lex_compat.rb#358 - def dedent_next; end - - # Returns the value of attribute embexpr_balance. - # - # source://prism//lib/prism/lex_compat.rb#358 - def embexpr_balance; end - - # source://prism//lib/prism/lex_compat.rb#408 - def to_a; end - - # Returns the value of attribute tokens. - # - # source://prism//lib/prism/lex_compat.rb#358 - def tokens; end -end - -# source://prism//lib/prism/lex_compat.rb#356 -Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) - -# Heredocs that are no dash or tilde heredocs are just a list of tokens. -# We need to keep them around so that we can insert them in the correct -# order back into the token stream and set the state of the last token to -# the state that the heredoc was opened in. -# -# source://prism//lib/prism/lex_compat.rb#277 -class Prism::LexCompat::Heredoc::PlainHeredoc - # @return [PlainHeredoc] a new instance of PlainHeredoc - # - # source://prism//lib/prism/lex_compat.rb#280 - def initialize; end - - # source://prism//lib/prism/lex_compat.rb#284 - def <<(token); end - - # source://prism//lib/prism/lex_compat.rb#288 - def to_a; end - - # source://prism//lib/prism/lex_compat.rb#278 - def tokens; end -end - -# Ident tokens for the most part are exactly the same, except sometimes we -# know an ident is a local when ripper doesn't (when they are introduced -# through named captures in regular expressions). In that case we don't -# compare the state. -# -# source://prism//lib/prism/lex_compat.rb#229 -class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#230 - def ==(other); end -end - -# Tokens where state should be ignored -# used for :on_comment, :on_heredoc_end, :on_embexpr_end -# -# source://prism//lib/prism/lex_compat.rb#219 -class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#220 - def ==(other); end -end - -# Ignored newlines can occasionally have a LABEL state attached to them, so -# we compare the state differently here. -# -# source://prism//lib/prism/lex_compat.rb#240 -class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#241 - def ==(other); end -end - -# If we have an identifier that follows a method name like: -# -# def foo bar -# -# then Ripper will mark bar as END|LABEL if there is a local in a parent -# scope named bar because it hasn't pushed the local table yet. We do this -# more accurately, so we need to allow comparing against both END and -# END|LABEL. -# -# source://prism//lib/prism/lex_compat.rb#260 -class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#261 - def ==(other); end -end - -# This is a mapping of prism token types to Ripper token types. This is a -# many-to-one mapping because we split up our token types, whereas Ripper -# tends to group them. -# -# source://prism//lib/prism/lex_compat.rb#16 -Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) - -# When we produce tokens, we produce the same arrays that Ripper does. -# However, we add a couple of convenience methods onto them to make them a -# little easier to work with. We delegate all other methods to the array. -# -# source://prism//lib/prism/lex_compat.rb#187 -class Prism::LexCompat::Token < ::SimpleDelegator - # The type of the token. - # - # source://prism//lib/prism/lex_compat.rb#194 - def event; end - - # The location of the token in the source. - # - # source://prism//lib/prism/lex_compat.rb#189 - def location; end - - # The state of the lexer when this token was produced. - # - # source://prism//lib/prism/lex_compat.rb#204 - def state; end - - # The slice of the source that this token represents. - # - # source://prism//lib/prism/lex_compat.rb#199 - def value; end -end - -# This is a class that wraps the Ripper lexer to produce almost exactly the -# same tokens. -# -# source://prism//lib/prism/lex_compat.rb#853 -class Prism::LexRipper - # @return [LexRipper] a new instance of LexRipper - # - # source://prism//lib/prism/lex_compat.rb#856 - def initialize(source); end - - # source://prism//lib/prism/lex_compat.rb#860 - def result; end - - # source://prism//lib/prism/lex_compat.rb#854 - def source; end - - private - - # source://prism//lib/prism/lex_compat.rb#894 - def lex(source); end -end - -# Represents the use of the `&&=` operator for assignment to a local variable. -# -# target &&= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#12029 -class Prism::LocalVariableAndWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void - # - # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#12031 - def initialize(source, name_loc, operator_loc, value, name, depth, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12043 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12058 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12053 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#12063 - sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#12079 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#12102 - sig { returns(Integer) } - def depth; end - - # source://prism//lib/prism/desugar_compiler.rb#197 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#12111 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12099 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12084 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#12106 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12090 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12136 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#12096 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12146 - def type; end - end -end - -# Represents assigning to a local variable using an operator that isn't `=`. -# -# target += value -# ^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#12155 -class Prism::LocalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Symbol operator, Integer depth, Location location) -> void - # - # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#12157 - def initialize(source, name_loc, operator_loc, value, name, operator, depth, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12170 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12175 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12185 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12180 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#12190 - sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12175 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#12207 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#12233 - sig { returns(Integer) } - def depth; end - - # source://prism//lib/prism/desugar_compiler.rb#209 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#12237 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12227 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12212 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#12230 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12218 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12263 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#12224 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12273 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a local variable. -# -# target ||= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#12282 -class Prism::LocalVariableOrWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void - # - # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#12284 - def initialize(source, name_loc, operator_loc, value, name, depth, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12296 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12301 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12311 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12306 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#12316 - sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12301 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#12332 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#12355 - sig { returns(Integer) } - def depth; end - - # source://prism//lib/prism/desugar_compiler.rb#203 - def desugar; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#12364 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12352 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12337 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#12359 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12343 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12389 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#12349 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12399 - def type; end - end -end - -# Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. -# -# foo -# ^^^ -# -# source://prism//lib/prism/node.rb#12408 -class Prism::LocalVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location location) -> void - # - # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode - # - # source://prism//lib/prism/node.rb#12410 - def initialize(source, name, depth, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12419 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12424 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12434 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12429 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableReadNode - # - # source://prism//lib/prism/node.rb#12439 - sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12424 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#12452 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # The number of visible scopes that should be searched to find the origin of this local variable. - # - # foo = 1; foo # depth 0 - # - # bar = 2; tap { bar } # depth 1 - # - # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). - # - # source://prism//lib/prism/node.rb#12478 - sig { returns(Integer) } - def depth; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#12482 - def inspect(inspector = T.unsafe(nil)); end - - # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). - # - # x # name `:x` - # - # _Test # name `:_Test` - # - # Note that this can also be an underscore followed by a number for the default block parameters. - # - # _1 # name `:_1` - # - # Finally, for the default `it` block parameter, the name is `0it`. This is to distinguish it from an `it` local variable that is explicitly declared. - # - # it # name `:0it` - # - # source://prism//lib/prism/node.rb#12469 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12503 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12513 - def type; end - end -end - -# Represents writing to a local variable in a context that doesn't have an explicit value. -# -# foo, bar = baz -# ^^^ ^^^ -# -# source://prism//lib/prism/node.rb#12522 -class Prism::LocalVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location location) -> void - # - # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode - # - # source://prism//lib/prism/node.rb#12524 - def initialize(source, name, depth, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12533 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12538 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12548 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12543 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableTargetNode - # - # source://prism//lib/prism/node.rb#12553 - sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12538 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#12566 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#12574 - sig { returns(Integer) } - def depth; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#12578 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12571 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12599 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12609 - def type; end - end -end - -# Represents writing to a local variable. -# -# foo = 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#12618 -class Prism::LocalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location name_loc, Node value, Location operator_loc, Location location) -> void - # - # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode - # - # source://prism//lib/prism/node.rb#12620 - def initialize(source, name, depth, name_loc, value, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12632 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12637 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12647 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12642 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableWriteNode - # - # source://prism//lib/prism/node.rb#12652 - sig { params(params: T.untyped).returns(Prism::LocalVariableWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12637 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#12668 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#12676 - sig { returns(Integer) } - def depth; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#12700 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12673 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12679 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#12695 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12688 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12725 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#12685 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12735 - def type; end - end -end - -# This represents a location in the source. -# -# source://prism//lib/prism/parse_result.rb#98 -class Prism::Location - # Create a new location object with the given source, start byte offset, and - # byte length. - # - # @return [Location] a new instance of Location - # - # source://prism//lib/prism/parse_result.rb#116 - sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } - def initialize(source, start_offset, length); end - - # Returns true if the given other location is equal to this location. - # - # source://prism//lib/prism/parse_result.rb#232 - def ==(other); end - - # The list of comments attached to this location - # - # source://prism//lib/prism/parse_result.rb#112 - sig { returns(T::Array[Prism::Comment]) } - def comments; end - - # Create a new location object with the given options. - # - # source://prism//lib/prism/parse_result.rb#124 - sig { params(options: T.untyped).returns(Prism::Location) } - def copy(**options); end - - # Implement the hash pattern matching interface for Location. - # - # source://prism//lib/prism/parse_result.rb#222 - def deconstruct_keys(keys); end - - # The column number in characters where this location ends from the start of - # the line. - # - # source://prism//lib/prism/parse_result.rb#211 - def end_character_column; end - - # The character offset from the beginning of the source where this location - # ends. - # - # source://prism//lib/prism/parse_result.rb#160 - def end_character_offset; end - - # The column number in code units of the given encoding where this location - # ends from the start of the line. - # - # source://prism//lib/prism/parse_result.rb#217 - def end_code_units_column(encoding = T.unsafe(nil)); end - - # The offset from the start of the file in code units of the given encoding. - # - # source://prism//lib/prism/parse_result.rb#165 - def end_code_units_offset(encoding = T.unsafe(nil)); end - - # The column number in bytes where this location ends from the start of the - # line. - # - # source://prism//lib/prism/parse_result.rb#205 - sig { returns(Integer) } - def end_column; end - - # The line number where this location ends. - # - # source://prism//lib/prism/parse_result.rb#181 - sig { returns(Integer) } - def end_line; end - - # The byte offset from the beginning of the source where this location ends. - # - # source://prism//lib/prism/parse_result.rb#154 - sig { returns(Integer) } - def end_offset; end - - # Returns a string representation of this location. - # - # source://prism//lib/prism/parse_result.rb#133 - def inspect; end - - # Returns a new location that stretches from this location to the given - # other location. Raises an error if this location is not before the other - # location or if they don't share the same source. - # - # source://prism//lib/prism/parse_result.rb#241 - def join(other); end - - # The length of this location in bytes. - # - # source://prism//lib/prism/parse_result.rb#109 - def length; end - - # Implement the pretty print interface for Location. - # - # source://prism//lib/prism/parse_result.rb#227 - def pretty_print(q); end - - # The source code that this location represents. - # - # source://prism//lib/prism/parse_result.rb#138 - sig { returns(String) } - def slice; end - - # The column number in characters where this location ends from the start of - # the line. - # - # source://prism//lib/prism/parse_result.rb#193 - def start_character_column; end - - # The character offset from the beginning of the source where this location - # starts. - # - # source://prism//lib/prism/parse_result.rb#144 - def start_character_offset; end - - # The column number in code units of the given encoding where this location - # starts from the start of the line. - # - # source://prism//lib/prism/parse_result.rb#199 - def start_code_units_column(encoding = T.unsafe(nil)); end - - # The offset from the start of the file in code units of the given encoding. - # - # source://prism//lib/prism/parse_result.rb#149 - def start_code_units_offset(encoding = T.unsafe(nil)); end - - # The column number in bytes where this location starts from the start of - # the line. - # - # source://prism//lib/prism/parse_result.rb#187 - sig { returns(Integer) } - def start_column; end - - # The line number where this location starts. - # - # source://prism//lib/prism/parse_result.rb#170 - sig { returns(Integer) } - def start_line; end - - # The content of the line where this location starts before this location. - # - # source://prism//lib/prism/parse_result.rb#175 - def start_line_slice; end - - # The byte offset from the beginning of the source where this location - # starts. - # - # source://prism//lib/prism/parse_result.rb#106 - sig { returns(Integer) } - def start_offset; end - - protected - - # A Source object that is used to determine more information from the given - # offset and length. - # - # source://prism//lib/prism/parse_result.rb#101 - def source; end - - class << self - # Returns a null location that does not correspond to a source and points to - # the beginning of the file. Useful for when you want a location object but - # do not care where it points. - # - # source://prism//lib/prism/parse_result.rb#251 - def null; end - end -end - -# Flags for while and until loop nodes. -# -# source://prism//lib/prism/node.rb#19298 -module Prism::LoopFlags; end - -# a loop after a begin statement, so the body is executed first before the condition -# -# source://prism//lib/prism/node.rb#19300 -Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) - -# This represents a magic comment that was encountered during parsing. -# -# source://prism//lib/prism/parse_result.rb#303 -class Prism::MagicComment - # Create a new magic comment object with the given key and value locations. - # - # @return [MagicComment] a new instance of MagicComment - # - # source://prism//lib/prism/parse_result.rb#311 - def initialize(key_loc, value_loc); end - - # Implement the hash pattern matching interface for MagicComment. - # - # source://prism//lib/prism/parse_result.rb#327 - def deconstruct_keys(keys); end - - # Returns a string representation of this magic comment. - # - # source://prism//lib/prism/parse_result.rb#332 - def inspect; end - - # Returns the key of the magic comment by slicing it from the source code. - # - # source://prism//lib/prism/parse_result.rb#317 - def key; end - - # A Location object representing the location of the key in the source. - # - # source://prism//lib/prism/parse_result.rb#305 - def key_loc; end - - # Returns the value of the magic comment by slicing it from the source code. - # - # source://prism//lib/prism/parse_result.rb#322 - def value; end - - # A Location object representing the location of the value in the source. - # - # source://prism//lib/prism/parse_result.rb#308 - def value_loc; end -end - -# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. -# -# if /foo/i then end -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#12744 -class Prism::MatchLastLineNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void - # - # @return [MatchLastLineNode] a new instance of MatchLastLineNode - # - # source://prism//lib/prism/node.rb#12746 - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12758 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12850 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12763 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#12890 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#12815 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12773 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12768 - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#12885 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#12809 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (**params) -> MatchLastLineNode - # - # source://prism//lib/prism/node.rb#12778 - sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12763 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } - # - # source://prism//lib/prism/node.rb#12794 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12845 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12830 - sig { returns(T::Boolean) } - def extended?; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12870 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12875 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12865 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12825 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#12895 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12835 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12840 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#12880 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#12803 - sig { returns(Prism::Location) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12920 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#12821 - sig { returns(String) } - def unescaped; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12860 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12855 - sig { returns(T::Boolean) } - def windows_31j?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#12799 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12930 - def type; end - end -end - -# Represents the use of the modifier `in` operator. -# -# foo in bar -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#12939 -class Prism::MatchPredicateNode < ::Prism::Node - # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void - # - # @return [MatchPredicateNode] a new instance of MatchPredicateNode - # - # source://prism//lib/prism/node.rb#12941 - def initialize(source, value, pattern, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12951 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12956 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12966 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12961 - def compact_child_nodes; end - - # def copy: (**params) -> MatchPredicateNode - # - # source://prism//lib/prism/node.rb#12971 - sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12956 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#12985 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13008 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13003 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12996 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader pattern: Node - # - # source://prism//lib/prism/node.rb#12993 - sig { returns(Prism::Node) } - def pattern; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13032 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#12990 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13042 - def type; end - end -end - -# Represents the use of the `=>` operator. -# -# foo => bar -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13051 -class Prism::MatchRequiredNode < ::Prism::Node - # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void - # - # @return [MatchRequiredNode] a new instance of MatchRequiredNode - # - # source://prism//lib/prism/node.rb#13053 - def initialize(source, value, pattern, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13063 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13068 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13078 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13073 - def compact_child_nodes; end - - # def copy: (**params) -> MatchRequiredNode - # - # source://prism//lib/prism/node.rb#13083 - sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13068 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#13097 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13120 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13115 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#13108 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader pattern: Node - # - # source://prism//lib/prism/node.rb#13105 - sig { returns(Prism::Node) } - def pattern; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13144 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#13102 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13154 - def type; end - end -end - -# Represents writing local variables using a regular expression match with named capture groups. -# -# /(?bar)/ =~ baz -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13163 -class Prism::MatchWriteNode < ::Prism::Node - # def initialize: (CallNode call, Array[Node] targets, Location location) -> void - # - # @return [MatchWriteNode] a new instance of MatchWriteNode - # - # source://prism//lib/prism/node.rb#13165 - def initialize(source, call, targets, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13174 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader call: CallNode - # - # source://prism//lib/prism/node.rb#13212 - sig { returns(Prism::CallNode) } - def call; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13189 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13184 - def compact_child_nodes; end - - # def copy: (**params) -> MatchWriteNode - # - # source://prism//lib/prism/node.rb#13194 - sig { params(params: T.untyped).returns(Prism::MatchWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[Node], location: Location } - # - # source://prism//lib/prism/node.rb#13207 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13219 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader targets: Array[Node] - # - # source://prism//lib/prism/node.rb#13215 - sig { returns(T::Array[Prism::Node]) } - def targets; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13241 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13251 - def type; end - end -end - -# Represents a node that is missing from the source and results in a syntax error. -# -# source://prism//lib/prism/node.rb#13257 -class Prism::MissingNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [MissingNode] a new instance of MissingNode - # - # source://prism//lib/prism/node.rb#13259 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13266 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13281 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13276 - def compact_child_nodes; end - - # def copy: (**params) -> MissingNode - # - # source://prism//lib/prism/node.rb#13286 - sig { params(params: T.untyped).returns(Prism::MissingNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#13297 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13303 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13322 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13332 - def type; end - end -end - -# Represents a module declaration involving the `module` keyword. -# -# module Foo end -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13341 -class Prism::ModuleNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Node constant_path, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void - # - # @return [ModuleNode] a new instance of ModuleNode - # - # source://prism//lib/prism/node.rb#13343 - def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13356 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#13413 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13361 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13374 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13366 - def compact_child_nodes; end - - # attr_reader constant_path: Node - # - # source://prism//lib/prism/node.rb#13410 - sig { returns(Prism::Node) } - def constant_path; end - - # def copy: (**params) -> ModuleNode - # - # source://prism//lib/prism/node.rb#13379 - sig { params(params: T.untyped).returns(Prism::ModuleNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13361 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#13396 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#13431 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#13416 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13436 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#13401 - sig { returns(T::Array[Symbol]) } - def locals; end - - # def module_keyword: () -> String - # - # source://prism//lib/prism/node.rb#13426 - sig { returns(String) } - def module_keyword; end - - # attr_reader module_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#13404 - sig { returns(Prism::Location) } - def module_keyword_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#13422 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13467 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13477 - def type; end - end -end - -# Represents a multi-target expression. -# -# a, (b, c) = 1, 2, 3 -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#13486 -class Prism::MultiTargetNode < ::Prism::Node - # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void - # - # @return [MultiTargetNode] a new instance of MultiTargetNode - # - # source://prism//lib/prism/node.rb#13488 - def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13500 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13505 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13519 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13510 - def compact_child_nodes; end - - # def copy: (**params) -> MultiTargetNode - # - # source://prism//lib/prism/node.rb#13524 - sig { params(params: T.untyped).returns(Prism::MultiTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13505 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#13540 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13589 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader lefts: Array[Node] - # - # source://prism//lib/prism/node.rb#13545 - sig { returns(T::Array[Prism::Node]) } - def lefts; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#13579 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#13554 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#13548 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # attr_reader rights: Array[Node] - # - # source://prism//lib/prism/node.rb#13551 - sig { returns(T::Array[Prism::Node]) } - def rights; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#13584 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#13566 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13618 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13628 - def type; end - end -end - -# Represents a write to a multi-target expression. -# -# a, b, c = 1, 2, 3 -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13637 -class Prism::MultiWriteNode < ::Prism::Node - # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [MultiWriteNode] a new instance of MultiWriteNode - # - # source://prism//lib/prism/node.rb#13639 - def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13653 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13658 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13673 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13663 - def compact_child_nodes; end - - # def copy: (**params) -> MultiWriteNode - # - # source://prism//lib/prism/node.rb#13678 - sig { params(params: T.untyped).returns(Prism::MultiWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13658 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#13696 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13759 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader lefts: Array[Node] - # - # source://prism//lib/prism/node.rb#13701 - sig { returns(T::Array[Prism::Node]) } - def lefts; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#13744 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#13710 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13754 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#13734 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#13704 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # attr_reader rights: Array[Node] - # - # source://prism//lib/prism/node.rb#13707 - sig { returns(T::Array[Prism::Node]) } - def rights; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#13749 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#13722 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13791 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#13740 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13801 - def type; end - end -end - -# This visitor walks through the tree and copies each node as it is being -# visited. This is useful for consumers that want to mutate the tree, as you -# can change subtrees in place without effecting the rest of the tree. -# -# source://prism//lib/prism/mutation_compiler.rb#12 -class Prism::MutationCompiler < ::Prism::Compiler - # Copy a AliasGlobalVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#14 - def visit_alias_global_variable_node(node); end - - # Copy a AliasMethodNode node - # - # source://prism//lib/prism/mutation_compiler.rb#19 - def visit_alias_method_node(node); end - - # Copy a AlternationPatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#24 - def visit_alternation_pattern_node(node); end - - # Copy a AndNode node - # - # source://prism//lib/prism/mutation_compiler.rb#29 - def visit_and_node(node); end - - # Copy a ArgumentsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#34 - def visit_arguments_node(node); end - - # Copy a ArrayNode node - # - # source://prism//lib/prism/mutation_compiler.rb#39 - def visit_array_node(node); end - - # Copy a ArrayPatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#44 - def visit_array_pattern_node(node); end - - # Copy a AssocNode node - # - # source://prism//lib/prism/mutation_compiler.rb#49 - def visit_assoc_node(node); end - - # Copy a AssocSplatNode node - # - # source://prism//lib/prism/mutation_compiler.rb#54 - def visit_assoc_splat_node(node); end - - # Copy a BackReferenceReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#59 - def visit_back_reference_read_node(node); end - - # Copy a BeginNode node - # - # source://prism//lib/prism/mutation_compiler.rb#64 - def visit_begin_node(node); end - - # Copy a BlockArgumentNode node - # - # source://prism//lib/prism/mutation_compiler.rb#69 - def visit_block_argument_node(node); end - - # Copy a BlockLocalVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#74 - def visit_block_local_variable_node(node); end - - # Copy a BlockNode node - # - # source://prism//lib/prism/mutation_compiler.rb#79 - def visit_block_node(node); end - - # Copy a BlockParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#84 - def visit_block_parameter_node(node); end - - # Copy a BlockParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#89 - def visit_block_parameters_node(node); end - - # Copy a BreakNode node - # - # source://prism//lib/prism/mutation_compiler.rb#94 - def visit_break_node(node); end - - # Copy a CallAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#99 - def visit_call_and_write_node(node); end - - # Copy a CallNode node - # - # source://prism//lib/prism/mutation_compiler.rb#104 - def visit_call_node(node); end - - # Copy a CallOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#109 - def visit_call_operator_write_node(node); end - - # Copy a CallOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#114 - def visit_call_or_write_node(node); end - - # Copy a CallTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#119 - def visit_call_target_node(node); end - - # Copy a CapturePatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#124 - def visit_capture_pattern_node(node); end - - # Copy a CaseMatchNode node - # - # source://prism//lib/prism/mutation_compiler.rb#129 - def visit_case_match_node(node); end - - # Copy a CaseNode node - # - # source://prism//lib/prism/mutation_compiler.rb#134 - def visit_case_node(node); end - - # Copy a ClassNode node - # - # source://prism//lib/prism/mutation_compiler.rb#139 - def visit_class_node(node); end - - # Copy a ClassVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#144 - def visit_class_variable_and_write_node(node); end - - # Copy a ClassVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#149 - def visit_class_variable_operator_write_node(node); end - - # Copy a ClassVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#154 - def visit_class_variable_or_write_node(node); end - - # Copy a ClassVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#159 - def visit_class_variable_read_node(node); end - - # Copy a ClassVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#164 - def visit_class_variable_target_node(node); end - - # Copy a ClassVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#169 - def visit_class_variable_write_node(node); end - - # Copy a ConstantAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#174 - def visit_constant_and_write_node(node); end - - # Copy a ConstantOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#179 - def visit_constant_operator_write_node(node); end - - # Copy a ConstantOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#184 - def visit_constant_or_write_node(node); end - - # Copy a ConstantPathAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#189 - def visit_constant_path_and_write_node(node); end - - # Copy a ConstantPathNode node - # - # source://prism//lib/prism/mutation_compiler.rb#194 - def visit_constant_path_node(node); end - - # Copy a ConstantPathOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#199 - def visit_constant_path_operator_write_node(node); end - - # Copy a ConstantPathOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#204 - def visit_constant_path_or_write_node(node); end - - # Copy a ConstantPathTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#209 - def visit_constant_path_target_node(node); end - - # Copy a ConstantPathWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#214 - def visit_constant_path_write_node(node); end - - # Copy a ConstantReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#219 - def visit_constant_read_node(node); end - - # Copy a ConstantTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#224 - def visit_constant_target_node(node); end - - # Copy a ConstantWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#229 - def visit_constant_write_node(node); end - - # Copy a DefNode node - # - # source://prism//lib/prism/mutation_compiler.rb#234 - def visit_def_node(node); end - - # Copy a DefinedNode node - # - # source://prism//lib/prism/mutation_compiler.rb#239 - def visit_defined_node(node); end - - # Copy a ElseNode node - # - # source://prism//lib/prism/mutation_compiler.rb#244 - def visit_else_node(node); end - - # Copy a EmbeddedStatementsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#249 - def visit_embedded_statements_node(node); end - - # Copy a EmbeddedVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#254 - def visit_embedded_variable_node(node); end - - # Copy a EnsureNode node - # - # source://prism//lib/prism/mutation_compiler.rb#259 - def visit_ensure_node(node); end - - # Copy a FalseNode node - # - # source://prism//lib/prism/mutation_compiler.rb#264 - def visit_false_node(node); end - - # Copy a FindPatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#269 - def visit_find_pattern_node(node); end - - # Copy a FlipFlopNode node - # - # source://prism//lib/prism/mutation_compiler.rb#274 - def visit_flip_flop_node(node); end - - # Copy a FloatNode node - # - # source://prism//lib/prism/mutation_compiler.rb#279 - def visit_float_node(node); end - - # Copy a ForNode node - # - # source://prism//lib/prism/mutation_compiler.rb#284 - def visit_for_node(node); end - - # Copy a ForwardingArgumentsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#289 - def visit_forwarding_arguments_node(node); end - - # Copy a ForwardingParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#294 - def visit_forwarding_parameter_node(node); end - - # Copy a ForwardingSuperNode node - # - # source://prism//lib/prism/mutation_compiler.rb#299 - def visit_forwarding_super_node(node); end - - # Copy a GlobalVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#304 - def visit_global_variable_and_write_node(node); end - - # Copy a GlobalVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#309 - def visit_global_variable_operator_write_node(node); end - - # Copy a GlobalVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#314 - def visit_global_variable_or_write_node(node); end - - # Copy a GlobalVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#319 - def visit_global_variable_read_node(node); end - - # Copy a GlobalVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#324 - def visit_global_variable_target_node(node); end - - # Copy a GlobalVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#329 - def visit_global_variable_write_node(node); end - - # Copy a HashNode node - # - # source://prism//lib/prism/mutation_compiler.rb#334 - def visit_hash_node(node); end - - # Copy a HashPatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#339 - def visit_hash_pattern_node(node); end - - # Copy a IfNode node - # - # source://prism//lib/prism/mutation_compiler.rb#344 - def visit_if_node(node); end - - # Copy a ImaginaryNode node - # - # source://prism//lib/prism/mutation_compiler.rb#349 - def visit_imaginary_node(node); end - - # Copy a ImplicitNode node - # - # source://prism//lib/prism/mutation_compiler.rb#354 - def visit_implicit_node(node); end - - # Copy a ImplicitRestNode node - # - # source://prism//lib/prism/mutation_compiler.rb#359 - def visit_implicit_rest_node(node); end - - # Copy a InNode node - # - # source://prism//lib/prism/mutation_compiler.rb#364 - def visit_in_node(node); end - - # Copy a IndexAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#369 - def visit_index_and_write_node(node); end - - # Copy a IndexOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#374 - def visit_index_operator_write_node(node); end - - # Copy a IndexOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#379 - def visit_index_or_write_node(node); end - - # Copy a IndexTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#384 - def visit_index_target_node(node); end - - # Copy a InstanceVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#389 - def visit_instance_variable_and_write_node(node); end - - # Copy a InstanceVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#394 - def visit_instance_variable_operator_write_node(node); end - - # Copy a InstanceVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#399 - def visit_instance_variable_or_write_node(node); end - - # Copy a InstanceVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#404 - def visit_instance_variable_read_node(node); end - - # Copy a InstanceVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#409 - def visit_instance_variable_target_node(node); end - - # Copy a InstanceVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#414 - def visit_instance_variable_write_node(node); end - - # Copy a IntegerNode node - # - # source://prism//lib/prism/mutation_compiler.rb#419 - def visit_integer_node(node); end - - # Copy a InterpolatedMatchLastLineNode node - # - # source://prism//lib/prism/mutation_compiler.rb#424 - def visit_interpolated_match_last_line_node(node); end - - # Copy a InterpolatedRegularExpressionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#429 - def visit_interpolated_regular_expression_node(node); end - - # Copy a InterpolatedStringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#434 - def visit_interpolated_string_node(node); end - - # Copy a InterpolatedSymbolNode node - # - # source://prism//lib/prism/mutation_compiler.rb#439 - def visit_interpolated_symbol_node(node); end - - # Copy a InterpolatedXStringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#444 - def visit_interpolated_x_string_node(node); end - - # Copy a KeywordHashNode node - # - # source://prism//lib/prism/mutation_compiler.rb#449 - def visit_keyword_hash_node(node); end - - # Copy a KeywordRestParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#454 - def visit_keyword_rest_parameter_node(node); end - - # Copy a LambdaNode node - # - # source://prism//lib/prism/mutation_compiler.rb#459 - def visit_lambda_node(node); end - - # Copy a LocalVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#464 - def visit_local_variable_and_write_node(node); end - - # Copy a LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#469 - def visit_local_variable_operator_write_node(node); end - - # Copy a LocalVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#474 - def visit_local_variable_or_write_node(node); end - - # Copy a LocalVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#479 - def visit_local_variable_read_node(node); end - - # Copy a LocalVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#484 - def visit_local_variable_target_node(node); end - - # Copy a LocalVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#489 - def visit_local_variable_write_node(node); end - - # Copy a MatchLastLineNode node - # - # source://prism//lib/prism/mutation_compiler.rb#494 - def visit_match_last_line_node(node); end - - # Copy a MatchPredicateNode node - # - # source://prism//lib/prism/mutation_compiler.rb#499 - def visit_match_predicate_node(node); end - - # Copy a MatchRequiredNode node - # - # source://prism//lib/prism/mutation_compiler.rb#504 - def visit_match_required_node(node); end - - # Copy a MatchWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#509 - def visit_match_write_node(node); end - - # Copy a MissingNode node - # - # source://prism//lib/prism/mutation_compiler.rb#514 - def visit_missing_node(node); end - - # Copy a ModuleNode node - # - # source://prism//lib/prism/mutation_compiler.rb#519 - def visit_module_node(node); end - - # Copy a MultiTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#524 - def visit_multi_target_node(node); end - - # Copy a MultiWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#529 - def visit_multi_write_node(node); end - - # Copy a NextNode node - # - # source://prism//lib/prism/mutation_compiler.rb#534 - def visit_next_node(node); end - - # Copy a NilNode node - # - # source://prism//lib/prism/mutation_compiler.rb#539 - def visit_nil_node(node); end - - # Copy a NoKeywordsParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#544 - def visit_no_keywords_parameter_node(node); end - - # Copy a NumberedParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#549 - def visit_numbered_parameters_node(node); end - - # Copy a NumberedReferenceReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#554 - def visit_numbered_reference_read_node(node); end - - # Copy a OptionalKeywordParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#559 - def visit_optional_keyword_parameter_node(node); end - - # Copy a OptionalParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#564 - def visit_optional_parameter_node(node); end - - # Copy a OrNode node - # - # source://prism//lib/prism/mutation_compiler.rb#569 - def visit_or_node(node); end - - # Copy a ParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#574 - def visit_parameters_node(node); end - - # Copy a ParenthesesNode node - # - # source://prism//lib/prism/mutation_compiler.rb#579 - def visit_parentheses_node(node); end - - # Copy a PinnedExpressionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#584 - def visit_pinned_expression_node(node); end - - # Copy a PinnedVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#589 - def visit_pinned_variable_node(node); end - - # Copy a PostExecutionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#594 - def visit_post_execution_node(node); end - - # Copy a PreExecutionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#599 - def visit_pre_execution_node(node); end - - # Copy a ProgramNode node - # - # source://prism//lib/prism/mutation_compiler.rb#604 - def visit_program_node(node); end - - # Copy a RangeNode node - # - # source://prism//lib/prism/mutation_compiler.rb#609 - def visit_range_node(node); end - - # Copy a RationalNode node - # - # source://prism//lib/prism/mutation_compiler.rb#614 - def visit_rational_node(node); end - - # Copy a RedoNode node - # - # source://prism//lib/prism/mutation_compiler.rb#619 - def visit_redo_node(node); end - - # Copy a RegularExpressionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#624 - def visit_regular_expression_node(node); end - - # Copy a RequiredKeywordParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#629 - def visit_required_keyword_parameter_node(node); end - - # Copy a RequiredParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#634 - def visit_required_parameter_node(node); end - - # Copy a RescueModifierNode node - # - # source://prism//lib/prism/mutation_compiler.rb#639 - def visit_rescue_modifier_node(node); end - - # Copy a RescueNode node - # - # source://prism//lib/prism/mutation_compiler.rb#644 - def visit_rescue_node(node); end - - # Copy a RestParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#649 - def visit_rest_parameter_node(node); end - - # Copy a RetryNode node - # - # source://prism//lib/prism/mutation_compiler.rb#654 - def visit_retry_node(node); end - - # Copy a ReturnNode node - # - # source://prism//lib/prism/mutation_compiler.rb#659 - def visit_return_node(node); end - - # Copy a SelfNode node - # - # source://prism//lib/prism/mutation_compiler.rb#664 - def visit_self_node(node); end - - # Copy a SingletonClassNode node - # - # source://prism//lib/prism/mutation_compiler.rb#669 - def visit_singleton_class_node(node); end - - # Copy a SourceEncodingNode node - # - # source://prism//lib/prism/mutation_compiler.rb#674 - def visit_source_encoding_node(node); end - - # Copy a SourceFileNode node - # - # source://prism//lib/prism/mutation_compiler.rb#679 - def visit_source_file_node(node); end - - # Copy a SourceLineNode node - # - # source://prism//lib/prism/mutation_compiler.rb#684 - def visit_source_line_node(node); end - - # Copy a SplatNode node - # - # source://prism//lib/prism/mutation_compiler.rb#689 - def visit_splat_node(node); end - - # Copy a StatementsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#694 - def visit_statements_node(node); end - - # Copy a StringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#699 - def visit_string_node(node); end - - # Copy a SuperNode node - # - # source://prism//lib/prism/mutation_compiler.rb#704 - def visit_super_node(node); end - - # Copy a SymbolNode node - # - # source://prism//lib/prism/mutation_compiler.rb#709 - def visit_symbol_node(node); end - - # Copy a TrueNode node - # - # source://prism//lib/prism/mutation_compiler.rb#714 - def visit_true_node(node); end - - # Copy a UndefNode node - # - # source://prism//lib/prism/mutation_compiler.rb#719 - def visit_undef_node(node); end - - # Copy a UnlessNode node - # - # source://prism//lib/prism/mutation_compiler.rb#724 - def visit_unless_node(node); end - - # Copy a UntilNode node - # - # source://prism//lib/prism/mutation_compiler.rb#729 - def visit_until_node(node); end - - # Copy a WhenNode node - # - # source://prism//lib/prism/mutation_compiler.rb#734 - def visit_when_node(node); end - - # Copy a WhileNode node - # - # source://prism//lib/prism/mutation_compiler.rb#739 - def visit_while_node(node); end - - # Copy a XStringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#744 - def visit_x_string_node(node); end - - # Copy a YieldNode node - # - # source://prism//lib/prism/mutation_compiler.rb#749 - def visit_yield_node(node); end -end - -# Represents the use of the `next` keyword. -# -# next 1 -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#13810 -class Prism::NextNode < ::Prism::Node - # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void - # - # @return [NextNode] a new instance of NextNode - # - # source://prism//lib/prism/node.rb#13812 - def initialize(source, arguments, keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13821 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#13861 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13826 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13838 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13831 - def compact_child_nodes; end - - # def copy: (**params) -> NextNode - # - # source://prism//lib/prism/node.rb#13843 - sig { params(params: T.untyped).returns(Prism::NextNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13826 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#13856 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13876 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#13871 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#13864 - sig { returns(Prism::Location) } - def keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13902 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13912 - def type; end - end -end - -# Represents the use of the `nil` keyword. -# -# nil -# ^^^ -# -# source://prism//lib/prism/node.rb#13921 -class Prism::NilNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [NilNode] a new instance of NilNode - # - # source://prism//lib/prism/node.rb#13923 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13930 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13935 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13945 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13940 - def compact_child_nodes; end - - # def copy: (**params) -> NilNode - # - # source://prism//lib/prism/node.rb#13950 - sig { params(params: T.untyped).returns(Prism::NilNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13935 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#13961 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#13967 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13986 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13996 - def type; end - end -end - -# Represents the use of `**nil` inside method arguments. -# -# def a(**nil) -# ^^^^^ -# end -# -# source://prism//lib/prism/node.rb#14006 -class Prism::NoKeywordsParameterNode < ::Prism::Node - # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void - # - # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode - # - # source://prism//lib/prism/node.rb#14008 - def initialize(source, operator_loc, keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14017 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14022 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14032 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14027 - def compact_child_nodes; end - - # def copy: (**params) -> NoKeywordsParameterNode - # - # source://prism//lib/prism/node.rb#14037 - sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14022 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#14050 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#14078 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#14073 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#14061 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#14068 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#14055 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14099 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14109 - def type; end - end -end - -# This represents a node in the tree. It is the parent class of all of the -# various node types. -# -# source://prism//lib/prism/node.rb#11 -class Prism::Node - # Accepts a visitor and calls back into the specialized visit function. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#62 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # Returns an array of child nodes, including `nil`s in the place of optional - # nodes that were not present. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#68 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # Returns an array of child nodes and locations that could potentially have - # comments attached to them. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#82 - def comment_targets; end - - # Returns an array of child nodes, excluding any `nil`s in the place of - # optional nodes that were not present. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#76 - sig { returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # Returns an array of child nodes, including `nil`s in the place of optional - # nodes that were not present. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#68 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # A Location instance that represents the location of this node in the - # source. - # - # source://prism//lib/prism/node.rb#18 - sig { returns(Prism::Location) } - def location; end - - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#23 - def newline?; end - - # Similar to inspect, but respects the current level of indentation given by - # the pretty print object. - # - # source://prism//lib/prism/node.rb#42 - def pretty_print(q); end - - # source://prism//lib/prism/node.rb#27 - def set_newline_flag(newline_marked); end - - # Slice the location of the node from the source. - # - # source://prism//lib/prism/node.rb#36 - sig { returns(String) } - def slice; end - - # Convert this node into a graphviz dot graph string. - # - # source://prism//lib/prism/node.rb#50 - sig { returns(String) } - def to_dot; end - - # Returns a symbol symbolizing the type of node that this represents. This - # is particularly useful for case statements and array comparisons. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#88 - sig { returns(Symbol) } - def type; end - - private - - # A pointer to the source that this node was created from. - # - # source://prism//lib/prism/node.rb#13 - def source; end -end - -# This object is responsible for generating the output for the inspect method -# implementations of child nodes. -# -# source://prism//lib/prism/node_inspector.rb#6 -class Prism::NodeInspector - # @return [NodeInspector] a new instance of NodeInspector - # - # source://prism//lib/prism/node_inspector.rb#9 - def initialize(prefix = T.unsafe(nil)); end - - # Appends a line to the output with the current prefix. - # - # source://prism//lib/prism/node_inspector.rb#15 - sig { params(line: String).void } - def <<(line); end - - # Returns a new inspector that can be used to inspect a child node. - # - # source://prism//lib/prism/node_inspector.rb#59 - sig { params(append: String).returns(Prism::NodeInspector) } - def child_inspector(append); end - - # Generates a string that represents a child node. - # - # source://prism//lib/prism/node_inspector.rb#54 - sig { params(node: Prism::Node, append: String).returns(String) } - def child_node(node, append); end - - # This generates a string that is used as the header of the inspect output - # for any given node. - # - # source://prism//lib/prism/node_inspector.rb#21 - # This generates a string that is used as the header of the inspect output - sig { params(node: Prism::Node).returns(String) } - def header(node); end - - # Generates a string that represents a list of nodes. It handles properly - # using the box drawing characters to make the output look nice. - # - # source://prism//lib/prism/node_inspector.rb#31 - # Generates a string that represents a list of nodes. It handles properly - sig { params(prefix: String, nodes: T::Array[Prism::Node]).returns(String) } - def list(prefix, nodes); end - - # Generates a string that represents a location field on a node. - # - # source://prism//lib/prism/node_inspector.rb#45 - sig { params(value: Prism::Location).returns(String) } - def location(value); end - - # source://prism//lib/prism/node_inspector.rb#7 - sig { returns(String) } - def output; end - - # source://prism//lib/prism/node_inspector.rb#7 - sig { returns(String) } - def prefix; end - - # Returns the output as a string. - # - # source://prism//lib/prism/node_inspector.rb#64 - sig { returns(String) } - def to_str; end -end - -# Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. -# -# -> { _1 + _2 } -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#14118 -class Prism::NumberedParametersNode < ::Prism::Node - # def initialize: (Integer maximum, Location location) -> void - # - # @return [NumberedParametersNode] a new instance of NumberedParametersNode - # - # source://prism//lib/prism/node.rb#14120 - def initialize(source, maximum, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14128 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14143 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14138 - def compact_child_nodes; end - - # def copy: (**params) -> NumberedParametersNode - # - # source://prism//lib/prism/node.rb#14148 - sig { params(params: T.untyped).returns(Prism::NumberedParametersNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#14160 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#14169 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader maximum: Integer - # - # source://prism//lib/prism/node.rb#14165 - sig { returns(Integer) } - def maximum; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14189 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14199 - def type; end - end -end - -# Represents reading a numbered reference to a capture in the previous match. -# -# $1 -# ^^ -# -# source://prism//lib/prism/node.rb#14208 -class Prism::NumberedReferenceReadNode < ::Prism::Node - # def initialize: (Integer number, Location location) -> void - # - # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode - # - # source://prism//lib/prism/node.rb#14210 - def initialize(source, number, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14218 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14223 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14233 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14228 - def compact_child_nodes; end - - # def copy: (**params) -> NumberedReferenceReadNode - # - # source://prism//lib/prism/node.rb#14238 - sig { params(params: T.untyped).returns(Prism::NumberedReferenceReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14223 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#14250 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#14265 - def inspect(inspector = T.unsafe(nil)); end - - # The (1-indexed, from the left) number of the capture group. Numbered references that would overflow a `uint32` result in a `number` of exactly `2**32 - 1`. - # - # $1 # number `1` - # - # $5432 # number `5432` - # - # $4294967296 # number `4294967295` - # - # source://prism//lib/prism/node.rb#14261 - sig { returns(Integer) } - def number; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14285 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14295 - def type; end - end -end - -# Represents an optional keyword parameter to a method, block, or lambda definition. -# -# def a(b: 1) -# ^^^^ -# end -# -# source://prism//lib/prism/node.rb#14305 -class Prism::OptionalKeywordParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Node value, Location location) -> void - # - # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode - # - # source://prism//lib/prism/node.rb#14307 - def initialize(source, flags, name, name_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14318 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14323 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14333 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14328 - def compact_child_nodes; end - - # def copy: (**params) -> OptionalKeywordParameterNode - # - # source://prism//lib/prism/node.rb#14338 - sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14323 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#14353 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#14380 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#14362 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#14365 - sig { returns(Prism::Location) } - def name_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14375 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14405 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#14371 - sig { returns(Prism::Node) } - def value; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#14358 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14415 - def type; end - end -end - -# Represents an optional parameter to a method, block, or lambda definition. -# -# def a(b = 1) -# ^^^^^ -# end -# -# source://prism//lib/prism/node.rb#14425 -class Prism::OptionalParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void - # - # @return [OptionalParameterNode] a new instance of OptionalParameterNode - # - # source://prism//lib/prism/node.rb#14427 - def initialize(source, flags, name, name_loc, operator_loc, value, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14439 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14444 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14454 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14449 - def compact_child_nodes; end - - # def copy: (**params) -> OptionalParameterNode - # - # source://prism//lib/prism/node.rb#14459 - sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14444 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location } - # - # source://prism//lib/prism/node.rb#14475 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#14513 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#14484 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#14487 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#14508 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#14493 - sig { returns(Prism::Location) } - def operator_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14503 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14539 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#14499 - sig { returns(Prism::Node) } - def value; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#14480 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14549 - def type; end - end -end - -# Represents the use of the `||` operator or the `or` keyword. -# -# left or right -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#14558 -class Prism::OrNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void - # - # @return [OrNode] a new instance of OrNode - # - # source://prism//lib/prism/node.rb#14560 - def initialize(source, left, right, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14570 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14575 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14585 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14580 - def compact_child_nodes; end - - # def copy: (**params) -> OrNode - # - # source://prism//lib/prism/node.rb#14590 - sig { params(params: T.untyped).returns(Prism::OrNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14575 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#14604 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#14642 - def inspect(inspector = T.unsafe(nil)); end - - # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # left or right - # ^^^^ - # - # 1 || 2 - # ^ - # - # source://prism//lib/prism/node.rb#14615 - sig { returns(Prism::Node) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#14637 - sig { returns(String) } - def operator; end - - # The location of the `or` keyword or the `||` operator. - # - # left or right - # ^^ - # - # source://prism//lib/prism/node.rb#14630 - sig { returns(Prism::Location) } - def operator_loc; end - - # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # left || right - # ^^^^^ - # - # 1 or 2 - # ^ - # - # source://prism//lib/prism/node.rb#14624 - sig { returns(Prism::Node) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14666 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14676 - def type; end - end -end - -# A parser for the pack template language. -# -# source://prism//lib/prism/pack.rb#5 -module Prism::Pack - class << self - def parse(_arg0, _arg1, _arg2); end - end -end - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) - -# A directive in the pack template language. -# -# source://prism//lib/prism/pack.rb#59 -class Prism::Pack::Directive - # Initialize a new directive with the given values. - # - # @return [Directive] a new instance of Directive - # - # source://prism//lib/prism/pack.rb#88 - def initialize(version, variant, source, type, signed, endian, size, length_type, length); end - - # Provide a human-readable description of the directive. - # - # source://prism//lib/prism/pack.rb#130 - def describe; end - - # The type of endianness of the directive. - # - # source://prism//lib/prism/pack.rb#76 - def endian; end - - # The length of this directive (used for integers). - # - # source://prism//lib/prism/pack.rb#85 - def length; end - - # The length type of this directive (used for integers). - # - # source://prism//lib/prism/pack.rb#82 - def length_type; end - - # The type of signedness of the directive. - # - # source://prism//lib/prism/pack.rb#73 - def signed; end - - # The size of the directive. - # - # source://prism//lib/prism/pack.rb#79 - def size; end - - # A byteslice of the source string that this directive represents. - # - # source://prism//lib/prism/pack.rb#67 - def source; end - - # The type of the directive. - # - # source://prism//lib/prism/pack.rb#70 - def type; end - - # A symbol representing whether or not we are packing or unpacking. - # - # source://prism//lib/prism/pack.rb#64 - def variant; end - - # A symbol representing the version of Ruby. - # - # source://prism//lib/prism/pack.rb#61 - def version; end -end - -# The descriptions of the various types of endianness. -# -# source://prism//lib/prism/pack.rb#101 -Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# The descriptions of the various types of signedness. -# -# source://prism//lib/prism/pack.rb#110 -Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# The descriptions of the various types of sizes. -# -# source://prism//lib/prism/pack.rb#117 -Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) - -# The result of parsing a pack template. -# -# source://prism//lib/prism/pack.rb#195 -class Prism::Pack::Format - # Create a new Format with the given directives and encoding. - # - # @return [Format] a new instance of Format - # - # source://prism//lib/prism/pack.rb#203 - def initialize(directives, encoding); end - - # Provide a human-readable description of the format. - # - # source://prism//lib/prism/pack.rb#209 - def describe; end - - # A list of the directives in the template. - # - # source://prism//lib/prism/pack.rb#197 - def directives; end - - # The encoding of the template. - # - # source://prism//lib/prism/pack.rb#200 - def encoding; end -end - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) - -# Flags for parameter nodes. -# -# source://prism//lib/prism/node.rb#19304 -module Prism::ParameterFlags; end - -# a parameter name that has been repeated in the method signature -# -# source://prism//lib/prism/node.rb#19306 -Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) - -# Represents the list of parameters on a method, block, or lambda definition. -# -# def a(b, c, d) -# ^^^^^^^ -# end -# -# source://prism//lib/prism/node.rb#14686 -class Prism::ParametersNode < ::Prism::Node - # def initialize: (Array[Node] requireds, Array[Node] optionals, Node? rest, Array[Node] posts, Array[Node] keywords, Node? keyword_rest, BlockParameterNode? block, Location location) -> void - # - # @return [ParametersNode] a new instance of ParametersNode - # - # source://prism//lib/prism/node.rb#14688 - def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14702 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader block: BlockParameterNode? - # - # source://prism//lib/prism/node.rb#14771 - sig { returns(T.nilable(Prism::BlockParameterNode)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14707 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14725 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14712 - def compact_child_nodes; end - - # def copy: (**params) -> ParametersNode - # - # source://prism//lib/prism/node.rb#14730 - sig { params(params: T.untyped).returns(Prism::ParametersNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14707 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location } - # - # source://prism//lib/prism/node.rb#14748 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#14775 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader keyword_rest: Node? - # - # source://prism//lib/prism/node.rb#14768 - sig { returns(T.nilable(Prism::Node)) } - def keyword_rest; end - - # attr_reader keywords: Array[Node] - # - # source://prism//lib/prism/node.rb#14765 - sig { returns(T::Array[Prism::Node]) } - def keywords; end - - # attr_reader optionals: Array[Node] - # - # source://prism//lib/prism/node.rb#14756 - sig { returns(T::Array[Prism::Node]) } - def optionals; end - - # attr_reader posts: Array[Node] - # - # source://prism//lib/prism/node.rb#14762 - sig { returns(T::Array[Prism::Node]) } - def posts; end - - # attr_reader requireds: Array[Node] - # - # source://prism//lib/prism/node.rb#14753 - sig { returns(T::Array[Prism::Node]) } - def requireds; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#14759 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # Mirrors the Method#parameters method. - # - # source://prism//lib/prism/node_ext.rb#172 - def signature; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14816 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14826 - def type; end - end -end - -# Represents a parenthesized expression -# -# (10 + 34) -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#14835 -class Prism::ParenthesesNode < ::Prism::Node - # def initialize: (Node? body, Location opening_loc, Location closing_loc, Location location) -> void - # - # @return [ParenthesesNode] a new instance of ParenthesesNode - # - # source://prism//lib/prism/node.rb#14837 - def initialize(source, body, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14847 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#14892 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14856 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#14913 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#14901 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14868 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14861 - def compact_child_nodes; end - - # def copy: (**params) -> ParenthesesNode - # - # source://prism//lib/prism/node.rb#14873 - sig { params(params: T.untyped).returns(Prism::ParenthesesNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14856 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Node?, opening_loc: Location, closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#14887 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#14918 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#14908 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#14895 - sig { returns(Prism::Location) } - def opening_loc; end - - # source://prism//lib/prism/node.rb#14851 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14945 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14955 - def type; end - end -end - -# This represents an error that was encountered during parsing. -# -# source://prism//lib/prism/parse_result.rb#338 -class Prism::ParseError - # Create a new error object with the given message and location. - # - # @return [ParseError] a new instance of ParseError - # - # source://prism//lib/prism/parse_result.rb#349 - def initialize(message, location, level); end - - # Implement the hash pattern matching interface for ParseError. - # - # source://prism//lib/prism/parse_result.rb#356 - def deconstruct_keys(keys); end - - # Returns a string representation of this error. - # - # source://prism//lib/prism/parse_result.rb#361 - def inspect; end - - # The level of this error. - # - # source://prism//lib/prism/parse_result.rb#346 - def level; end - - # A Location object representing the location of this error in the source. - # - # source://prism//lib/prism/parse_result.rb#343 - sig { returns(Prism::Location) } - def location; end - - # The message associated with this error. - # - # source://prism//lib/prism/parse_result.rb#340 - sig { returns(String) } - def message; end -end - -# This represents the result of a call to ::parse or ::parse_file. It contains -# the AST, any comments that were encounters, and any errors that were -# encountered. -# -# source://prism//lib/prism/parse_result.rb#398 -class Prism::ParseResult - # Create a new parse result object with the given values. - # - # @return [ParseResult] a new instance of ParseResult - # - # source://prism//lib/prism/parse_result.rb#425 - def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end - - # Attach the list of comments to their respective locations in the tree. - # - # source://prism//lib/prism/parse_result/comments.rb#173 - def attach_comments!; end - - # The list of comments that were encountered during parsing. - # - # source://prism//lib/prism/parse_result.rb#405 - sig { returns(T::Array[Prism::Comment]) } - def comments; end - - # An optional location that represents the location of the __END__ marker - # and the rest of the content of the file. This content is loaded into the - # DATA constant when the file being parsed is the main file being executed. - # - # source://prism//lib/prism/parse_result.rb#413 - def data_loc; end - - # Implement the hash pattern matching interface for ParseResult. - # - # source://prism//lib/prism/parse_result.rb#436 - def deconstruct_keys(keys); end - - # The list of errors that were generated during parsing. - # - # source://prism//lib/prism/parse_result.rb#416 - sig { returns(T::Array[Prism::ParseError]) } - def errors; end - - # Returns true if there were errors during parsing and false if there were - # not. - # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#448 - def failure?; end - - # The list of magic comments that were encountered during parsing. - # - # source://prism//lib/prism/parse_result.rb#408 - def magic_comments; end - - # Walk the tree and mark nodes that are on a new line. - # - # source://prism//lib/prism/parse_result/newlines.rb#60 - def mark_newlines!; end - - # A Source instance that represents the source code that was parsed. - # - # source://prism//lib/prism/parse_result.rb#422 - sig { returns(Prism::Source) } - def source; end - - # Returns true if there were no errors during parsing and false if there - # were. - # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#442 - def success?; end - - # The value that was generated by parsing. Normally this holds the AST, but - # it can sometimes how a list of tokens or other results passed back from - # the parser. - # - # source://prism//lib/prism/parse_result.rb#402 - sig { returns(Prism::ProgramNode) } - def value; end - - # The list of warnings that were generated during parsing. - # - # source://prism//lib/prism/parse_result.rb#419 - sig { returns(T::Array[Prism::ParseWarning]) } - def warnings; end -end - -# When we've parsed the source, we have both the syntax tree and the list of -# comments that we found in the source. This class is responsible for -# walking the tree and finding the nearest location to attach each comment. -# -# It does this by first finding the nearest locations to each comment. -# Locations can either come from nodes directly or from location fields on -# nodes. For example, a `ClassNode` has an overall location encompassing the -# entire class, but it also has a location for the `class` keyword. -# -# Once the nearest locations are found, it determines which one to attach -# to. If it's a trailing comment (a comment on the same line as other source -# code), it will favor attaching to the nearest location that occurs before -# the comment. Otherwise it will favor attaching to the nearest location -# that is after the comment. -# -# source://prism//lib/prism/parse_result/comments.rb#19 -class Prism::ParseResult::Comments - # Create a new Comments object that will attach comments to the given - # parse result. - # - # @return [Comments] a new instance of Comments - # - # source://prism//lib/prism/parse_result/comments.rb#78 - def initialize(parse_result); end - - # Attach the comments to their respective locations in the tree by - # mutating the parse result. - # - # source://prism//lib/prism/parse_result/comments.rb#84 - def attach!; end - - # The parse result that we are attaching comments to. - # - # source://prism//lib/prism/parse_result/comments.rb#74 - def parse_result; end - - private - - # Responsible for finding the nearest targets to the given comment within - # the context of the given encapsulating node. - # - # source://prism//lib/prism/parse_result/comments.rb#103 - def nearest_targets(node, comment); end -end - -# A target for attaching comments that is based on a location field on a -# node. For example, the `end` token of a ClassNode. -# -# source://prism//lib/prism/parse_result/comments.rb#49 -class Prism::ParseResult::Comments::LocationTarget - # @return [LocationTarget] a new instance of LocationTarget - # - # source://prism//lib/prism/parse_result/comments.rb#52 - def initialize(location); end - - # source://prism//lib/prism/parse_result/comments.rb#68 - def <<(comment); end - - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/comments.rb#64 - def encloses?(comment); end - - # source://prism//lib/prism/parse_result/comments.rb#60 - def end_offset; end - - # source://prism//lib/prism/parse_result/comments.rb#50 - def location; end - - # source://prism//lib/prism/parse_result/comments.rb#56 - def start_offset; end -end - -# A target for attaching comments that is based on a specific node's -# location. -# -# source://prism//lib/prism/parse_result/comments.rb#22 -class Prism::ParseResult::Comments::NodeTarget - # @return [NodeTarget] a new instance of NodeTarget - # - # source://prism//lib/prism/parse_result/comments.rb#25 - def initialize(node); end - - # source://prism//lib/prism/parse_result/comments.rb#42 - def <<(comment); end - - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/comments.rb#37 - def encloses?(comment); end - - # source://prism//lib/prism/parse_result/comments.rb#33 - def end_offset; end - - # source://prism//lib/prism/parse_result/comments.rb#23 - def node; end - - # source://prism//lib/prism/parse_result/comments.rb#29 - def start_offset; end -end - -# The :line tracepoint event gets fired whenever the Ruby VM encounters an -# expression on a new line. The types of expressions that can trigger this -# event are: -# -# * if statements -# * unless statements -# * nodes that are children of statements lists -# -# In order to keep track of the newlines, we have a list of offsets that -# come back from the parser. We assign these offsets to the first nodes that -# we find in the tree that are on those lines. -# -# Note that the logic in this file should be kept in sync with the Java -# MarkNewlinesVisitor, since that visitor is responsible for marking the -# newlines for JRuby/TruffleRuby. -# -# source://prism//lib/prism/parse_result/newlines.rb#20 -class Prism::ParseResult::Newlines < ::Prism::Visitor - # Create a new Newlines visitor with the given newline offsets. - # - # @return [Newlines] a new instance of Newlines - # - # source://prism//lib/prism/parse_result/newlines.rb#22 - def initialize(newline_marked); end - - # Permit block/lambda nodes to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#27 - def visit_block_node(node); end - - # Mark if/unless nodes as newlines. - # - # source://prism//lib/prism/parse_result/newlines.rb#41 - def visit_if_node(node); end - - # Permit block/lambda nodes to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#27 - def visit_lambda_node(node); end - - # Permit statements lists to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#49 - def visit_statements_node(node); end - - # Mark if/unless nodes as newlines. - # - # source://prism//lib/prism/parse_result/newlines.rb#41 - def visit_unless_node(node); end -end - -# This represents a warning that was encountered during parsing. -# -# source://prism//lib/prism/parse_result.rb#367 -class Prism::ParseWarning - # Create a new warning object with the given message and location. - # - # @return [ParseWarning] a new instance of ParseWarning - # - # source://prism//lib/prism/parse_result.rb#378 - def initialize(message, location, level); end - - # Implement the hash pattern matching interface for ParseWarning. - # - # source://prism//lib/prism/parse_result.rb#385 - def deconstruct_keys(keys); end - - # Returns a string representation of this warning. - # - # source://prism//lib/prism/parse_result.rb#390 - def inspect; end - - # The level of this warning. - # - # source://prism//lib/prism/parse_result.rb#375 - def level; end - - # A Location object representing the location of this warning in the source. - # - # source://prism//lib/prism/parse_result.rb#372 - sig { returns(Prism::Location) } - def location; end - - # The message associated with this warning. - # - # source://prism//lib/prism/parse_result.rb#369 - sig { returns(String) } - def message; end -end - -# A pattern is an object that wraps a Ruby pattern matching expression. The -# expression would normally be passed to an `in` clause within a `case` -# expression or a rightward assignment expression. For example, in the -# following snippet: -# -# case node -# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] -# end -# -# the pattern is the ConstantPathNode[...] expression. -# -# The pattern gets compiled into an object that responds to #call by running -# the #compile method. This method itself will run back through Prism to -# parse the expression into a tree, then walk the tree to generate the -# necessary callable objects. For example, if you wanted to compile the -# expression above into a callable, you would: -# -# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile -# callable.call(node) -# -# The callable object returned by #compile is guaranteed to respond to #call -# with a single argument, which is the node to match against. It also is -# guaranteed to respond to #===, which means it itself can be used in a `case` -# expression, as in: -# -# case node -# when callable -# end -# -# If the query given to the initializer cannot be compiled into a valid -# matcher (either because of a syntax error or because it is using syntax we -# do not yet support) then a Prism::Pattern::CompilationError will be -# raised. -# -# source://prism//lib/prism/pattern.rb#37 -class Prism::Pattern - # Create a new pattern with the given query. The query should be a string - # containing a Ruby pattern matching expression. - # - # @return [Pattern] a new instance of Pattern - # - # source://prism//lib/prism/pattern.rb#63 - def initialize(query); end - - # Compile the query into a callable object that can be used to match against - # nodes. - # - # source://prism//lib/prism/pattern.rb#70 - def compile; end - - # The query that this pattern was initialized with. - # - # source://prism//lib/prism/pattern.rb#59 - def query; end - - # Scan the given node and all of its children for nodes that match the - # pattern. If a block is given, it will be called with each node that - # matches the pattern. If no block is given, an enumerator will be returned - # that will yield each node that matches the pattern. - # - # source://prism//lib/prism/pattern.rb#79 - def scan(root); end - - private - - # Shortcut for combining two procs into one that returns true if both return - # true. - # - # source://prism//lib/prism/pattern.rb#95 - def combine_and(left, right); end - - # Shortcut for combining two procs into one that returns true if either - # returns true. - # - # source://prism//lib/prism/pattern.rb#101 - def combine_or(left, right); end - - # in foo | bar - # - # source://prism//lib/prism/pattern.rb#136 - def compile_alternation_pattern_node(node); end - - # in [foo, bar, baz] - # - # source://prism//lib/prism/pattern.rb#111 - def compile_array_pattern_node(node); end - - # in Prism::ConstantReadNode - # - # source://prism//lib/prism/pattern.rb#141 - def compile_constant_path_node(node); end - - # in ConstantReadNode - # in String - # - # source://prism//lib/prism/pattern.rb#153 - def compile_constant_read_node(node); end - - # Raise an error because the given node is not supported. - # - # @raise [CompilationError] - # - # source://prism//lib/prism/pattern.rb#106 - def compile_error(node); end - - # in InstanceVariableReadNode[name: Symbol] - # in { name: Symbol } - # - # source://prism//lib/prism/pattern.rb#171 - def compile_hash_pattern_node(node); end - - # in nil - # - # source://prism//lib/prism/pattern.rb#196 - def compile_nil_node(node); end - - # Compile any kind of node. Dispatch out to the individual compilation - # methods based on the type of node. - # - # source://prism//lib/prism/pattern.rb#225 - def compile_node(node); end - - # in /foo/ - # - # source://prism//lib/prism/pattern.rb#201 - def compile_regular_expression_node(node); end - - # in "" - # in "foo" - # - # source://prism//lib/prism/pattern.rb#209 - def compile_string_node(node); end - - # in :+ - # in :foo - # - # source://prism//lib/prism/pattern.rb#217 - def compile_symbol_node(node); end -end - -# Raised when the query given to a pattern is either invalid Ruby syntax or -# is using syntax that we don't yet support. -# -# source://prism//lib/prism/pattern.rb#40 -class Prism::Pattern::CompilationError < ::StandardError - # Create a new CompilationError with the given representation of the node - # that caused the error. - # - # @return [CompilationError] a new instance of CompilationError - # - # source://prism//lib/prism/pattern.rb#43 - def initialize(repr); end -end - -# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. -# -# foo in ^(bar) -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#14964 -class Prism::PinnedExpressionNode < ::Prism::Node - # def initialize: (Node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void - # - # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode - # - # source://prism//lib/prism/node.rb#14966 - def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14977 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14982 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14992 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14987 - def compact_child_nodes; end - - # def copy: (**params) -> PinnedExpressionNode - # - # source://prism//lib/prism/node.rb#14997 - sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14982 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#15012 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader expression: Node - # - # source://prism//lib/prism/node.rb#15017 - sig { returns(Prism::Node) } - def expression; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#15054 - def inspect(inspector = T.unsafe(nil)); end - - # def lparen: () -> String - # - # source://prism//lib/prism/node.rb#15044 - sig { returns(String) } - def lparen; end - - # attr_reader lparen_loc: Location - # - # source://prism//lib/prism/node.rb#15026 - sig { returns(Prism::Location) } - def lparen_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#15039 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#15020 - sig { returns(Prism::Location) } - def operator_loc; end - - # def rparen: () -> String - # - # source://prism//lib/prism/node.rb#15049 - sig { returns(String) } - def rparen; end - - # attr_reader rparen_loc: Location - # - # source://prism//lib/prism/node.rb#15032 - sig { returns(Prism::Location) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15078 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15088 - def type; end - end -end - -# Represents the use of the `^` operator for pinning a variable in a pattern matching expression. -# -# foo in ^bar -# ^^^^ -# -# source://prism//lib/prism/node.rb#15097 -class Prism::PinnedVariableNode < ::Prism::Node - # def initialize: (Node variable, Location operator_loc, Location location) -> void - # - # @return [PinnedVariableNode] a new instance of PinnedVariableNode - # - # source://prism//lib/prism/node.rb#15099 - def initialize(source, variable, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15108 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15113 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15123 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15118 - def compact_child_nodes; end - - # def copy: (**params) -> PinnedVariableNode - # - # source://prism//lib/prism/node.rb#15128 - sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15113 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Node, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#15141 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#15161 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#15156 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#15149 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15183 - def type; end - - # attr_reader variable: Node - # - # source://prism//lib/prism/node.rb#15146 - sig { returns(Prism::Node) } - def variable; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15193 - def type; end - end -end - -# Represents the use of the `END` keyword. -# -# END { foo } -# ^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15202 -class Prism::PostExecutionNode < ::Prism::Node - # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void - # - # @return [PostExecutionNode] a new instance of PostExecutionNode - # - # source://prism//lib/prism/node.rb#15204 - def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15215 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15220 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#15289 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#15272 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15232 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15225 - def compact_child_nodes; end - - # def copy: (**params) -> PostExecutionNode - # - # source://prism//lib/prism/node.rb#15237 - sig { params(params: T.untyped).returns(Prism::PostExecutionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15220 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#15252 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#15294 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#15279 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#15260 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#15284 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#15266 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#15257 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15322 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15332 - def type; end - end -end - -# Represents the use of the `BEGIN` keyword. -# -# BEGIN { foo } -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15341 -class Prism::PreExecutionNode < ::Prism::Node - # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void - # - # @return [PreExecutionNode] a new instance of PreExecutionNode - # - # source://prism//lib/prism/node.rb#15343 - def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15354 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15359 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#15428 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#15411 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15371 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15364 - def compact_child_nodes; end - - # def copy: (**params) -> PreExecutionNode - # - # source://prism//lib/prism/node.rb#15376 - sig { params(params: T.untyped).returns(Prism::PreExecutionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15359 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#15391 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#15433 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#15418 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#15399 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#15423 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#15405 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#15396 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15461 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15471 - def type; end - end -end - -# The top level node of any parse tree. -# -# source://prism//lib/prism/node.rb#15477 -class Prism::ProgramNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void - # - # @return [ProgramNode] a new instance of ProgramNode - # - # source://prism//lib/prism/node.rb#15479 - def initialize(source, locals, statements, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15488 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15493 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15503 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15498 - def compact_child_nodes; end - - # def copy: (**params) -> ProgramNode - # - # source://prism//lib/prism/node.rb#15508 - sig { params(params: T.untyped).returns(Prism::ProgramNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15493 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } - # - # source://prism//lib/prism/node.rb#15521 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#15533 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#15526 - sig { returns(T::Array[Symbol]) } - def locals; end - - # attr_reader statements: StatementsNode - # - # source://prism//lib/prism/node.rb#15529 - sig { returns(Prism::StatementsNode) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15555 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15565 - def type; end - end -end - -# Flags for range and flip-flop nodes. -# -# source://prism//lib/prism/node.rb#19310 -module Prism::RangeFlags; end - -# ... operator -# -# source://prism//lib/prism/node.rb#19312 -Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) - -# Represents the use of the `..` or `...` operators. -# -# 1..2 -# ^^^^ -# -# c if a =~ /left/ ... b =~ /right/ -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15577 -class Prism::RangeNode < ::Prism::Node - # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void - # - # @return [RangeNode] a new instance of RangeNode - # - # source://prism//lib/prism/node.rb#15579 - def initialize(source, flags, left, right, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15590 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15595 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15608 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15600 - def compact_child_nodes; end - - # def copy: (**params) -> RangeNode - # - # source://prism//lib/prism/node.rb#15613 - sig { params(params: T.untyped).returns(Prism::RangeNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15595 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#15628 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def exclude_end?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15663 - sig { returns(T::Boolean) } - def exclude_end?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#15673 - def inspect(inspector = T.unsafe(nil)); end - - # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # 1... - # ^ - # - # hello...goodbye - # ^^^^^ - # - # source://prism//lib/prism/node.rb#15643 - sig { returns(T.nilable(Prism::Node)) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#15668 - sig { returns(String) } - def operator; end - - # The location of the `..` or `...` operator. - # - # source://prism//lib/prism/node.rb#15656 - sig { returns(Prism::Location) } - def operator_loc; end - - # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # ..5 - # ^ - # - # 1...foo - # ^^^ - # If neither right-hand or left-hand side was included, this will be a MissingNode. - # - # source://prism//lib/prism/node.rb#15653 - sig { returns(T.nilable(Prism::Node)) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15707 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15633 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15717 - def type; end - end -end - -# Represents a rational number literal. -# -# 1.0r -# ^^^^ -# -# source://prism//lib/prism/node.rb#15726 -class Prism::RationalNode < ::Prism::Node - # def initialize: (Node numeric, Location location) -> void - # - # @return [RationalNode] a new instance of RationalNode - # - # source://prism//lib/prism/node.rb#15728 - def initialize(source, numeric, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15736 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15751 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15746 - def compact_child_nodes; end - - # def copy: (**params) -> RationalNode - # - # source://prism//lib/prism/node.rb#15756 - sig { params(params: T.untyped).returns(Prism::RationalNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } - # - # source://prism//lib/prism/node.rb#15768 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#15777 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader numeric: Node - # - # source://prism//lib/prism/node.rb#15773 - sig { returns(Prism::Node) } - def numeric; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15798 - def type; end - - # Returns the value of the node as a Ruby Rational. - # - # source://prism//lib/prism/node_ext.rb#83 - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15808 - def type; end - end -end - -# Represents the use of the `redo` keyword. -# -# redo -# ^^^^ -# -# source://prism//lib/prism/node.rb#15817 -class Prism::RedoNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [RedoNode] a new instance of RedoNode - # - # source://prism//lib/prism/node.rb#15819 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15826 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15831 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15841 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15836 - def compact_child_nodes; end - - # def copy: (**params) -> RedoNode - # - # source://prism//lib/prism/node.rb#15846 - sig { params(params: T.untyped).returns(Prism::RedoNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15831 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#15857 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#15863 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15882 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15892 - def type; end - end -end - -# Flags for regular expression and match last line nodes. -# -# source://prism//lib/prism/node.rb#19316 -module Prism::RegularExpressionFlags; end - -# n - forces the ASCII-8BIT encoding -# -# source://prism//lib/prism/node.rb#19333 -Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) - -# e - forces the EUC-JP encoding -# -# source://prism//lib/prism/node.rb#19330 -Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) - -# x - ignores whitespace and allows comments in regular expressions -# -# source://prism//lib/prism/node.rb#19321 -Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#19345 -Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to US-ASCII -# -# source://prism//lib/prism/node.rb#19348 -Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to UTF-8 -# -# source://prism//lib/prism/node.rb#19342 -Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) - -# i - ignores the case of characters when matching -# -# source://prism//lib/prism/node.rb#19318 -Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) - -# m - allows $ to match the end of lines within strings -# -# source://prism//lib/prism/node.rb#19324 -Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) - -# o - only interpolates values into the regular expression once -# -# source://prism//lib/prism/node.rb#19327 -Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) - -# u - forces the UTF-8 encoding -# -# source://prism//lib/prism/node.rb#19339 -Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) - -# s - forces the Windows-31J encoding -# -# source://prism//lib/prism/node.rb#19336 -Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) - -# Represents a regular expression literal with no interpolation. -# -# /foo/i -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#15901 -class Prism::RegularExpressionNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void - # - # @return [RegularExpressionNode] a new instance of RegularExpressionNode - # - # source://prism//lib/prism/node.rb#15903 - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15915 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16007 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15920 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#16047 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#15972 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15930 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15925 - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#16042 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#15966 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (**params) -> RegularExpressionNode - # - # source://prism//lib/prism/node.rb#15935 - sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15920 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } - # - # source://prism//lib/prism/node.rb#15951 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16002 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15987 - sig { returns(T::Boolean) } - def extended?; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16027 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16032 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16022 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15982 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16052 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15992 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15997 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#16037 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#15960 - sig { returns(Prism::Location) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16077 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#15978 - sig { returns(String) } - def unescaped; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16017 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16012 - sig { returns(T::Boolean) } - def windows_31j?; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15956 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16087 - def type; end - end -end - -# source://prism//lib/prism/node_ext.rb#6 -module Prism::RegularExpressionOptions - # Returns a numeric value that represents the flags that were used to create - # the regular expression. - # - # source://prism//lib/prism/node_ext.rb#9 - def options; end -end - -# Represents a required keyword parameter to a method, block, or lambda definition. -# -# def a(b: ) -# ^^ -# end -# -# source://prism//lib/prism/node.rb#16097 -class Prism::RequiredKeywordParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void - # - # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode - # - # source://prism//lib/prism/node.rb#16099 - def initialize(source, flags, name, name_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16109 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16124 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16119 - def compact_child_nodes; end - - # def copy: (**params) -> RequiredKeywordParameterNode - # - # source://prism//lib/prism/node.rb#16129 - sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#16143 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16167 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#16152 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#16155 - sig { returns(Prism::Location) } - def name_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16162 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16190 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16148 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16200 - def type; end - end -end - -# Represents a required parameter to a method, block, or lambda definition. -# -# def a(b) -# ^ -# end -# -# source://prism//lib/prism/node.rb#16210 -class Prism::RequiredParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location location) -> void - # - # @return [RequiredParameterNode] a new instance of RequiredParameterNode - # - # source://prism//lib/prism/node.rb#16212 - def initialize(source, flags, name, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16221 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16236 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16231 - def compact_child_nodes; end - - # def copy: (**params) -> RequiredParameterNode - # - # source://prism//lib/prism/node.rb#16241 - sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#16254 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16272 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#16263 - sig { returns(Symbol) } - def name; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16267 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16294 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16259 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16304 - def type; end - end -end - -# Represents an expression modified with a rescue. -# -# foo rescue nil -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#16313 -class Prism::RescueModifierNode < ::Prism::Node - # def initialize: (Node expression, Location keyword_loc, Node rescue_expression, Location location) -> void - # - # @return [RescueModifierNode] a new instance of RescueModifierNode - # - # source://prism//lib/prism/node.rb#16315 - def initialize(source, expression, keyword_loc, rescue_expression, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16325 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16334 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16344 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16339 - def compact_child_nodes; end - - # def copy: (**params) -> RescueModifierNode - # - # source://prism//lib/prism/node.rb#16349 - sig { params(params: T.untyped).returns(Prism::RescueModifierNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16334 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location } - # - # source://prism//lib/prism/node.rb#16363 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader expression: Node - # - # source://prism//lib/prism/node.rb#16368 - sig { returns(Prism::Node) } - def expression; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16386 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16381 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16371 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader rescue_expression: Node - # - # source://prism//lib/prism/node.rb#16377 - sig { returns(Prism::Node) } - def rescue_expression; end - - # source://prism//lib/prism/node.rb#16329 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16410 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16420 - def type; end - end -end - -# Represents a rescue statement. -# -# begin -# rescue Foo, *splat, Bar => ex -# foo -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -# end -# -# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. -# -# source://prism//lib/prism/node.rb#16434 -class Prism::RescueNode < ::Prism::Node - # def initialize: (Location keyword_loc, Array[Node] exceptions, Location? operator_loc, Node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void - # - # @return [RescueNode] a new instance of RescueNode - # - # source://prism//lib/prism/node.rb#16436 - def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16449 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16454 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16469 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16459 - def compact_child_nodes; end - - # attr_reader consequent: RescueNode? - # - # source://prism//lib/prism/node.rb#16523 - sig { returns(T.nilable(Prism::RescueNode)) } - def consequent; end - - # def copy: (**params) -> RescueNode - # - # source://prism//lib/prism/node.rb#16474 - sig { params(params: T.untyped).returns(Prism::RescueNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16454 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } - # - # source://prism//lib/prism/node.rb#16491 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader exceptions: Array[Node] - # - # source://prism//lib/prism/node.rb#16502 - sig { returns(T::Array[Prism::Node]) } - def exceptions; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16537 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16527 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16496 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#16532 - sig { returns(T.nilable(String)) } - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#16505 - sig { returns(T.nilable(Prism::Location)) } - def operator_loc; end - - # attr_reader reference: Node? - # - # source://prism//lib/prism/node.rb#16517 - sig { returns(T.nilable(Prism::Node)) } - def reference; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#16520 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16577 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16587 - def type; end - end -end - -# Represents a rest parameter to a method, block, or lambda definition. -# -# def a(*b) -# ^^ -# end -# -# source://prism//lib/prism/node.rb#16597 -class Prism::RestParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void - # - # @return [RestParameterNode] a new instance of RestParameterNode - # - # source://prism//lib/prism/node.rb#16599 - def initialize(source, flags, name, name_loc, operator_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16610 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16615 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16625 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16620 - def compact_child_nodes; end - - # def copy: (**params) -> RestParameterNode - # - # source://prism//lib/prism/node.rb#16630 - sig { params(params: T.untyped).returns(Prism::RestParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16615 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#16645 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16686 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#16654 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#16657 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#16681 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#16669 - sig { returns(Prism::Location) } - def operator_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16676 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16714 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16650 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16724 - def type; end - end -end - -# Represents the use of the `retry` keyword. -# -# retry -# ^^^^^ -# -# source://prism//lib/prism/node.rb#16733 -class Prism::RetryNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [RetryNode] a new instance of RetryNode - # - # source://prism//lib/prism/node.rb#16735 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16742 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16747 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16757 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16752 - def compact_child_nodes; end - - # def copy: (**params) -> RetryNode - # - # source://prism//lib/prism/node.rb#16762 - sig { params(params: T.untyped).returns(Prism::RetryNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16747 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#16773 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16779 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16798 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16808 - def type; end - end -end - -# Represents the use of the `return` keyword. -# -# return 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#16817 -class Prism::ReturnNode < ::Prism::Node - # def initialize: (Location keyword_loc, ArgumentsNode? arguments, Location location) -> void - # - # @return [ReturnNode] a new instance of ReturnNode - # - # source://prism//lib/prism/node.rb#16819 - def initialize(source, keyword_loc, arguments, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16828 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#16874 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16833 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16845 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16838 - def compact_child_nodes; end - - # def copy: (**params) -> ReturnNode - # - # source://prism//lib/prism/node.rb#16850 - sig { params(params: T.untyped).returns(Prism::ReturnNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16833 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, arguments: ArgumentsNode?, location: Location } - # - # source://prism//lib/prism/node.rb#16863 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16883 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16878 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16868 - sig { returns(Prism::Location) } - def keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16909 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16919 - def type; end - end -end - -# Represents the `self` keyword. -# -# self -# ^^^^ -# -# source://prism//lib/prism/node.rb#16928 -class Prism::SelfNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [SelfNode] a new instance of SelfNode - # - # source://prism//lib/prism/node.rb#16930 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16937 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16942 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16952 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16947 - def compact_child_nodes; end - - # def copy: (**params) -> SelfNode - # - # source://prism//lib/prism/node.rb#16957 - sig { params(params: T.untyped).returns(Prism::SelfNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16942 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#16968 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#16974 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16993 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17003 - def type; end - end -end - -# A module responsible for deserializing parse results. -# -# source://prism//lib/prism/serialize.rb#23 -module Prism::Serialize - class << self - # Deserialize the AST represented by the given string into a parse result. - # - # source://prism//lib/prism/serialize.rb#37 - def load(input, serialized); end - - # Deserialize the tokens represented by the given string into a parse - # result. - # - # source://prism//lib/prism/serialize.rb#49 - def load_tokens(source, serialized); end - end -end - -# source://prism//lib/prism/serialize.rb#53 -class Prism::Serialize::Loader - # @return [Loader] a new instance of Loader - # - # source://prism//lib/prism/serialize.rb#58 - def initialize(source, serialized); end - - # Returns the value of attribute constant_pool. - # - # source://prism//lib/prism/serialize.rb#55 - def constant_pool; end - - # Returns the value of attribute constant_pool_offset. - # - # source://prism//lib/prism/serialize.rb#55 - def constant_pool_offset; end - - # Returns the value of attribute encoding. - # - # source://prism//lib/prism/serialize.rb#54 - def encoding; end - - # Returns the value of attribute input. - # - # source://prism//lib/prism/serialize.rb#54 - def input; end - - # Returns the value of attribute io. - # - # source://prism//lib/prism/serialize.rb#54 - def io; end - - # source://prism//lib/prism/serialize.rb#96 - def load_comments; end - - # source://prism//lib/prism/serialize.rb#82 - def load_encoding; end - - # source://prism//lib/prism/serialize.rb#73 - def load_header; end - - # source://prism//lib/prism/serialize.rb#92 - def load_line_offsets; end - - # source://prism//lib/prism/serialize.rb#106 - def load_metadata; end - - # source://prism//lib/prism/serialize.rb#140 - def load_nodes; end - - # source://prism//lib/prism/serialize.rb#154 - def load_result; end - - # source://prism//lib/prism/serialize.rb#88 - def load_start_line; end - - # source://prism//lib/prism/serialize.rb#115 - def load_tokens; end - - # source://prism//lib/prism/serialize.rb#128 - def load_tokens_result; end - - # Returns the value of attribute serialized. - # - # source://prism//lib/prism/serialize.rb#54 - def serialized; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/serialize.rb#55 - def source; end - - # Returns the value of attribute start_line. - # - # source://prism//lib/prism/serialize.rb#56 - def start_line; end - - private - - # source://prism//lib/prism/serialize.rb#217 - def load_constant(index); end - - # source://prism//lib/prism/serialize.rb#193 - def load_embedded_string; end - - # source://prism//lib/prism/serialize.rb#247 - def load_error_level; end - - # source://prism//lib/prism/serialize.rb#209 - def load_location; end - - # source://prism//lib/prism/serialize.rb#274 - def load_node; end - - # source://prism//lib/prism/serialize.rb#242 - def load_optional_constant; end - - # source://prism//lib/prism/serialize.rb#213 - def load_optional_location; end - - # source://prism//lib/prism/serialize.rb#186 - def load_optional_node; end - - # source://prism//lib/prism/serialize.rb#238 - def load_required_constant; end - - # source://prism//lib/prism/serialize.rb#182 - def load_serialized_length; end - - # source://prism//lib/prism/serialize.rb#197 - def load_string; end - - # source://prism//lib/prism/serialize.rb#177 - def load_varsint; end - - # variable-length integer using https://en.wikipedia.org/wiki/LEB128 - # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints - # - # source://prism//lib/prism/serialize.rb#163 - def load_varuint; end - - # source://prism//lib/prism/serialize.rb#260 - def load_warning_level; end -end - -# The major version of prism that we are expecting to find in the serialized -# strings. -# -# source://prism//lib/prism/serialize.rb#26 -Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) - -# The minor version of prism that we are expecting to find in the serialized -# strings. -# -# source://prism//lib/prism/serialize.rb#30 -Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) - -# The patch version of prism that we are expecting to find in the serialized -# strings. -# -# source://prism//lib/prism/serialize.rb#34 -Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) - -# The token types that can be indexed by their enum values. -# -# source://prism//lib/prism/serialize.rb#1482 -Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# Represents a singleton class declaration involving the `class` keyword. -# -# class << self end -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#17012 -class Prism::SingletonClassNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Node expression, Node? body, Location end_keyword_loc, Location location) -> void - # - # @return [SingletonClassNode] a new instance of SingletonClassNode - # - # source://prism//lib/prism/node.rb#17014 - def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17027 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#17090 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17032 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def class_keyword: () -> String - # - # source://prism//lib/prism/node.rb#17100 - sig { returns(String) } - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#17075 - sig { returns(Prism::Location) } - def class_keyword_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17045 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17037 - def compact_child_nodes; end - - # def copy: (**params) -> SingletonClassNode - # - # source://prism//lib/prism/node.rb#17050 - sig { params(params: T.untyped).returns(Prism::SingletonClassNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17032 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#17067 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#17110 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#17093 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # attr_reader expression: Node - # - # source://prism//lib/prism/node.rb#17087 - sig { returns(Prism::Node) } - def expression; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#17115 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#17072 - sig { returns(T::Array[Symbol]) } - def locals; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#17105 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#17081 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17146 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17156 - def type; end - end -end - -# This represents a source of Ruby code that has been parsed. It is used in -# conjunction with locations to allow them to resolve line numbers and source -# ranges. -# -# source://prism//lib/prism/parse_result.rb#7 -class Prism::Source - # Create a new source object with the given source code. - # - # @return [Source] a new instance of Source - # - # source://prism//lib/prism/parse_result.rb#18 - def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end - - # Return the column number in characters for the given byte offset. - # - # source://prism//lib/prism/parse_result.rb#53 - def character_column(byte_offset); end - - # Return the character offset for the given byte offset. - # - # source://prism//lib/prism/parse_result.rb#48 - def character_offset(byte_offset); end - - # Returns the column number in code units for the given encoding for the - # given byte offset. - # - # source://prism//lib/prism/parse_result.rb#70 - def code_units_column(byte_offset, encoding); end - - # Returns the offset from the start of the file for the given byte offset - # counting in code units for the given encoding. - # - # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the - # concept of code units that differs from the number of characters in other - # encodings, it is not captured here. - # - # source://prism//lib/prism/parse_result.rb#63 - def code_units_offset(byte_offset, encoding); end - - # Return the column number for the given byte offset. - # - # source://prism//lib/prism/parse_result.rb#43 - def column(byte_offset); end - - # Binary search through the offsets to find the line number for the given - # byte offset. - # - # source://prism//lib/prism/parse_result.rb#32 - def line(byte_offset); end - - sig { params(value: Integer).returns(Integer) } - def line_offset(value); end - - # Return the byte offset of the start of the line corresponding to the given - # byte offset. - # - # source://prism//lib/prism/parse_result.rb#38 - def line_start(byte_offset); end - - # The list of newline byte offsets in the source code. - # - # source://prism//lib/prism/parse_result.rb#15 - sig { returns(T::Array[Integer]) } - def offsets; end - - # Perform a byteslice on the source code using the given byte offset and - # byte length. - # - # source://prism//lib/prism/parse_result.rb#26 - def slice(byte_offset, length); end - - # The source code that this source object represents. - # - # source://prism//lib/prism/parse_result.rb#9 - sig { returns(String) } - def source; end - - # The line number where this source starts. - # - # source://prism//lib/prism/parse_result.rb#12 - def start_line; end - - private - - # Binary search through the offsets to find the line number for the given - # byte offset. - # - # source://prism//lib/prism/parse_result.rb#78 - def find_line(byte_offset); end -end - -# Represents the use of the `__ENCODING__` keyword. -# -# __ENCODING__ -# ^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#17165 -class Prism::SourceEncodingNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [SourceEncodingNode] a new instance of SourceEncodingNode - # - # source://prism//lib/prism/node.rb#17167 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17174 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17189 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17184 - def compact_child_nodes; end - - # def copy: (**params) -> SourceEncodingNode - # - # source://prism//lib/prism/node.rb#17194 - sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#17205 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#17211 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17230 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17240 - def type; end - end -end - -# Represents the use of the `__FILE__` keyword. -# -# __FILE__ -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#17249 -class Prism::SourceFileNode < ::Prism::Node - # def initialize: (String filepath, Location location) -> void - # - # @return [SourceFileNode] a new instance of SourceFileNode - # - # source://prism//lib/prism/node.rb#17251 - def initialize(source, filepath, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17259 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17264 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17274 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17269 - def compact_child_nodes; end - - # def copy: (**params) -> SourceFileNode - # - # source://prism//lib/prism/node.rb#17279 - sig { params(params: T.untyped).returns(Prism::SourceFileNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17264 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { filepath: String, location: Location } - # - # source://prism//lib/prism/node.rb#17291 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader filepath: String - # - # source://prism//lib/prism/node.rb#17296 - sig { returns(String) } - def filepath; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#17300 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17320 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17330 - def type; end - end -end - -# Represents the use of the `__LINE__` keyword. -# -# __LINE__ -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#17339 -class Prism::SourceLineNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [SourceLineNode] a new instance of SourceLineNode - # - # source://prism//lib/prism/node.rb#17341 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17348 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17353 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17363 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17358 - def compact_child_nodes; end - - # def copy: (**params) -> SourceLineNode - # - # source://prism//lib/prism/node.rb#17368 - sig { params(params: T.untyped).returns(Prism::SourceLineNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17353 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#17379 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#17385 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17404 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17414 - def type; end - end -end - -# Represents the use of the splat operator. -# -# [*a] -# ^^ -# -# source://prism//lib/prism/node.rb#17423 -class Prism::SplatNode < ::Prism::Node - # def initialize: (Location operator_loc, Node? expression, Location location) -> void - # - # @return [SplatNode] a new instance of SplatNode - # - # source://prism//lib/prism/node.rb#17425 - def initialize(source, operator_loc, expression, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17434 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17439 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17451 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17444 - def compact_child_nodes; end - - # def copy: (**params) -> SplatNode - # - # source://prism//lib/prism/node.rb#17456 - sig { params(params: T.untyped).returns(Prism::SplatNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17439 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Node?, location: Location } - # - # source://prism//lib/prism/node.rb#17469 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader expression: Node? - # - # source://prism//lib/prism/node.rb#17480 - sig { returns(T.nilable(Prism::Node)) } - def expression; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#17489 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#17484 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#17474 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17515 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17525 - def type; end - end -end - -# Represents a set of statements contained within some scope. -# -# foo; bar; baz -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#17534 -class Prism::StatementsNode < ::Prism::Node - # def initialize: (Array[Node] body, Location location) -> void - # - # @return [StatementsNode] a new instance of StatementsNode - # - # source://prism//lib/prism/node.rb#17536 - def initialize(source, body, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17544 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Array[Node] - # - # source://prism//lib/prism/node.rb#17581 - sig { returns(T::Array[Prism::Node]) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17549 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17559 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17554 - def compact_child_nodes; end - - # def copy: (**params) -> StatementsNode - # - # source://prism//lib/prism/node.rb#17564 - sig { params(params: T.untyped).returns(Prism::StatementsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17549 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Node], location: Location } - # - # source://prism//lib/prism/node.rb#17576 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#17585 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17605 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17615 - def type; end - end -end - -# Flags for string nodes. -# -# source://prism//lib/prism/node.rb#19352 -module Prism::StringFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#19357 -Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to UTF-8 -# -# source://prism//lib/prism/node.rb#19354 -Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) - -# frozen by virtue of a `frozen_string_literal` comment -# -# source://prism//lib/prism/node.rb#19360 -Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) - -# Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. -# -# "foo" -# ^^^^^ -# -# %w[foo] -# ^^^ -# -# "foo #{bar} baz" -# ^^^^ ^^^^ -# -# source://prism//lib/prism/node.rb#17630 -class Prism::StringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # def initialize: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void - # - # @return [StringNode] a new instance of StringNode - # - # source://prism//lib/prism/node.rb#17632 - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17644 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17649 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#17748 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#17707 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17659 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17654 - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#17743 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#17701 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (**params) -> StringNode - # - # source://prism//lib/prism/node.rb#17664 - sig { params(params: T.untyped).returns(Prism::StringNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17649 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } - # - # source://prism//lib/prism/node.rb#17680 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17728 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17723 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def frozen?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17733 - sig { returns(T::Boolean) } - def frozen?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#17753 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#17738 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#17689 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17778 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#17719 - sig { returns(String) } - def unescaped; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#17685 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17788 - def type; end - end -end - -# Represents the use of the `super` keyword with parentheses or arguments. -# -# super() -# ^^^^^^^ -# -# super foo, bar -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#17800 -class Prism::SuperNode < ::Prism::Node - # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Node? block, Location location) -> void - # - # @return [SuperNode] a new instance of SuperNode - # - # source://prism//lib/prism/node.rb#17802 - def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17814 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#17876 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#17891 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17819 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17832 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17824 - def compact_child_nodes; end - - # def copy: (**params) -> SuperNode - # - # source://prism//lib/prism/node.rb#17837 - sig { params(params: T.untyped).returns(Prism::SuperNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17819 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location } - # - # source://prism//lib/prism/node.rb#17853 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#17910 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#17895 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#17858 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#17900 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#17864 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#17905 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#17879 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17944 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17954 - def type; end - end -end - -# Flags for symbol nodes. -# -# source://prism//lib/prism/node.rb#19364 -module Prism::SymbolFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#19369 -Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to US-ASCII -# -# source://prism//lib/prism/node.rb#19372 -Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to UTF-8 -# -# source://prism//lib/prism/node.rb#19366 -Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) - -# Represents a symbol literal or a symbol contained within a `%i` list. -# -# :foo -# ^^^^ -# -# %i[foo] -# ^^^ -# -# source://prism//lib/prism/node.rb#17966 -class Prism::SymbolNode < ::Prism::Node - # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void - # - # @return [SymbolNode] a new instance of SymbolNode - # - # source://prism//lib/prism/node.rb#17968 - def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17980 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17985 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#18090 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#18049 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17995 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17990 - def compact_child_nodes; end - - # def copy: (**params) -> SymbolNode - # - # source://prism//lib/prism/node.rb#18000 - sig { params(params: T.untyped).returns(Prism::SymbolNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17985 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } - # - # source://prism//lib/prism/node.rb#18016 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18070 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18075 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18065 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#18095 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#18080 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#18025 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18120 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#18061 - sig { returns(String) } - def unescaped; end - - # def value: () -> String? - # - # source://prism//lib/prism/node.rb#18085 - sig { returns(T.nilable(String)) } - def value; end - - # attr_reader value_loc: Location? - # - # source://prism//lib/prism/node.rb#18037 - sig { returns(T.nilable(Prism::Location)) } - def value_loc; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18021 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18130 - def type; end - end -end - -# This represents a token from the Ruby source. -# -# source://prism//lib/prism/parse_result.rb#454 -class Prism::Token - # Create a new token object with the given type, value, and location. - # - # @return [Token] a new instance of Token - # - # source://prism//lib/prism/parse_result.rb#466 - def initialize(source, type, value, location); end - - # Returns true if the given other token is equal to this token. - # - # source://prism//lib/prism/parse_result.rb#500 - sig { params(other: T.untyped).returns(T::Boolean) } - def ==(other); end - - # Implement the hash pattern matching interface for Token. - # - # source://prism//lib/prism/parse_result.rb#474 - sig { params(keys: T.untyped).returns(T.untyped) } - def deconstruct_keys(keys); end - - # A Location object representing the location of this token in the source. - # - # source://prism//lib/prism/parse_result.rb#479 - sig { returns(Prism::Location) } - def location; end - - # Implement the pretty print interface for Token. - # - # source://prism//lib/prism/parse_result.rb#485 - sig { params(q: T.untyped).returns(T.untyped) } - def pretty_print(q); end - - # The type of token that this token is. - # - # source://prism//lib/prism/parse_result.rb#460 - sig { returns(T.untyped) } - def type; end - - # A byteslice of the source that this token represents. - # - # source://prism//lib/prism/parse_result.rb#463 - sig { returns(String) } - def value; end - - private - - # The Source object that represents the source this token came from. - # - # source://prism//lib/prism/parse_result.rb#456 - def source; end -end - -# This module is responsible for converting the prism syntax tree into other -# syntax trees. -# -# source://prism//lib/prism/translation.rb#6 -module Prism::Translation; end - -# This class is the entry-point for converting a prism syntax tree into the -# whitequark/parser gem's syntax tree. It inherits from the base parser for -# the parser gem, and overrides the parse* methods to parse with prism and -# then translate. -# -# source://prism//lib/prism/translation/parser.rb#11 -class Prism::Translation::Parser < ::Parser::Base - # The default encoding for Ruby files is UTF-8. - # - # source://prism//lib/prism/translation/parser.rb#33 - def default_encoding; end - - # Parses a source buffer and returns the AST. - # - # source://prism//lib/prism/translation/parser.rb#41 - def parse(source_buffer); end - - # Parses a source buffer and returns the AST and the source code comments. - # - # source://prism//lib/prism/translation/parser.rb#54 - def parse_with_comments(source_buffer); end - - # Parses a source buffer and returns the AST, the source code comments, - # and the tokens emitted by the lexer. - # - # source://prism//lib/prism/translation/parser.rb#71 - def tokenize(source_buffer, recover = T.unsafe(nil)); end - - # Since prism resolves num params for us, we don't need to support this - # kind of logic here. - # - # source://prism//lib/prism/translation/parser.rb#97 - def try_declare_numparam(node); end - - # source://prism//lib/prism/translation/parser.rb#28 - def version; end - - # source://prism//lib/prism/translation/parser.rb#37 - def yyerror; end - - private - - # Build the parser gem AST from the prism AST. - # - # source://prism//lib/prism/translation/parser.rb#146 - def build_ast(program, offset_cache); end - - # Build the parser gem comments from the prism comments. - # - # source://prism//lib/prism/translation/parser.rb#151 - def build_comments(comments, offset_cache); end - - # Prism deals with offsets in bytes, while the parser gem deals with - # offsets in characters. We need to handle this conversion in order to - # build the parser gem AST. - # - # If the bytesize of the source is the same as the length, then we can - # just use the offset directly. Otherwise, we build an array where the - # index is the byte offset and the value is the character offset. - # - # source://prism//lib/prism/translation/parser.rb#129 - def build_offset_cache(source); end - - # Build a range from a prism location. - # - # source://prism//lib/prism/translation/parser.rb#163 - def build_range(location, offset_cache); end - - # Build the parser gem tokens from the prism tokens. - # - # source://prism//lib/prism/translation/parser.rb#158 - def build_tokens(tokens, offset_cache); end - - # Converts the version format handled by Parser to the format handled by Prism. - # - # source://prism//lib/prism/translation/parser.rb#172 - def convert_for_prism(version); end - - # If there was a error generated during the parse, then raise an - # appropriate syntax error. Otherwise return the result. - # - # source://prism//lib/prism/translation/parser.rb#111 - def unwrap(result, offset_cache); end - - # This is a hook to allow consumers to disable some errors if they don't - # want them to block creating the syntax tree. - # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser.rb#105 - def valid_error?(error); end -end - -# A visitor that knows how to convert a prism syntax tree into the -# whitequark/parser gem's syntax tree. -# -# source://prism//lib/prism/translation/parser/compiler.rb#8 -class Prism::Translation::Parser::Compiler < ::Prism::Compiler - # Initialize a new compiler with the given parser, offset cache, and - # options. - # - # @return [Compiler] a new instance of Compiler - # - # source://prism//lib/prism/translation/parser/compiler.rb#39 - def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end - - # The Parser::Builders::Default instance that is being used to build the - # AST. - # - # source://prism//lib/prism/translation/parser/compiler.rb#18 - def builder; end - - # The types of values that can be forwarded in the current scope. - # - # source://prism//lib/prism/translation/parser/compiler.rb#29 - def forwarding; end - - # Whether or not the current node is in a destructure. - # - # source://prism//lib/prism/translation/parser/compiler.rb#32 - def in_destructure; end - - # Whether or not the current node is in a pattern. - # - # source://prism//lib/prism/translation/parser/compiler.rb#35 - def in_pattern; end - - # The offset cache that is used to map between byte and character - # offsets in the file. - # - # source://prism//lib/prism/translation/parser/compiler.rb#26 - def offset_cache; end - - # The Parser::Base instance that is being used to build the AST. - # - # source://prism//lib/prism/translation/parser/compiler.rb#14 - def parser; end - - # The Parser::Source::Buffer instance that is holding a reference to the - # source code. - # - # source://prism//lib/prism/translation/parser/compiler.rb#22 - def source_buffer; end - - # alias $foo $bar - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#58 - def visit_alias_global_variable_node(node); end - - # alias foo bar - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#52 - def visit_alias_method_node(node); end - - # foo => bar | baz - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#64 - def visit_alternation_pattern_node(node); end - - # a and b - # ^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#70 - def visit_and_node(node); end - - # foo(bar) - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#101 - def visit_arguments_node(node); end - - # [] - # ^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#76 - def visit_array_node(node); end - - # foo => [bar] - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#82 - def visit_array_pattern_node(node); end - - # { a: 1 } - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#107 - def visit_assoc_node(node); end - - # def foo(**); bar(**); end - # ^^ - # - # { **foo } - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#141 - def visit_assoc_splat_node(node); end - - # $+ - # ^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#151 - def visit_back_reference_read_node(node); end - - # begin end - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#157 - def visit_begin_node(node); end - - # foo(&bar) - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#195 - def visit_block_argument_node(node); end - - # foo { |; bar| } - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#201 - def visit_block_local_variable_node(node); end - - # A block on a keyword or method call. - # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#206 - def visit_block_node(node); end - - # def foo(&bar); end - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#212 - def visit_block_parameter_node(node); end - - # A block's parameters. - # - # source://prism//lib/prism/translation/parser/compiler.rb#217 - def visit_block_parameters_node(node); end - - # break - # ^^^^^ - # - # break foo - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#226 - def visit_break_node(node); end - - # foo.bar += baz - # ^^^^^^^^^^^^^^^ - # foo.bar &&= baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#300 - def visit_call_and_write_node(node); end - - # foo - # ^^^ - # - # foo.bar - # ^^^^^^^ - # - # foo.bar() {} - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#238 - def visit_call_node(node); end - - # foo.bar += baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#300 - def visit_call_operator_write_node(node); end - - # foo.bar += baz - # ^^^^^^^^^^^^^^^ - # foo.bar ||= baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#300 - def visit_call_or_write_node(node); end - - # foo.bar, = 1 - # ^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#327 - def visit_call_target_node(node); end - - # foo => bar => baz - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#339 - def visit_capture_pattern_node(node); end - - # case foo; in bar; end - # ^^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#358 - def visit_case_match_node(node); end - - # case foo; when bar; end - # ^^^^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#345 - def visit_case_node(node); end - - # class Foo; end - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#371 - def visit_class_node(node); end - - # @@foo += bar - # ^^^^^^^^^^^^ - # @@foo &&= bar - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#403 - def visit_class_variable_and_write_node(node); end - - # @@foo += bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#403 - def visit_class_variable_operator_write_node(node); end - - # @@foo += bar - # ^^^^^^^^^^^^ - # @@foo ||= bar - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#403 - def visit_class_variable_or_write_node(node); end - - # @@foo - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#384 - def visit_class_variable_read_node(node); end - - # @@foo, = bar - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#421 - def visit_class_variable_target_node(node); end - - # @@foo = 1 - # ^^^^^^^^^ - # - # @@foo, @@bar = 1 - # ^^^^^ ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#393 - def visit_class_variable_write_node(node); end - - # Foo += bar - # ^^^^^^^^^^^ - # Foo &&= bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#442 - def visit_constant_and_write_node(node); end - - # Foo += bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#442 - def visit_constant_operator_write_node(node); end - - # Foo += bar - # ^^^^^^^^^^^ - # Foo ||= bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#442 - def visit_constant_or_write_node(node); end - - # Foo::Bar += baz - # ^^^^^^^^^^^^^^^ - # Foo::Bar &&= baz - # ^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#496 - def visit_constant_path_and_write_node(node); end - - # Foo::Bar - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#466 - def visit_constant_path_node(node); end - - # Foo::Bar += baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#496 - def visit_constant_path_operator_write_node(node); end - - # Foo::Bar += baz - # ^^^^^^^^^^^^^^^ - # Foo::Bar ||= baz - # ^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#496 - def visit_constant_path_or_write_node(node); end - - # Foo::Bar, = baz - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#514 - def visit_constant_path_target_node(node); end - - # Foo::Bar = 1 - # ^^^^^^^^^^^^ - # - # Foo::Foo, Bar::Bar = 1 - # ^^^^^^^^ ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#486 - def visit_constant_path_write_node(node); end - - # Foo - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#427 - def visit_constant_read_node(node); end - - # Foo, = bar - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#460 - def visit_constant_target_node(node); end - - # Foo = 1 - # ^^^^^^^ - # - # Foo, Bar = 1 - # ^^^ ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#436 - def visit_constant_write_node(node); end - - # def foo; end - # ^^^^^^^^^^^^ - # - # def self.foo; end - # ^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#523 - def visit_def_node(node); end - - # defined? a - # ^^^^^^^^^^ - # - # defined?(a) - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#570 - def visit_defined_node(node); end - - # if foo then bar else baz end - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#582 - def visit_else_node(node); end - - # "foo #{bar}" - # ^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#588 - def visit_embedded_statements_node(node); end - - # "foo #@bar" - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#598 - def visit_embedded_variable_node(node); end - - # begin; foo; ensure; bar; end - # ^^^^^^^^^^^^ - # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#604 - def visit_ensure_node(node); end - - # false - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#610 - def visit_false_node(node); end - - # foo => [*, bar, *] - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#616 - def visit_find_pattern_node(node); end - - # 0..5 - # ^^^^ - # if foo .. bar; end - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1302 - def visit_flip_flop_node(node); end - - # 1.0 - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#628 - def visit_float_node(node); end - - # for foo in bar do end - # ^^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#634 - def visit_for_node(node); end - - # def foo(...); bar(...); end - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#652 - def visit_forwarding_arguments_node(node); end - - # def foo(...); end - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#658 - def visit_forwarding_parameter_node(node); end - - # super - # ^^^^^ - # - # super {} - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#667 - def visit_forwarding_super_node(node); end - - # $foo += bar - # ^^^^^^^^^^^ - # $foo &&= bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#698 - def visit_global_variable_and_write_node(node); end - - # $foo += bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#698 - def visit_global_variable_operator_write_node(node); end - - # $foo += bar - # ^^^^^^^^^^^ - # $foo ||= bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#698 - def visit_global_variable_or_write_node(node); end - - # $foo - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#679 - def visit_global_variable_read_node(node); end - - # $foo, = bar - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#716 - def visit_global_variable_target_node(node); end - - # $foo = 1 - # ^^^^^^^^ - # - # $foo, $bar = 1 - # ^^^^ ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#688 - def visit_global_variable_write_node(node); end - - # {} - # ^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#722 - def visit_hash_node(node); end - - # foo => {} - # ^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#732 - def visit_hash_pattern_node(node); end - - # if foo then bar end - # ^^^^^^^^^^^^^^^^^^^ - # - # bar if foo - # ^^^^^^^^^^ - # - # foo ? bar : baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#750 - def visit_if_node(node); end - - # 1i - # - # source://prism//lib/prism/translation/parser/compiler.rb#791 - def visit_imaginary_node(node); end - - # { foo: } - # ^^^^ - # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#797 - def visit_implicit_node(node); end - - # foo { |bar,| } - # ^ - # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#803 - def visit_implicit_rest_node(node); end - - # case foo; in bar; end - # ^^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#809 - def visit_in_node(node); end - - # foo[bar] += baz - # ^^^^^^^^^^^^^^^ - # foo[bar] &&= baz - # ^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#835 - def visit_index_and_write_node(node); end - - # foo[bar] += baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#835 - def visit_index_operator_write_node(node); end - - # foo[bar] += baz - # ^^^^^^^^^^^^^^^ - # foo[bar] ||= baz - # ^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#835 - def visit_index_or_write_node(node); end - - # foo[bar], = 1 - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#861 - def visit_index_target_node(node); end - - # ^^^^^^^^^^^ - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#891 - def visit_instance_variable_and_write_node(node); end - - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#891 - def visit_instance_variable_operator_write_node(node); end - - # ^^^^^^^^^^^ - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#891 - def visit_instance_variable_or_write_node(node); end - - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#872 - def visit_instance_variable_read_node(node); end - - # @foo, = bar - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#909 - def visit_instance_variable_target_node(node); end - - # ^^^^^^^^ - # - # @foo, @bar = 1 - # ^^^^ ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#881 - def visit_instance_variable_write_node(node); end - - # 1 - # ^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#915 - def visit_integer_node(node); end - - # /foo #{bar}/ - # ^^^^^^^^^^^^ - # if /foo #{bar}/ then end - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#921 - def visit_interpolated_match_last_line_node(node); end - - # /foo #{bar}/ - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#921 - def visit_interpolated_regular_expression_node(node); end - - # "foo #{bar}" - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#936 - def visit_interpolated_string_node(node); end - - # :"foo #{bar}" - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#951 - def visit_interpolated_symbol_node(node); end - - # `foo #{bar}` - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#961 - def visit_interpolated_x_string_node(node); end - - # foo(bar: baz) - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#976 - def visit_keyword_hash_node(node); end - - # def foo(**bar); end - # ^^^^^ - # - # def foo(**); end - # ^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#985 - def visit_keyword_rest_parameter_node(node); end - - # -> {} - # - # source://prism//lib/prism/translation/parser/compiler.rb#993 - def visit_lambda_node(node); end - - # foo += bar - # ^^^^^^^^^^ - # foo &&= bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 - def visit_local_variable_and_write_node(node); end - - # foo += bar - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 - def visit_local_variable_operator_write_node(node); end - - # foo += bar - # ^^^^^^^^^^ - # foo ||= bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 - def visit_local_variable_or_write_node(node); end - - # foo - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1018 - def visit_local_variable_read_node(node); end - - # foo, = bar - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1055 - def visit_local_variable_target_node(node); end - - # foo = 1 - # ^^^^^^^ - # - # foo, bar = 1 - # ^^^ ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1027 - def visit_local_variable_write_node(node); end - - # /foo/ - # ^^^^^ - # if /foo/ then end - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1336 - def visit_match_last_line_node(node); end - - # source://prism//lib/prism/translation/parser/compiler.rb#1066 - def visit_match_predicate_node(node); end - - # foo => bar - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1085 - def visit_match_required_node(node); end - - # /(?foo)/ =~ bar - # ^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1095 - def visit_match_write_node(node); end - - # A node that is missing from the syntax tree. This is only used in the - # case of a syntax error. The parser gem doesn't have such a concept, so - # we invent our own here. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1106 - def visit_missing_node(node); end - - # module Foo; end - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1112 - def visit_module_node(node); end - - # foo, bar = baz - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1123 - def visit_multi_target_node(node); end - - # foo, bar = baz - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1137 - def visit_multi_write_node(node); end - - # next - # ^^^^ - # - # next foo - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1158 - def visit_next_node(node); end - - # nil - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1170 - def visit_nil_node(node); end - - # def foo(**nil); end - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1176 - def visit_no_keywords_parameter_node(node); end - - # -> { _1 + _2 } - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1186 - def visit_numbered_parameters_node(node); end - - # $1 - # ^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1192 - def visit_numbered_reference_read_node(node); end - - # def foo(bar: baz); end - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1198 - def visit_optional_keyword_parameter_node(node); end - - # def foo(bar = 1); end - # ^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1204 - def visit_optional_parameter_node(node); end - - # a or b - # ^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1210 - def visit_or_node(node); end - - # def foo(bar, *baz); end - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1216 - def visit_parameters_node(node); end - - # () - # ^^ - # - # (1) - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1255 - def visit_parentheses_node(node); end - - # foo => ^(bar) - # ^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1265 - def visit_pinned_expression_node(node); end - - # foo = 1 and bar => ^foo - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1271 - def visit_pinned_variable_node(node); end - - # END {} - # - # source://prism//lib/prism/translation/parser/compiler.rb#1276 - def visit_post_execution_node(node); end - - # BEGIN {} - # - # source://prism//lib/prism/translation/parser/compiler.rb#1286 - def visit_pre_execution_node(node); end - - # The top-level program node. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1296 - def visit_program_node(node); end - - # 0..5 - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1302 - def visit_range_node(node); end - - # 1r - # ^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1324 - def visit_rational_node(node); end - - # redo - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1330 - def visit_redo_node(node); end - - # /foo/ - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1336 - def visit_regular_expression_node(node); end - - # def foo(bar:); end - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1351 - def visit_required_keyword_parameter_node(node); end - - # def foo(bar); end - # ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1357 - def visit_required_parameter_node(node); end - - # foo rescue bar - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1363 - def visit_rescue_modifier_node(node); end - - # begin; rescue; end - # ^^^^^^^ - # - # @raise [CompilationError] - # - # source://prism//lib/prism/translation/parser/compiler.rb#1381 - def visit_rescue_node(node); end - - # def foo(*bar); end - # ^^^^ - # - # def foo(*); end - # ^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1390 - def visit_rest_parameter_node(node); end - - # retry - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1396 - def visit_retry_node(node); end - - # return - # ^^^^^^ - # - # return 1 - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1405 - def visit_return_node(node); end - - # self - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1417 - def visit_self_node(node); end - - # class << self; end - # ^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1423 - def visit_singleton_class_node(node); end - - # __ENCODING__ - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1435 - def visit_source_encoding_node(node); end - - # __FILE__ - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1441 - def visit_source_file_node(node); end - - # __LINE__ - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1447 - def visit_source_line_node(node); end - - # foo(*bar) - # ^^^^ - # - # def foo((bar, *baz)); end - # ^^^^ - # - # def foo(*); bar(*); end - # ^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1459 - def visit_splat_node(node); end - - # A list of statements. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1472 - def visit_statements_node(node); end - - # "foo" - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1478 - def visit_string_node(node); end - - # super(foo) - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1495 - def visit_super_node(node); end - - # :foo - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1518 - def visit_symbol_node(node); end - - # true - # ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1536 - def visit_true_node(node); end - - # undef foo - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1542 - def visit_undef_node(node); end - - # unless foo; bar end - # ^^^^^^^^^^^^^^^^^^^ - # - # bar unless foo - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1551 - def visit_unless_node(node); end - - # until foo; bar end - # ^^^^^^^^^^^^^^^^^ - # - # bar until foo - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1581 - def visit_until_node(node); end - - # case foo; when bar; end - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1603 - def visit_when_node(node); end - - # while foo; bar end - # ^^^^^^^^^^^^^^^^^^ - # - # bar while foo - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1617 - def visit_while_node(node); end - - # `foo` - # ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1639 - def visit_x_string_node(node); end - - # yield - # ^^^^^ - # - # yield 1 - # ^^^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1657 - def visit_yield_node(node); end - - private - - # Initialize a new compiler with the given option overrides, used to - # visit a subtree with the given options. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1671 - def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end - - # When *, **, &, or ... are used as an argument in a method call, we - # check if they were allowed by the current context. To determine that - # we build this lookup table. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1678 - def find_forwarding(node); end - - # Blocks can have a special set of parameters that automatically expand - # when given arrays if they have a single required parameter and no - # other parameters. - # - # @return [Boolean] - # - # source://prism//lib/prism/translation/parser/compiler.rb#1693 - def procarg0?(parameters); end - - # Constructs a new source range from the given start and end offsets. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1710 - def srange(location); end - - # Constructs a new source range by finding the given tokens between the - # given start offset and end offset. If the needle is not found, it - # returns nil. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1722 - def srange_find(start_offset, end_offset, tokens); end - - # Constructs a new source range from the given start and end offsets. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1715 - def srange_offsets(start_offset, end_offset); end - - # Transform a location into a token that the parser gem expects. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1731 - def token(location); end - - # Visit a block node on a call. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1736 - def visit_block(call, block); end - - # Visit a heredoc that can be either a string or an xstring. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1769 - def visit_heredoc(node); end - - # Visit a numeric node and account for the optional sign. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1815 - def visit_numeric(node, value); end - - # Within the given block, track that we're within a pattern. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1827 - def within_pattern; end -end - -# Raised when the tree is malformed or there is a bug in the compiler. -# -# source://prism//lib/prism/translation/parser/compiler.rb#10 -class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end - -# Locations in the parser gem AST are generated using this class. We -# store a reference to its constant to make it slightly faster to look -# up. -# -# source://prism//lib/prism/translation/parser/compiler.rb#1707 -Prism::Translation::Parser::Compiler::Range = Parser::Source::Range - -# The parser gem has a list of diagnostics with a hard-coded set of error -# messages. We create our own diagnostic class in order to set our own -# error messages. -# -# source://prism//lib/prism/translation/parser.rb#15 -class Prism::Translation::Parser::Diagnostic < ::Parser::Diagnostic - # Initialize a new diagnostic with the given message and location. - # - # @return [Diagnostic] a new instance of Diagnostic - # - # source://prism//lib/prism/translation/parser.rb#20 - def initialize(message, location); end - - # The message generated by prism. - # - # source://prism//lib/prism/translation/parser.rb#17 - def message; end -end - -# Accepts a list of prism tokens and converts them into the expected -# format for the parser gem. -# -# source://prism//lib/prism/translation/parser/lexer.rb#8 -class Prism::Translation::Parser::Lexer - # Initialize the lexer with the given source buffer, prism tokens, and - # offset cache. - # - # @return [Lexer] a new instance of Lexer - # - # source://prism//lib/prism/translation/parser/lexer.rb#193 - def initialize(source_buffer, lexed, offset_cache); end - - # An array of prism tokens that we lexed. - # - # source://prism//lib/prism/translation/parser/lexer.rb#186 - def lexed; end - - # A hash that maps offsets in bytes to offsets in characters. - # - # source://prism//lib/prism/translation/parser/lexer.rb#189 - def offset_cache; end - - # The Parser::Source::Buffer that the tokens were lexed from. - # - # source://prism//lib/prism/translation/parser/lexer.rb#183 - def source_buffer; end - - # Convert the prism tokens into the expected format for the parser gem. - # - # source://prism//lib/prism/translation/parser/lexer.rb#203 - def to_a; end - - private - - # Parse a complex from the string representation. - # - # source://prism//lib/prism/translation/parser/lexer.rb#310 - def parse_complex(value); end - - # Parse a rational from the string representation. - # - # source://prism//lib/prism/translation/parser/lexer.rb#323 - def parse_rational(value); end -end - -# source://prism//lib/prism/translation/parser/lexer.rb#199 -Prism::Translation::Parser::Lexer::Range = Parser::Source::Range - -# The direct translating of types between the two lexers. -# -# source://prism//lib/prism/translation/parser/lexer.rb#10 -Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) - -# source://prism//lib/prism/translation/parser.rb#26 -Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# Note: This integration is not finished, and therefore still has many -# inconsistencies with Ripper. If you'd like to help out, pull requests would -# be greatly appreciated! -# -# This class is meant to provide a compatibility layer between prism and -# Ripper. It functions by parsing the entire tree first and then walking it -# and executing each of the Ripper callbacks as it goes. -# -# This class is going to necessarily be slower than the native Ripper API. It -# is meant as a stopgap until developers migrate to using prism. It is also -# meant as a test harness for the prism parser. -# -# To use this class, you treat `Prism::Translation::Ripper` effectively as you would -# treat the `Ripper` class. -# -# source://prism//lib/prism/translation/ripper.rb#21 -class Prism::Translation::Ripper < ::Prism::Compiler - # Create a new Translation::Ripper object with the given source. - # - # @return [Ripper] a new instance of Ripper - # - # source://prism//lib/prism/translation/ripper.rb#75 - def initialize(source); end - - # The current column number of the parser. - # - # source://prism//lib/prism/translation/ripper.rb#72 - def column; end - - # True if the parser encountered an error during parsing. - # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#87 - def error?; end - - # The current line number of the parser. - # - # source://prism//lib/prism/translation/ripper.rb#69 - def lineno; end - - # Parse the source and return the result. - # - # source://prism//lib/prism/translation/ripper.rb#92 - def parse; end - - # The source that is being parsed. - # - # source://prism//lib/prism/translation/ripper.rb#66 - def source; end - - # Visit an AliasGlobalVariableNode. - # - # source://prism//lib/prism/translation/ripper.rb#247 - def visit_alias_global_variable_node(node); end - - # Visit an AliasMethodNode. - # - # source://prism//lib/prism/translation/ripper.rb#226 - def visit_alias_method_node(node); end - - # Visit an AndNode. - # - # source://prism//lib/prism/translation/ripper.rb#264 - def visit_and_node(node); end - - # Visit an ArrayNode node. - # - # source://prism//lib/prism/translation/ripper.rb#113 - def visit_array_node(node); end - - # Visit a BackReferenceReadNode. - # - # source://prism//lib/prism/translation/ripper.rb#258 - def visit_back_reference_read_node(node); end - - # Visit a BeginNode node. - # This is not at all bulletproof against different structures of begin/rescue/else/ensure/end. - # - # source://prism//lib/prism/translation/ripper.rb#315 - def visit_begin_node(node); end - - # Visit a BlockNode. - # - # source://prism//lib/prism/translation/ripper.rb#191 - def visit_block_node(node); end - - # Visit a BlockParametersNode. - # - # source://prism//lib/prism/translation/ripper.rb#200 - def visit_block_parameters_node(node); end - - # Visit a BreakNode. - # - # source://prism//lib/prism/translation/ripper.rb#218 - def visit_break_node(node); end - - # Visit a CallNode node. - # Ripper distinguishes between many different method-call - # nodes -- unary and binary operators, "command" calls with - # no parentheses, and call/fcall/vcall. - # - # source://prism//lib/prism/translation/ripper.rb#123 - def visit_call_node(node); end - - # Visit an EmbeddedStatementsNode node. - # - # source://prism//lib/prism/translation/ripper.rb#371 - def visit_embedded_statements_node(node); end - - # Visit a FalseNode. - # - # source://prism//lib/prism/translation/ripper.rb#280 - def visit_false_node(node); end - - # Visit a FloatNode node. - # - # source://prism//lib/prism/translation/ripper.rb#286 - def visit_float_node(node); end - - # Visit a GlobalVariableReadNode. - # - # source://prism//lib/prism/translation/ripper.rb#252 - def visit_global_variable_read_node(node); end - - # Visit a ImaginaryNode node. - # - # source://prism//lib/prism/translation/ripper.rb#291 - def visit_imaginary_node(node); end - - # Visit an IntegerNode node. - # - # source://prism//lib/prism/translation/ripper.rb#296 - def visit_integer_node(node); end - - # Visit an InterpolatedStringNode node. - # - # source://prism//lib/prism/translation/ripper.rb#366 - def visit_interpolated_string_node(node); end - - # Visit an InterpolatedSymbolNode node. - # - # source://prism//lib/prism/translation/ripper.rb#381 - def visit_interpolated_symbol_node(node); end - - # Visit a LocalVariableAndWriteNode. - # - # source://prism//lib/prism/translation/ripper.rb#168 - def visit_local_variable_and_write_node(node); end - - # Visit nodes for +=, *=, -=, etc., called LocalVariableOperatorWriteNodes. - # - # source://prism//lib/prism/translation/ripper.rb#178 - def visit_local_variable_operator_write_node(node); end - - # Visit a LocalVariableOrWriteNode. - # - # source://prism//lib/prism/translation/ripper.rb#173 - def visit_local_variable_or_write_node(node); end - - # Visit a LocalVariableReadNode. - # - # source://prism//lib/prism/translation/ripper.rb#183 - def visit_local_variable_read_node(node); end - - # Visit a LocalVariableWriteNode. - # - # source://prism//lib/prism/translation/ripper.rb#161 - def visit_local_variable_write_node(node); end - - # Visit an OrNode. - # - # source://prism//lib/prism/translation/ripper.rb#269 - def visit_or_node(node); end - - # Visit a ParametersNode. - # This will require expanding as we support more kinds of parameters. - # - # source://prism//lib/prism/translation/ripper.rb#206 - def visit_parameters_node(node); end - - # Visit a ParenthesesNode node. - # - # source://prism//lib/prism/translation/ripper.rb#301 - def visit_parentheses_node(node); end - - # Visit a ProgramNode node. - # - # source://prism//lib/prism/translation/ripper.rb#327 - def visit_program_node(node); end - - # Visit a RangeNode node. - # - # source://prism//lib/prism/translation/ripper.rb#334 - def visit_range_node(node); end - - # Visit a RationalNode node. - # - # source://prism//lib/prism/translation/ripper.rb#347 - def visit_rational_node(node); end - - # Visit a RequiredParameterNode. - # - # source://prism//lib/prism/translation/ripper.rb#212 - def visit_required_parameter_node(node); end - - # Visit a RescueNode node. - # - # source://prism//lib/prism/translation/ripper.rb#322 - def visit_rescue_node(node); end - - # Visit a StatementsNode node. - # - # source://prism//lib/prism/translation/ripper.rb#386 - def visit_statements_node(node); end - - # Visit a StringNode node. - # - # source://prism//lib/prism/translation/ripper.rb#352 - def visit_string_node(node); end - - # Visit a SymbolNode node. - # - # source://prism//lib/prism/translation/ripper.rb#376 - def visit_symbol_node(node); end - - # Visit a TrueNode. - # - # source://prism//lib/prism/translation/ripper.rb#274 - def visit_true_node(node); end - - # Visit an XStringNode node. - # - # source://prism//lib/prism/translation/ripper.rb#359 - def visit_x_string_node(node); end - - private - - # source://prism//lib/prism/translation/ripper.rb#680 - def _dispatch0; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def _dispatch1(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def _dispatch2(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def _dispatch3(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#684 - def _dispatch4(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#685 - def _dispatch5(_, _, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#686 - def _dispatch7(_, _, _, _, _, _, _); end - - # This method is responsible for updating lineno and column information - # to reflect the current node. - # - # This method could be drastically improved with some caching on the start - # of every line, but for now it's good enough. - # - # source://prism//lib/prism/translation/ripper.rb#663 - def bounds(location); end - - # If we need to do something unusual, we can directly update the line number - # and column to reflect the current node. - # - # source://prism//lib/prism/translation/ripper.rb#670 - def bounds_values(lineno, column); end - - # For CRuby et al, "no block" in an on_block_var is false - # - # source://prism//lib/prism/translation/ripper.rb#646 - def no_block_value; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_BEGIN(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_CHAR(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_END(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on___end__(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_alias(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_alias_error(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_aref(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_aref_field(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_arg_ambiguous(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_arg_paren(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_args_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_args_add_block(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_args_add_star(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_args_forward; end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_args_new; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_array(_); end - - # source://prism//lib/prism/translation/ripper.rb#684 - def on_aryptn(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_assign(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_assign_error(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_assoc_new(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_assoc_splat(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_assoclist_from_args(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_backref(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_backtick(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_bare_assoc_hash(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_begin(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_binary(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_block_var(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_blockarg(_); end - - # source://prism//lib/prism/translation/ripper.rb#684 - def on_bodystmt(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_brace_block(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_break(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_call(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_case(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_class(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_class_name_error(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_comma(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_command(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#684 - def on_command_call(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_comment(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_const(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_const_path_field(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_const_path_ref(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_const_ref(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_cvar(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_def(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_defined(_); end - - # source://prism//lib/prism/translation/ripper.rb#685 - def on_defs(_, _, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_do_block(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_dot2(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_dot3(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_dyna_symbol(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_else(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_elsif(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_embdoc(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_embdoc_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_embdoc_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_embexpr_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_embexpr_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_embvar(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_ensure(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_excessed_comma; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_fcall(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_field(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_float(_); end - - # source://prism//lib/prism/translation/ripper.rb#684 - def on_fndptn(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_for(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_gvar(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_hash(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_heredoc_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_heredoc_dedent(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_heredoc_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_hshptn(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_ident(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_if(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_if_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_ifop(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_ignored_nl(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_ignored_sp(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_imaginary(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_in(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_int(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_ivar(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_kw(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_kwrest_param(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_label(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_label_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_lambda(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_lbrace(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_lbracket(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_lparen(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_magic_comment(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_massign(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_method_add_arg(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_method_add_block(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_mlhs_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_mlhs_add_post(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_mlhs_add_star(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_mlhs_new; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_mlhs_paren(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_module(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_mrhs_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_mrhs_add_star(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_mrhs_new; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_mrhs_new_from_args(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_next(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_nl(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_nokw_param(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_op(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_opassign(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_operator_ambiguous(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_param_error(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#686 - def on_params(_, _, _, _, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_paren(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_parse_error(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_period(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_program(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_qsymbols_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_qsymbols_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_qsymbols_new; end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_qwords_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_qwords_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_qwords_new; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_rational(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_rbrace(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_rbracket(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_redo; end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_regexp_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_regexp_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_regexp_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_regexp_literal(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_regexp_new; end - - # source://prism//lib/prism/translation/ripper.rb#684 - def on_rescue(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_rescue_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_rest_param(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_retry; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_return(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_return0; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_rparen(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_sclass(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_semicolon(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_sp(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_stmts_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_stmts_new; end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_string_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_string_concat(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_string_content; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_string_dvar(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_string_embexpr(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_string_literal(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_super(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_symbeg(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_symbol(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_symbol_literal(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_symbols_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_symbols_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_symbols_new; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_tlambda(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_tlambeg(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_top_const_field(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_top_const_ref(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_tstring_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_tstring_content(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_tstring_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_unary(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_undef(_); end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_unless(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_unless_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_until(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_until_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_var_alias(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_var_field(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_var_ref(_); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_vcall(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_void_stmt; end - - # source://prism//lib/prism/translation/ripper.rb#683 - def on_when(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_while(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_while_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_word_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_word_new; end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_words_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_words_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_words_new; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_words_sep(_); end - - # source://prism//lib/prism/translation/ripper.rb#682 - def on_xstring_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_xstring_literal(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_xstring_new; end - - # source://prism//lib/prism/translation/ripper.rb#681 - def on_yield(_); end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_yield0; end - - # source://prism//lib/prism/translation/ripper.rb#680 - def on_zsuper; end - - # Lazily initialize the parse result. - # - # source://prism//lib/prism/translation/ripper.rb#676 - def result; end - - # In Prism this is a CallNode with :[]= as the operator. - # In Ripper it's an :aref_field. - # - # source://prism//lib/prism/translation/ripper.rb#521 - def visit_aref_field_node(node); end - - # In Prism this is a CallNode with :[] as the operator. - # In Ripper it's an :aref. - # - # source://prism//lib/prism/translation/ripper.rb#513 - def visit_aref_node(node); end - - # Visit an operation-and-assign node, such as +=. - # - # source://prism//lib/prism/translation/ripper.rb#501 - def visit_binary_op_assign(node, operator: T.unsafe(nil)); end - - # Visit a binary operator node like an AndNode or OrNode - # - # source://prism//lib/prism/translation/ripper.rb#652 - def visit_binary_operator(node); end - - # Visit a list of elements, like the elements of an array or arguments. - # - # source://prism//lib/prism/translation/ripper.rb#474 - def visit_elements(elements); end - - # Visit an InterpolatedStringNode or an InterpolatedSymbolNode node. - # - # source://prism//lib/prism/translation/ripper.rb#482 - def visit_enumerated_node(node); end - - # Generate Ripper events for a CallNode with no opening_loc - # - # source://prism//lib/prism/translation/ripper.rb#410 - def visit_no_paren_call(node); end - - # Visit a node that represents a number. We need to explicitly handle the - # unary - operator. - # - # source://prism//lib/prism/translation/ripper.rb#611 - def visit_number(node); end - - # Ripper has several methods of emitting a symbol literal. Inside an alias - # sometimes it suppresses the [:symbol] wrapper around ident. If the symbol - # is also the name of a keyword (e.g. :if) it will emit a :@kw wrapper, not - # an :@ident wrapper, with similar treatment for constants and operators. - # - # source://prism//lib/prism/translation/ripper.rb#580 - def visit_symbol_literal_node(node, no_symbol_wrapper: T.unsafe(nil)); end - - # For most Rubies and JRuby after 9.4.6.0 this is a no-op. - # - # source://prism//lib/prism/translation/ripper.rb#634 - def visit_unary_operator(value); end - - class << self - # This is a convenience method that runs the SexpBuilderPP subclass parser. - # - # source://prism//lib/prism/translation/ripper.rb#403 - def sexp(source); end - - # This is a convenience method that runs the SexpBuilder subclass parser. - # - # source://prism//lib/prism/translation/ripper.rb#398 - def sexp_raw(source); end - end -end - -# In an alias statement Ripper will emit @kw instead of @ident if the object -# being aliased is a Ruby keyword. For instance, in the line "alias :foo :if", -# the :if is treated as a lexer keyword. So we need to know what symbols are -# also keywords. -# -# source://prism//lib/prism/translation/ripper.rb#532 -Prism::Translation::Ripper::RUBY_KEYWORDS = T.let(T.unsafe(nil), Array) - -# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that -# returns the arrays of [type, *children]. -# -# source://prism//lib/prism/translation/ripper.rb#24 -class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper - private - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_BEGIN(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_CHAR(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_END(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on___end__(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_alias(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_alias_error(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_aref(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_aref_field(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_arg_ambiguous(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_arg_paren(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_args_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_args_add_block(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_args_add_star(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_args_forward(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_args_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_array(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_aryptn(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_assign(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_assign_error(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_assoc_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_assoc_splat(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_assoclist_from_args(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_backref(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_backtick(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_bare_assoc_hash(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_begin(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_binary(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_block_var(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_blockarg(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_bodystmt(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_brace_block(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_break(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_call(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_case(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_class(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_class_name_error(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_comma(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_command(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_command_call(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_comment(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_const(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_const_path_field(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_const_path_ref(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_const_ref(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_cvar(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_def(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_defined(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_defs(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_do_block(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_dot2(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_dot3(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_dyna_symbol(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_else(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_elsif(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc_end(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embexpr_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embexpr_end(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embvar(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_ensure(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_excessed_comma(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_fcall(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_field(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_float(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_fndptn(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_for(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_gvar(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_hash(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_heredoc_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_heredoc_dedent(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_heredoc_end(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_hshptn(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ident(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_if(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_if_mod(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_ifop(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ignored_nl(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ignored_sp(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_imaginary(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_in(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_int(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ivar(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_kw(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_kwrest_param(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_label(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_label_end(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_lambda(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lbrace(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lbracket(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lparen(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_magic_comment(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_massign(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_method_add_arg(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_method_add_block(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mlhs_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mlhs_add_post(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mlhs_add_star(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mlhs_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mlhs_paren(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_module(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mrhs_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mrhs_add_star(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mrhs_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_mrhs_new_from_args(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_next(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_nl(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_nokw_param(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_op(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_opassign(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_operator_ambiguous(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_param_error(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_params(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_paren(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_parse_error(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_period(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_program(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_qsymbols_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_qsymbols_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_qsymbols_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_qwords_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_qwords_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_qwords_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rational(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rbrace(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rbracket(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_redo(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_regexp_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_regexp_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_regexp_end(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_regexp_literal(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_regexp_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_rescue(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_rescue_mod(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_rest_param(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_retry(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_return(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_return0(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rparen(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_sclass(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_semicolon(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_sp(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_stmts_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_stmts_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_string_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_string_concat(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_string_content(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_string_dvar(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_string_embexpr(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_string_literal(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_super(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_symbeg(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_symbol(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_symbol_literal(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_symbols_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_symbols_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_symbols_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tlambda(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tlambeg(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_top_const_field(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_top_const_ref(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tstring_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tstring_content(value); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tstring_end(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_unary(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_undef(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_unless(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_unless_mod(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_until(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_until_mod(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_var_alias(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_var_field(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_var_ref(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_vcall(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_void_stmt(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_when(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_while(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_while_mod(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_word_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_word_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_words_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_words_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_words_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#34 - def on_words_sep(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_xstring_add(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_xstring_literal(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_xstring_new(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_yield(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_yield0(*args); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_zsuper(*args); end -end - -# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that -# returns the same values as ::Ripper::SexpBuilder except with a couple of -# niceties that flatten linked lists into arrays. -# -# source://prism//lib/prism/translation/ripper.rb#43 -class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder - private - - # source://prism//lib/prism/translation/ripper.rb#46 - def _dispatch_event_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def _dispatch_event_push(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_args_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_args_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_mlhs_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_mlhs_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_mrhs_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_mrhs_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_qsymbols_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_qsymbols_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_qwords_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_qwords_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_regexp_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_regexp_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_stmts_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_stmts_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_string_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_symbols_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_symbols_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_word_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_word_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_words_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_words_new; end - - # source://prism//lib/prism/translation/ripper.rb#50 - def on_xstring_add(list, item); end - - # source://prism//lib/prism/translation/ripper.rb#46 - def on_xstring_new; end -end - -# Represents the use of the literal `true` keyword. -# -# true -# ^^^^ -# -# source://prism//lib/prism/node.rb#18139 -class Prism::TrueNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [TrueNode] a new instance of TrueNode - # - # source://prism//lib/prism/node.rb#18141 - def initialize(source, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18148 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18153 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#18163 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#18158 - def compact_child_nodes; end - - # def copy: (**params) -> TrueNode - # - # source://prism//lib/prism/node.rb#18168 - sig { params(params: T.untyped).returns(Prism::TrueNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18153 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } - # - # source://prism//lib/prism/node.rb#18179 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#18185 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18204 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18214 - def type; end - end -end - -# Represents the use of the `undef` keyword. -# -# undef :foo, :bar, :baz -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#18223 -class Prism::UndefNode < ::Prism::Node - # def initialize: (Array[Node] names, Location keyword_loc, Location location) -> void - # - # @return [UndefNode] a new instance of UndefNode - # - # source://prism//lib/prism/node.rb#18225 - def initialize(source, names, keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18234 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18239 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#18249 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#18244 - def compact_child_nodes; end - - # def copy: (**params) -> UndefNode - # - # source://prism//lib/prism/node.rb#18254 - sig { params(params: T.untyped).returns(Prism::UndefNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18239 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[Node], keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#18267 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#18287 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#18282 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#18275 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader names: Array[Node] - # - # source://prism//lib/prism/node.rb#18272 - sig { returns(T::Array[Prism::Node]) } - def names; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18308 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18318 - def type; end - end -end - -# Represents the use of the `unless` keyword, either in the block form or the modifier form. -# -# bar unless foo -# ^^^^^^^^^^^^^^ -# -# unless foo then bar end -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#18330 -class Prism::UnlessNode < ::Prism::Node - # def initialize: (Location keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void - # - # @return [UnlessNode] a new instance of UnlessNode - # - # source://prism//lib/prism/node.rb#18332 - def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18345 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#18368 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#18359 - def compact_child_nodes; end - - # attr_reader consequent: ElseNode? - # - # source://prism//lib/prism/node.rb#18419 - sig { returns(T.nilable(Prism::ElseNode)) } - def consequent; end - - # def copy: (**params) -> UnlessNode - # - # source://prism//lib/prism/node.rb#18373 - sig { params(params: T.untyped).returns(Prism::UnlessNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#18390 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#18445 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#18422 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#18450 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#18435 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#18395 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://prism//lib/prism/node.rb#18401 - sig { returns(Prism::Node) } - def predicate; end - - # source://prism//lib/prism/node.rb#18349 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#18416 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # def then_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#18440 - sig { returns(T.nilable(String)) } - def then_keyword; end - - # attr_reader then_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#18404 - sig { returns(T.nilable(Prism::Location)) } - def then_keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18486 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18496 - def type; end - end -end - -# Represents the use of the `until` keyword, either in the block form or the modifier form. -# -# bar until foo -# ^^^^^^^^^^^^^ -# -# until foo do bar end -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#18508 -class Prism::UntilNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void - # - # @return [UntilNode] a new instance of UntilNode - # - # source://prism//lib/prism/node.rb#18510 - def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18522 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def begin_modifier?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18599 - sig { returns(T::Boolean) } - def begin_modifier?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#18609 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#18580 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#18544 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#18536 - def compact_child_nodes; end - - # def copy: (**params) -> UntilNode - # - # source://prism//lib/prism/node.rb#18549 - sig { params(params: T.untyped).returns(Prism::UntilNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location } - # - # source://prism//lib/prism/node.rb#18565 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#18614 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#18604 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#18574 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://prism//lib/prism/node.rb#18592 - sig { returns(Prism::Node) } - def predicate; end - - # source://prism//lib/prism/node.rb#18526 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#18595 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18645 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18570 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18655 - def type; end - end -end - -# The version constant is set by reading the result of calling pm_version. -Prism::VERSION = T.let(T.unsafe(nil), String) - -# A visitor is a class that provides a default implementation for every accept -# method defined on the nodes. This means it can walk a tree without the -# caller needing to define any special handling. This allows you to handle a -# subset of the tree, while still walking the whole tree. -# -# For example, to find all of the method calls that call the `foo` method, you -# could write: -# -# class FooCalls < Prism::Visitor -# def visit_call_node(node) -# if node.name == "foo" -# # Do something with the node -# end -# -# # Call super so that the visitor continues walking the tree -# super -# end -# end -# -# source://prism//lib/prism/visitor.rb#50 -class Prism::Visitor < ::Prism::BasicVisitor - # Visit a AliasGlobalVariableNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AliasGlobalVariableNode).void } - def visit_alias_global_variable_node(node); end - - # Visit a AliasMethodNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AliasMethodNode).void } - def visit_alias_method_node(node); end - - # Visit a AlternationPatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AlternationPatternNode).void } - def visit_alternation_pattern_node(node); end - - # Visit a AndNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AndNode).void } - def visit_and_node(node); end - - # Visit a ArgumentsNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ArgumentsNode).void } - def visit_arguments_node(node); end - - # Visit a ArrayNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ArrayNode).void } - def visit_array_node(node); end - - # Visit a ArrayPatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ArrayPatternNode).void } - def visit_array_pattern_node(node); end - - # Visit a AssocNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AssocNode).void } - def visit_assoc_node(node); end - - # Visit a AssocSplatNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AssocSplatNode).void } - def visit_assoc_splat_node(node); end - - # Visit a BackReferenceReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BackReferenceReadNode).void } - def visit_back_reference_read_node(node); end - - # Visit a BeginNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BeginNode).void } - def visit_begin_node(node); end - - # Visit a BlockArgumentNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockArgumentNode).void } - def visit_block_argument_node(node); end - - # Visit a BlockLocalVariableNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockLocalVariableNode).void } - def visit_block_local_variable_node(node); end - - # Visit a BlockNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockNode).void } - def visit_block_node(node); end - - # Visit a BlockParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockParameterNode).void } - def visit_block_parameter_node(node); end - - # Visit a BlockParametersNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockParametersNode).void } - def visit_block_parameters_node(node); end - - # Visit a BreakNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BreakNode).void } - def visit_break_node(node); end - - # Visit a CallAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallAndWriteNode).void } - def visit_call_and_write_node(node); end - - # Visit a CallNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallNode).void } - def visit_call_node(node); end - - # Visit a CallOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallOperatorWriteNode).void } - def visit_call_operator_write_node(node); end - - # Visit a CallOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallOrWriteNode).void } - def visit_call_or_write_node(node); end - - # Visit a CallTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallTargetNode).void } - def visit_call_target_node(node); end - - # Visit a CapturePatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CapturePatternNode).void } - def visit_capture_pattern_node(node); end - - # Visit a CaseMatchNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CaseMatchNode).void } - def visit_case_match_node(node); end - - # Visit a CaseNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CaseNode).void } - def visit_case_node(node); end - - # Visit a ClassNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassNode).void } - def visit_class_node(node); end - - # Visit a ClassVariableAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableAndWriteNode).void } - def visit_class_variable_and_write_node(node); end - - # Visit a ClassVariableOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableOperatorWriteNode).void } - def visit_class_variable_operator_write_node(node); end - - # Visit a ClassVariableOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableOrWriteNode).void } - def visit_class_variable_or_write_node(node); end - - # Visit a ClassVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableReadNode).void } - def visit_class_variable_read_node(node); end - - # Visit a ClassVariableTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableTargetNode).void } - def visit_class_variable_target_node(node); end - - # Visit a ClassVariableWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableWriteNode).void } - def visit_class_variable_write_node(node); end - - # Visit a ConstantAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantAndWriteNode).void } - def visit_constant_and_write_node(node); end - - # Visit a ConstantOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantOperatorWriteNode).void } - def visit_constant_operator_write_node(node); end - - # Visit a ConstantOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantOrWriteNode).void } - def visit_constant_or_write_node(node); end - - # Visit a ConstantPathAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathAndWriteNode).void } - def visit_constant_path_and_write_node(node); end - - # Visit a ConstantPathNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathNode).void } - def visit_constant_path_node(node); end - - # Visit a ConstantPathOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathOperatorWriteNode).void } - def visit_constant_path_operator_write_node(node); end - - # Visit a ConstantPathOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathOrWriteNode).void } - def visit_constant_path_or_write_node(node); end - - # Visit a ConstantPathTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathTargetNode).void } - def visit_constant_path_target_node(node); end - - # Visit a ConstantPathWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # Visit a ConstantReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantReadNode).void } - def visit_constant_read_node(node); end - - # Visit a ConstantTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantTargetNode).void } - def visit_constant_target_node(node); end - - # Visit a ConstantWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # Visit a DefNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::DefNode).void } - def visit_def_node(node); end - - # Visit a DefinedNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::DefinedNode).void } - def visit_defined_node(node); end - - # Visit a ElseNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ElseNode).void } - def visit_else_node(node); end - - # Visit a EmbeddedStatementsNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::EmbeddedStatementsNode).void } - def visit_embedded_statements_node(node); end - - # Visit a EmbeddedVariableNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::EmbeddedVariableNode).void } - def visit_embedded_variable_node(node); end - - # Visit a EnsureNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::EnsureNode).void } - def visit_ensure_node(node); end - - # Visit a FalseNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::FalseNode).void } - def visit_false_node(node); end - - # Visit a FindPatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::FindPatternNode).void } - def visit_find_pattern_node(node); end - - # Visit a FlipFlopNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::FlipFlopNode).void } - def visit_flip_flop_node(node); end - - # Visit a FloatNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::FloatNode).void } - def visit_float_node(node); end - - # Visit a ForNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ForNode).void } - def visit_for_node(node); end - - # Visit a ForwardingArgumentsNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ForwardingArgumentsNode).void } - def visit_forwarding_arguments_node(node); end - - # Visit a ForwardingParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ForwardingParameterNode).void } - def visit_forwarding_parameter_node(node); end - - # Visit a ForwardingSuperNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ForwardingSuperNode).void } - def visit_forwarding_super_node(node); end - - # Visit a GlobalVariableAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableAndWriteNode).void } - def visit_global_variable_and_write_node(node); end - - # Visit a GlobalVariableOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } - def visit_global_variable_operator_write_node(node); end - - # Visit a GlobalVariableOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableOrWriteNode).void } - def visit_global_variable_or_write_node(node); end - - # Visit a GlobalVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableReadNode).void } - def visit_global_variable_read_node(node); end - - # Visit a GlobalVariableTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableTargetNode).void } - def visit_global_variable_target_node(node); end - - # Visit a GlobalVariableWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableWriteNode).void } - def visit_global_variable_write_node(node); end - - # Visit a HashNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::HashNode).void } - def visit_hash_node(node); end - - # Visit a HashPatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::HashPatternNode).void } - def visit_hash_pattern_node(node); end - - # Visit a IfNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IfNode).void } - def visit_if_node(node); end - - # Visit a ImaginaryNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ImaginaryNode).void } - def visit_imaginary_node(node); end - - # Visit a ImplicitNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ImplicitNode).void } - def visit_implicit_node(node); end - - # Visit a ImplicitRestNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ImplicitRestNode).void } - def visit_implicit_rest_node(node); end - - # Visit a InNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InNode).void } - def visit_in_node(node); end - - # Visit a IndexAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IndexAndWriteNode).void } - def visit_index_and_write_node(node); end - - # Visit a IndexOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IndexOperatorWriteNode).void } - def visit_index_operator_write_node(node); end - - # Visit a IndexOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IndexOrWriteNode).void } - def visit_index_or_write_node(node); end - - # Visit a IndexTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IndexTargetNode).void } - def visit_index_target_node(node); end - - # Visit a InstanceVariableAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableAndWriteNode).void } - def visit_instance_variable_and_write_node(node); end - - # Visit a InstanceVariableOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } - def visit_instance_variable_operator_write_node(node); end - - # Visit a InstanceVariableOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableOrWriteNode).void } - def visit_instance_variable_or_write_node(node); end - - # Visit a InstanceVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableReadNode).void } - def visit_instance_variable_read_node(node); end - - # Visit a InstanceVariableTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableTargetNode).void } - def visit_instance_variable_target_node(node); end - - # Visit a InstanceVariableWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableWriteNode).void } - def visit_instance_variable_write_node(node); end - - # Visit a IntegerNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IntegerNode).void } - def visit_integer_node(node); end - - # Visit a InterpolatedMatchLastLineNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedMatchLastLineNode).void } - def visit_interpolated_match_last_line_node(node); end - - # Visit a InterpolatedRegularExpressionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedRegularExpressionNode).void } - def visit_interpolated_regular_expression_node(node); end - - # Visit a InterpolatedStringNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedStringNode).void } - def visit_interpolated_string_node(node); end - - # Visit a InterpolatedSymbolNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedSymbolNode).void } - def visit_interpolated_symbol_node(node); end - - # Visit a InterpolatedXStringNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedXStringNode).void } - def visit_interpolated_x_string_node(node); end - - # Visit a KeywordHashNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::KeywordHashNode).void } - def visit_keyword_hash_node(node); end - - # Visit a KeywordRestParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::KeywordRestParameterNode).void } - def visit_keyword_rest_parameter_node(node); end - - # Visit a LambdaNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LambdaNode).void } - def visit_lambda_node(node); end - - # Visit a LocalVariableAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableAndWriteNode).void } - def visit_local_variable_and_write_node(node); end - - # Visit a LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableOperatorWriteNode).void } - def visit_local_variable_operator_write_node(node); end - - # Visit a LocalVariableOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableOrWriteNode).void } - def visit_local_variable_or_write_node(node); end - - # Visit a LocalVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableReadNode).void } - def visit_local_variable_read_node(node); end - - # Visit a LocalVariableTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableTargetNode).void } - def visit_local_variable_target_node(node); end - - # Visit a LocalVariableWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableWriteNode).void } - def visit_local_variable_write_node(node); end - - # Visit a MatchLastLineNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MatchLastLineNode).void } - def visit_match_last_line_node(node); end - - # Visit a MatchPredicateNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MatchPredicateNode).void } - def visit_match_predicate_node(node); end - - # Visit a MatchRequiredNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MatchRequiredNode).void } - def visit_match_required_node(node); end - - # Visit a MatchWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MatchWriteNode).void } - def visit_match_write_node(node); end - - # Visit a MissingNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MissingNode).void } - def visit_missing_node(node); end - - # Visit a ModuleNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ModuleNode).void } - def visit_module_node(node); end - - # Visit a MultiTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MultiTargetNode).void } - def visit_multi_target_node(node); end - - # Visit a MultiWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MultiWriteNode).void } - def visit_multi_write_node(node); end - - # Visit a NextNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NextNode).void } - def visit_next_node(node); end - - # Visit a NilNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NilNode).void } - def visit_nil_node(node); end - - # Visit a NoKeywordsParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NoKeywordsParameterNode).void } - def visit_no_keywords_parameter_node(node); end - - # Visit a NumberedParametersNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NumberedParametersNode).void } - def visit_numbered_parameters_node(node); end - - # Visit a NumberedReferenceReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NumberedReferenceReadNode).void } - def visit_numbered_reference_read_node(node); end - - # Visit a OptionalKeywordParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::OptionalKeywordParameterNode).void } - def visit_optional_keyword_parameter_node(node); end - - # Visit a OptionalParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::OptionalParameterNode).void } - def visit_optional_parameter_node(node); end - - # Visit a OrNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::OrNode).void } - def visit_or_node(node); end - - # Visit a ParametersNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ParametersNode).void } - def visit_parameters_node(node); end - - # Visit a ParenthesesNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ParenthesesNode).void } - def visit_parentheses_node(node); end - - # Visit a PinnedExpressionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::PinnedExpressionNode).void } - def visit_pinned_expression_node(node); end - - # Visit a PinnedVariableNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::PinnedVariableNode).void } - def visit_pinned_variable_node(node); end - - # Visit a PostExecutionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::PostExecutionNode).void } - def visit_post_execution_node(node); end - - # Visit a PreExecutionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::PreExecutionNode).void } - def visit_pre_execution_node(node); end - - # Visit a ProgramNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ProgramNode).void } - def visit_program_node(node); end - - # Visit a RangeNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RangeNode).void } - def visit_range_node(node); end - - # Visit a RationalNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RationalNode).void } - def visit_rational_node(node); end - - # Visit a RedoNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RedoNode).void } - def visit_redo_node(node); end - - # Visit a RegularExpressionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RegularExpressionNode).void } - def visit_regular_expression_node(node); end - - # Visit a RequiredKeywordParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RequiredKeywordParameterNode).void } - def visit_required_keyword_parameter_node(node); end - - # Visit a RequiredParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RequiredParameterNode).void } - def visit_required_parameter_node(node); end - - # Visit a RescueModifierNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RescueModifierNode).void } - def visit_rescue_modifier_node(node); end - - # Visit a RescueNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RescueNode).void } - def visit_rescue_node(node); end - - # Visit a RestParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RestParameterNode).void } - def visit_rest_parameter_node(node); end - - # Visit a RetryNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RetryNode).void } - def visit_retry_node(node); end - - # Visit a ReturnNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ReturnNode).void } - def visit_return_node(node); end - - # Visit a SelfNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SelfNode).void } - def visit_self_node(node); end - - # Visit a SingletonClassNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end - - # Visit a SourceEncodingNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SourceEncodingNode).void } - def visit_source_encoding_node(node); end - - # Visit a SourceFileNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SourceFileNode).void } - def visit_source_file_node(node); end - - # Visit a SourceLineNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SourceLineNode).void } - def visit_source_line_node(node); end - - # Visit a SplatNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SplatNode).void } - def visit_splat_node(node); end - - # Visit a StatementsNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::StatementsNode).void } - def visit_statements_node(node); end - - # Visit a StringNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::StringNode).void } - def visit_string_node(node); end - - # Visit a SuperNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SuperNode).void } - def visit_super_node(node); end - - # Visit a SymbolNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SymbolNode).void } - def visit_symbol_node(node); end - - # Visit a TrueNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::TrueNode).void } - def visit_true_node(node); end - - # Visit a UndefNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::UndefNode).void } - def visit_undef_node(node); end - - # Visit a UnlessNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::UnlessNode).void } - def visit_unless_node(node); end - - # Visit a UntilNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::UntilNode).void } - def visit_until_node(node); end - - # Visit a WhenNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::WhenNode).void } - def visit_when_node(node); end - - # Visit a WhileNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::WhileNode).void } - def visit_while_node(node); end - - # Visit a XStringNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::XStringNode).void } - def visit_x_string_node(node); end - - # Visit a YieldNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::YieldNode).void } - def visit_yield_node(node); end -end - -# Represents the use of the `when` keyword within a case statement. -# -# case true -# when true -# ^^^^^^^^^ -# end -# -# source://prism//lib/prism/node.rb#18666 -class Prism::WhenNode < ::Prism::Node - # def initialize: (Location keyword_loc, Array[Node] conditions, StatementsNode? statements, Location location) -> void - # - # @return [WhenNode] a new instance of WhenNode - # - # source://prism//lib/prism/node.rb#18668 - def initialize(source, keyword_loc, conditions, statements, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18678 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18683 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#18696 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#18688 - def compact_child_nodes; end - - # attr_reader conditions: Array[Node] - # - # source://prism//lib/prism/node.rb#18726 - sig { returns(T::Array[Prism::Node]) } - def conditions; end - - # def copy: (**params) -> WhenNode - # - # source://prism//lib/prism/node.rb#18701 - sig { params(params: T.untyped).returns(Prism::WhenNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18683 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location } - # - # source://prism//lib/prism/node.rb#18715 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#18738 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#18733 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#18720 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#18729 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18765 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18775 - def type; end - end -end - -# Represents the use of the `while` keyword, either in the block form or the modifier form. -# -# bar while foo -# ^^^^^^^^^^^^^ -# -# while foo do bar end -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#18787 -class Prism::WhileNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void - # - # @return [WhileNode] a new instance of WhileNode - # - # source://prism//lib/prism/node.rb#18789 - def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18801 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def begin_modifier?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#18878 - sig { returns(T::Boolean) } - def begin_modifier?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18810 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#18888 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#18859 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#18823 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#18815 - def compact_child_nodes; end - - # def copy: (**params) -> WhileNode - # - # source://prism//lib/prism/node.rb#18828 - sig { params(params: T.untyped).returns(Prism::WhileNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18810 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location } - # - # source://prism//lib/prism/node.rb#18844 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#18893 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#18883 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#18853 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://prism//lib/prism/node.rb#18871 - sig { returns(Prism::Node) } - def predicate; end - - # source://prism//lib/prism/node.rb#18805 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#18874 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18924 - def type; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18849 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18934 - def type; end - end -end - -# Represents an xstring literal with no interpolation. -# -# `foo` -# ^^^^^ -# -# source://prism//lib/prism/node.rb#18943 -class Prism::XStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void - # - # @return [XStringNode] a new instance of XStringNode - # - # source://prism//lib/prism/node.rb#18945 - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18957 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18962 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#19044 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#19014 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#18972 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#18967 - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#19039 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#19008 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (**params) -> XStringNode - # - # source://prism//lib/prism/node.rb#18977 - sig { params(params: T.untyped).returns(Prism::XStringNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18962 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } - # - # source://prism//lib/prism/node.rb#18993 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#19029 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#19024 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#19049 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#19034 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#19002 - sig { returns(Prism::Location) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#19074 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#19020 - sig { returns(String) } - def unescaped; end - - private - - # private attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18998 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#19084 - def type; end - end -end - -# Represents the use of the `yield` keyword. -# -# yield 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#19093 -class Prism::YieldNode < ::Prism::Node - # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void - # - # @return [YieldNode] a new instance of YieldNode - # - # source://prism//lib/prism/node.rb#19095 - def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#19106 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#19166 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#19111 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#19123 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#19116 - def compact_child_nodes; end - - # def copy: (**params) -> YieldNode - # - # source://prism//lib/prism/node.rb#19128 - sig { params(params: T.untyped).returns(Prism::YieldNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#19111 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } - # - # source://prism//lib/prism/node.rb#19143 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#19197 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#19182 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#19148 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#19187 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#19154 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#19192 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#19169 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#19225 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#19235 - def type; end - end -end diff --git a/sorbet/rbi/gems/prism@1.2.0.rbi b/sorbet/rbi/gems/prism@1.2.0.rbi new file mode 100644 index 0000000..c6c606d --- /dev/null +++ b/sorbet/rbi/gems/prism@1.2.0.rbi @@ -0,0 +1,39085 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prism` gem. +# Please instead update this file by running `bin/tapioca gem prism`. + + +# typed: strict + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/dsl.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/node.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/visitor.rbi.erb +# if you are looking to modify the template +# =end + +# We keep these shims in here because our client libraries might not have parser +# in their bundle. +module Parser; end + +class Parser::Base; end + +# The Prism Ruby parser. +# +# "Parsing Ruby is suddenly manageable!" +# - You, hopefully +# +# source://prism//lib/prism.rb#8 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + def dump_file(*_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + def lex(*_arg0); end + + # :call-seq: + # Prism::lex_compat(source, **options) -> LexCompat::Result + # + # Returns a parse result whose value is an array of tokens that closely + # resembles the return value of Ripper::lex. The main difference is that the + # `:on_sp` token is not emitted. + # + # For supported options, see Prism::parse. + # + # source://prism//lib/prism.rb#45 + sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } + def lex_compat(source, **options); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(*_arg0); end + + # :call-seq: + # Prism::lex_ripper(source) -> Array + # + # This lexes with the Ripper lex. It drops any space events but otherwise + # returns the same tokens. Raises SyntaxError if the syntax in source is + # invalid. + # + # source://prism//lib/prism.rb#55 + sig { params(source: String).returns(T::Array[T.untyped]) } + def lex_ripper(source); end + + # :call-seq: + # Prism::load(source, serialized) -> ParseResult + # + # Load the serialized AST using the source as a reference into a tree. + # + # source://prism//lib/prism.rb#63 + sig { params(source: String, serialized: String).returns(Prism::ParseResult) } + def load(source, serialized); end + + # Mirror the Prism.parse API by using the serialization API. + def parse(*_arg0); end + + # Mirror the Prism.parse_comments API by using the serialization API. + def parse_comments(*_arg0); end + + # Mirror the Prism.parse_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_failure?(*_arg0); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap + # when it is available. + def parse_file(*_arg0); end + + # Mirror the Prism.parse_file_comments API by using the serialization + # API. This uses native strings instead of Ruby strings because it allows us + # to use mmap when it is available. + def parse_file_comments(*_arg0); end + + # Mirror the Prism.parse_file_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_file_failure?(*_arg0); end + + # Mirror the Prism.parse_file_success? API by using the serialization API. + # + # @return [Boolean] + def parse_file_success?(*_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + def parse_lex_file(*_arg0); end + + # Mirror the Prism.parse_stream API by using the serialization API. + def parse_stream(*_arg0); end + + # Mirror the Prism.parse_success? API by using the serialization API. + # + # @return [Boolean] + def parse_success?(*_arg0); end + + # Mirror the Prism.profile API by using the serialization API. + def profile(*_arg0); end + + # Mirror the Prism.profile_file API by using the serialization API. + def profile_file(*_arg0); end + end +end + +# Specialized version of Prism::Source for source code that includes ASCII +# characters only. This class is used to apply performance optimizations that +# cannot be applied to sources that include multibyte characters. +# +# In the extremely rare case that a source includes multi-byte characters but +# is marked as binary because of a magic encoding comment and it cannot be +# eagerly converted to UTF-8, this class will be used as well. This is because +# at that point we will treat everything as single-byte characters. +# +# source://prism//lib/prism/parse_result.rb#236 +class Prism::ASCIISource < ::Prism::Source + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#243 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#238 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Returns a cache that is the identity function in order to maintain the + # same interface. We can do this because code units are always equivalent to + # byte offsets for ASCII-only sources. + # + # source://prism//lib/prism/parse_result.rb#260 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # Specialized version of `code_units_column` that does not depend on + # `code_units_offset`, which is a more expensive operation. This is + # essentially the same as `Prism::Source#column`. + # + # source://prism//lib/prism/parse_result.rb#267 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # source://prism//lib/prism/parse_result.rb#253 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#227 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # Initialize a new AliasGlobalVariableNode node. + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#229 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#316 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#240 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#245 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#255 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#250 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#260 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#245 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#268 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#300 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#295 + sig { returns(String) } + def keyword; end + + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#288 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the global variable that can be used after aliasing. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#276 + sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } + def new_name; end + + # Represents the old name of the global variable that can be used before aliasing. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#282 + sig do + returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) + end + def old_name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#305 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#310 + def type; end + end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#328 +class Prism::AliasMethodNode < ::Prism::Node + # Initialize a new AliasMethodNode node. + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://prism//lib/prism/node.rb#330 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#426 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#341 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#346 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#356 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#351 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode + # + # source://prism//lib/prism/node.rb#361 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#346 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#369 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#410 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#405 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#398 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#383 + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } + def new_name; end + + # Represents the old name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#395 + sig do + returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) + end + def old_name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#415 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#420 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#438 +class Prism::AlternationPatternNode < ::Prism::Node + # Initialize a new AlternationPatternNode node. + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://prism//lib/prism/node.rb#440 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#527 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#451 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#466 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#461 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode + # + # source://prism//lib/prism/node.rb#471 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#479 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#511 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. + # + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#487 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#506 + sig { returns(String) } + def operator; end + + # Represents the alternation operator location. + # + # foo => bar | baz + # ^ + # + # source://prism//lib/prism/node.rb#499 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#493 + sig { returns(Prism::Node) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#516 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#521 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#539 +class Prism::AndNode < ::Prism::Node + # Initialize a new AndNode node. + # + # @return [AndNode] a new instance of AndNode + # + # source://prism//lib/prism/node.rb#541 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#634 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#552 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#557 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#567 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#562 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode + # + # source://prism//lib/prism/node.rb#572 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#557 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#580 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#618 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left and right + # ^^^^ + # + # 1 && 2 + # ^ + # + # source://prism//lib/prism/node.rb#591 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#613 + sig { returns(String) } + def operator; end + + # The location of the `and` keyword or the `&&` operator. + # + # left and right + # ^^^ + # + # source://prism//lib/prism/node.rb#606 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # left && right + # ^^^^^ + # + # 1 and 2 + # ^ + # + # source://prism//lib/prism/node.rb#600 + sig { returns(Prism::Node) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#623 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#628 + def type; end + end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#646 +class Prism::ArgumentsNode < ::Prism::Node + # Initialize a new ArgumentsNode node. + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://prism//lib/prism/node.rb#648 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, arguments); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#734 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#657 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#715 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#662 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#672 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#667 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_forwarding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#690 + sig { returns(T::Boolean) } + def contains_forwarding?; end + + # def contains_keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#700 + sig { returns(T::Boolean) } + def contains_keyword_splat?; end + + # def contains_keywords?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#695 + sig { returns(T::Boolean) } + def contains_keywords?; end + + # def contains_multiple_splats?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#710 + sig { returns(T::Boolean) } + def contains_multiple_splats?; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#705 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: Array[Prism::node]) -> ArgumentsNode + # + # source://prism//lib/prism/node.rb#677 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).returns(Prism::ArgumentsNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#662 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } + # + # source://prism//lib/prism/node.rb#685 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#718 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#723 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#728 + def type; end + end +end + +# Flags for arguments nodes. +# +# source://prism//lib/prism/node.rb#16684 +module Prism::ArgumentsNodeFlags; end + +# if the arguments contain forwarding +# +# source://prism//lib/prism/node.rb#16686 +Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) + +# if the arguments contain keywords +# +# source://prism//lib/prism/node.rb#16689 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a keyword splat +# +# source://prism//lib/prism/node.rb#16692 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) + +# if the arguments contain multiple splats +# +# source://prism//lib/prism/node.rb#16698 +Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a splat +# +# source://prism//lib/prism/node.rb#16695 +Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#746 +class Prism::ArrayNode < ::Prism::Node + # Initialize a new ArrayNode node. + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://prism//lib/prism/node.rb#748 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, elements, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#862 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#759 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#764 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#841 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the optional source location for the closing token. + # + # [1,2,3] # "]" + # %w[foo bar baz] # "]" + # %I(apple orange banana) # ")" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#823 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#774 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#769 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#792 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode + # + # source://prism//lib/prism/node.rb#779 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#764 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#787 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. + # + # source://prism//lib/prism/node.rb#797 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#846 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#836 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the optional source location for the opening token. + # + # [1,2,3] # "[" + # %w[foo bar baz] # "%w[" + # %I(apple orange banana) # "%I(" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#805 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#851 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#856 + def type; end + end +end + +# Flags for array nodes. +# +# source://prism//lib/prism/node.rb#16702 +module Prism::ArrayNodeFlags; end + +# if array contains splat nodes +# +# source://prism//lib/prism/node.rb#16704 +Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *1 +# ^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#888 +class Prism::ArrayPatternNode < ::Prism::Node + # Initialize a new ArrayPatternNode node. + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://prism//lib/prism/node.rb#890 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1006 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#904 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#985 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#967 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#924 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#914 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # + # source://prism//lib/prism/node.rb#942 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode + # + # source://prism//lib/prism/node.rb#929 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#937 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#990 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#980 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#954 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader posts: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#951 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#945 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#948 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#995 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1000 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#1023 +class Prism::AssocNode < ::Prism::Node + # Initialize a new AssocNode node. + # + # @return [AssocNode] a new instance of AssocNode + # + # source://prism//lib/prism/node.rb#1025 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, key, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1127 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1036 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1041 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1051 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1046 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode + # + # source://prism//lib/prism/node.rb#1056 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1041 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } + # + # source://prism//lib/prism/node.rb#1064 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1111 + sig { override.returns(String) } + def inspect; end + + # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { a: b } + # ^ + # + # { foo => bar } + # ^^^ + # + # { def a; end => 1 } + # ^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1078 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#1106 + sig { returns(T.nilable(String)) } + def operator; end + + # The location of the `=>` operator, if present. + # + # { foo => bar } + # ^^ + # + # source://prism//lib/prism/node.rb#1093 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1116 + sig { override.returns(Symbol) } + def type; end + + # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { foo => bar } + # ^^^ + # + # { x: 1 } + # ^ + # + # source://prism//lib/prism/node.rb#1087 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1121 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1139 +class Prism::AssocSplatNode < ::Prism::Node + # Initialize a new AssocSplatNode node. + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://prism//lib/prism/node.rb#1141 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1223 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1151 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1168 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1161 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode + # + # source://prism//lib/prism/node.rb#1173 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#1181 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1207 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1202 + sig { returns(String) } + def operator; end + + # The location of the `**` operator. + # + # { **x } + # ^^ + # + # source://prism//lib/prism/node.rb#1195 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1212 + sig { override.returns(Symbol) } + def type; end + + # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. + # + # { **foo } + # ^^^ + # + # source://prism//lib/prism/node.rb#1189 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1217 + def type; end + end +end + +# The FFI backend is used on other Ruby implementations. +# +# source://prism//lib/prism.rb#81 +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://prism//lib/prism/node.rb#1234 +class Prism::BackReferenceReadNode < ::Prism::Node + # Initialize a new BackReferenceReadNode node. + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1236 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1301 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1245 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1250 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1260 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1255 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1265 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1250 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#1273 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1285 + sig { override.returns(String) } + def inspect; end + + # The name of the back-reference variable, including the leading `$`. + # + # $& # name `:$&` + # + # $+ # name `:$+` + # + # source://prism//lib/prism/node.rb#1282 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1290 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1295 + def type; end + end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# source://prism//lib/prism/visitor.rb#14 +class Prism::BasicVisitor + # Calls `accept` on the given node if it is not `nil`, which in turn should + # call back into this visitor by calling the appropriate `visit_*` method. + # + # source://prism//lib/prism/visitor.rb#17 + sig { params(node: T.nilable(Prism::Node)).void } + def visit(node); end + + # Visits each node in `nodes` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#23 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } + def visit_all(nodes); end + + # Visits the child nodes of `node` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1313 +class Prism::BeginNode < ::Prism::Node + # Initialize a new BeginNode node. + # + # @return [BeginNode] a new instance of BeginNode + # + # source://prism//lib/prism/node.rb#1315 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1431 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1329 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1405 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1367 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1334 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1349 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1339 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode + # + # source://prism//lib/prism/node.rb#1354 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1334 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#1362 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#1386 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1410 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1392 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://prism//lib/prism/node.rb#1389 + sig { returns(T.nilable(Prism::EnsureNode)) } + def ensure_clause; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1415 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#79 + def newline_flag!(lines); end + + # attr_reader rescue_clause: RescueNode? + # + # source://prism//lib/prism/node.rb#1383 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#1380 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1420 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1425 + def type; end + end +end + +# Represents a block argument using `&`. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1446 +class Prism::BlockArgumentNode < ::Prism::Node + # Initialize a new BlockArgumentNode node. + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1448 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, expression, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1524 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1458 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1475 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1468 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1480 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#1488 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#1493 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1508 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1503 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1496 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1513 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1518 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://prism//lib/prism/node.rb#1535 +class Prism::BlockLocalVariableNode < ::Prism::Node + # Initialize a new BlockLocalVariableNode node. + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1537 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1603 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1546 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1551 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1561 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1556 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1566 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1551 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#1574 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1587 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1584 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1579 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1592 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1597 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1614 +class Prism::BlockNode < ::Prism::Node + # Initialize a new BlockNode node. + # + # @return [BlockNode] a new instance of BlockNode + # + # source://prism//lib/prism/node.rb#1616 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1714 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1629 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#1671 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1634 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#1693 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#1681 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1647 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1639 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode + # + # source://prism//lib/prism/node.rb#1652 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1634 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#1660 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1698 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#1665 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#1688 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#1674 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil + # + # source://prism//lib/prism/node.rb#1668 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } + def parameters; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1703 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1708 + def type; end + end +end + +# Represents a block parameter of a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#1730 +class Prism::BlockParameterNode < ::Prism::Node + # Initialize a new BlockParameterNode node. + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://prism//lib/prism/node.rb#1732 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1825 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1743 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1748 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1758 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1753 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode + # + # source://prism//lib/prism/node.rb#1763 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1748 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#1771 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1809 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#1781 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#1784 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1804 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1797 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1776 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1814 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1819 + def type; end + end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#1842 +class Prism::BlockParametersNode < ::Prism::Node + # Initialize a new BlockParametersNode node. + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://prism//lib/prism/node.rb#1844 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1950 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1856 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#1929 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#1911 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1874 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1866 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode + # + # source://prism//lib/prism/node.rb#1879 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#1887 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1934 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[BlockLocalVariableNode] + # + # source://prism//lib/prism/node.rb#1895 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } + def locals; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#1924 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#1898 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#1892 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1939 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1944 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1964 +class Prism::BreakNode < ::Prism::Node + # Initialize a new BreakNode node. + # + # @return [BreakNode] a new instance of BreakNode + # + # source://prism//lib/prism/node.rb#1966 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2048 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1976 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # break foo + # ^^^ + # + # source://prism//lib/prism/node.rb#2014 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1993 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1986 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode + # + # source://prism//lib/prism/node.rb#1998 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#2006 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2032 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#2027 + sig { returns(String) } + def keyword; end + + # The location of the `break` keyword. + # + # break foo + # ^^^^^ + # + # source://prism//lib/prism/node.rb#2020 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2037 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2042 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2059 +class Prism::CallAndWriteNode < ::Prism::Node + # Initialize a new CallAndWriteNode node. + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2061 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2208 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2076 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2122 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2177 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2135 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2094 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2086 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2099 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#2107 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2127 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2192 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2182 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2148 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2187 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2167 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2161 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2132 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2112 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2197 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2174 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2117 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2164 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2202 + def type; end + end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2240 +class Prism::CallNode < ::Prism::Node + # Initialize a new CallNode node. + # + # @return [CallNode] a new instance of CallNode + # + # source://prism//lib/prism/node.rb#2242 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2424 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2258 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2369 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2305 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockNode | BlockArgumentNode | nil + # + # source://prism//lib/prism/node.rb#2385 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2388 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2327 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2263 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2403 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2372 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2277 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2268 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode + # + # source://prism//lib/prism/node.rb#2282 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::CallNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2263 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: BlockNode | BlockArgumentNode | nil } + # + # source://prism//lib/prism/node.rb#2290 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # When a call node has the attribute_write flag set, it means that the call + # is using the attribute write syntax. This is either a method call to []= + # or a method call to a method that ends with =. Either way, the = sign is + # present in the source. + # + # Prism returns the message_loc _without_ the = sign attached, because there + # can be any amount of space between the message and the = sign. However, + # sometimes you want the location of the full message including the inner + # space and the = sign. This method provides that. + # + # source://prism//lib/prism/node_ext.rb#331 + sig { returns(T.nilable(Prism::Location)) } + def full_message_loc; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2310 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2408 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2393 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2343 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2340 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2398 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2356 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar + # ^^^ + # + # +foo + # ^^^ + # + # foo + bar + # ^^^ + # + # source://prism//lib/prism/node.rb#2324 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2295 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2413 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2300 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2418 + def type; end + end +end + +# Flags for call nodes. +# +# source://prism//lib/prism/node.rb#16708 +module Prism::CallNodeFlags; end + +# a call that is an attribute write, so the value being written should be returned +# +# source://prism//lib/prism/node.rb#16716 +Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) + +# a call that ignores method visibility +# +# source://prism//lib/prism/node.rb#16719 +Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) + +# &. operator +# +# source://prism//lib/prism/node.rb#16710 +Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) + +# a call that could have been a local variable +# +# source://prism//lib/prism/node.rb#16713 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2442 +class Prism::CallOperatorWriteNode < ::Prism::Node + # Initialize a new CallOperatorWriteNode node. + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2444 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2590 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2460 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2506 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#2551 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#2554 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2564 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2519 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2465 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2478 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2470 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2483 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2465 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#2491 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2511 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2574 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2569 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2532 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#339 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#346 + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2545 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2516 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2496 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2579 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2561 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2501 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2548 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2584 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2608 +class Prism::CallOrWriteNode < ::Prism::Node + # Initialize a new CallOrWriteNode node. + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2610 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2757 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2625 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2671 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2726 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2684 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2630 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2643 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2635 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2648 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2630 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#2656 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2676 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2741 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2731 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2697 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2736 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2716 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2710 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2681 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2661 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2746 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2723 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2666 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2713 + sig { returns(Symbol) } + def write_name; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2751 + def type; end + end +end + +# Represents assigning to a method call. +# +# foo.bar, = 1 +# ^^^^^^^ +# +# begin +# rescue => foo.bar +# ^^^^^^^ +# end +# +# for foo.bar in baz do end +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#2782 +class Prism::CallTargetNode < ::Prism::Node + # Initialize a new CallTargetNode node. + # + # @return [CallTargetNode] a new instance of CallTargetNode + # + # source://prism//lib/prism/node.rb#2784 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2895 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2796 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2839 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String + # + # source://prism//lib/prism/node.rb#2869 + sig { returns(String) } + def call_operator; end + + # attr_reader call_operator_loc: Location + # + # source://prism//lib/prism/node.rb#2852 + sig { returns(Prism::Location) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2801 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2811 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2806 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode + # + # source://prism//lib/prism/node.rb#2816 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).returns(Prism::CallTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2801 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } + # + # source://prism//lib/prism/node.rb#2824 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2844 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2879 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String + # + # source://prism//lib/prism/node.rb#2874 + sig { returns(String) } + def message; end + + # attr_reader message_loc: Location + # + # source://prism//lib/prism/node.rb#2862 + sig { returns(Prism::Location) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2859 + sig { returns(Symbol) } + def name; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#2849 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2829 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2884 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2834 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2889 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2909 +class Prism::CapturePatternNode < ::Prism::Node + # Initialize a new CapturePatternNode node. + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://prism//lib/prism/node.rb#2911 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, target, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2989 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2922 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2927 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2937 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2932 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode + # + # source://prism//lib/prism/node.rb#2942 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2927 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#2950 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2973 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2968 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2961 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#2958 + sig { returns(Prism::LocalVariableTargetNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2978 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2955 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#2983 + def type; end + end +end + +# Represents the use of a case statement for pattern matching. +# +# case true +# in false +# end +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3003 +class Prism::CaseMatchNode < ::Prism::Node + # Initialize a new CaseMatchNode node. + # + # @return [CaseMatchNode] a new instance of CaseMatchNode + # + # source://prism//lib/prism/node.rb#3005 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3104 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3018 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3078 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3064 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3023 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3037 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3028 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[InNode] + # + # source://prism//lib/prism/node.rb#3058 + sig { returns(T::Array[Prism::InNode]) } + def conditions; end + + # Returns the else clause of the case match node. This method is deprecated + # in favor of #else_clause. + # + # source://prism//lib/prism/node_ext.rb#467 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode + # + # source://prism//lib/prism/node.rb#3042 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3023 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#3050 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#3061 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3083 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3071 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3088 + sig { override.returns(String) } + def inspect; end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3055 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3093 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3098 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3121 +class Prism::CaseNode < ::Prism::Node + # Initialize a new CaseNode node. + # + # @return [CaseNode] a new instance of CaseNode + # + # source://prism//lib/prism/node.rb#3123 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3222 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3136 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3196 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3182 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3155 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3146 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[WhenNode] + # + # source://prism//lib/prism/node.rb#3176 + sig { returns(T::Array[Prism::WhenNode]) } + def conditions; end + + # Returns the else clause of the case node. This method is deprecated in + # favor of #else_clause. + # + # source://prism//lib/prism/node_ext.rb#476 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode + # + # source://prism//lib/prism/node.rb#3160 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#3168 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#3179 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3201 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3189 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3206 + sig { override.returns(String) } + def inspect; end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3173 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3211 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3216 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3237 +class Prism::ClassNode < ::Prism::Node + # Initialize a new ClassNode node. + # + # @return [ClassNode] a new instance of ClassNode + # + # source://prism//lib/prism/node.rb#3239 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3365 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3255 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#3321 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3334 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3295 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3274 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3265 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode + # + # source://prism//lib/prism/node.rb#3302 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } + def constant_path; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode + # + # source://prism//lib/prism/node.rb#3279 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#3287 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3344 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3324 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inheritance_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3339 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#3305 + sig { returns(T.nilable(Prism::Location)) } + def inheritance_operator_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3349 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#3292 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3331 + sig { returns(Symbol) } + def name; end + + # attr_reader superclass: Prism::node? + # + # source://prism//lib/prism/node.rb#3318 + sig { returns(T.nilable(Prism::Node)) } + def superclass; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3354 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3359 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3383 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # Initialize a new ClassVariableAndWriteNode node. + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3385 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3471 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3397 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3402 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3412 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3407 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3417 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3402 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#3425 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#164 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3455 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3430 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3433 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3450 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3440 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3460 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3447 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3465 + def type; end + end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3484 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # Initialize a new ClassVariableOperatorWriteNode node. + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3486 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3571 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3499 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#3552 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3542 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3514 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3509 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3519 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#3527 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#176 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3555 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3532 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3535 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#355 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#362 + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3560 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3549 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3565 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3585 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # Initialize a new ClassVariableOrWriteNode node. + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3587 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3673 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3599 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3614 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3609 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3619 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#3627 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#170 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3657 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3632 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3635 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3652 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3642 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3662 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3649 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3667 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://prism//lib/prism/node.rb#3686 +class Prism::ClassVariableReadNode < ::Prism::Node + # Initialize a new ClassVariableReadNode node. + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#3688 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3753 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3697 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3702 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3712 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3707 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#3717 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3702 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#3725 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3737 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc # name `:@@abc` + # + # @@_test # name `:@@_test` + # + # source://prism//lib/prism/node.rb#3734 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3742 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3747 + def type; end + end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://prism//lib/prism/node.rb#3763 +class Prism::ClassVariableTargetNode < ::Prism::Node + # Initialize a new ClassVariableTargetNode node. + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#3765 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3826 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3774 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3779 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3789 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3784 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#3794 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3779 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#3802 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3810 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3807 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3815 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3820 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3836 +class Prism::ClassVariableWriteNode < ::Prism::Node + # Initialize a new ClassVariableWriteNode node. + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#3838 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3940 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3850 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3855 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3865 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3860 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#3870 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3855 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#3878 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3924 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc = 123 # name `@@abc` + # + # @@_test = :test # name `@@_test` + # + # source://prism//lib/prism/node.rb#3887 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#3893 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3919 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @@foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#3912 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3929 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @@foo = :bar + # ^^^^ + # + # @@_xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#3906 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#3934 + def type; end + end +end + +# A cache that can be used to quickly compute code unit offsets from byte +# offsets. It purposefully provides only a single #[] method to access the +# cache in order to minimize surface area. +# +# Note that there are some known issues here that may or may not be addressed +# in the future: +# +# * The first is that there are issues when the cache computes values that are +# not on character boundaries. This can result in subsequent computations +# being off by one or more code units. +# * The second is that this cache is currently unbounded. In theory we could +# introduce some kind of LRU cache to limit the number of entries, but this +# has not yet been implemented. +# +# source://prism//lib/prism/parse_result.rb#172 +class Prism::CodeUnitsCache + # Initialize a new cache with the given source and encoding. + # + # @return [CodeUnitsCache] a new instance of CodeUnitsCache + # + # source://prism//lib/prism/parse_result.rb#198 + sig { params(source: String, encoding: Encoding).void } + def initialize(source, encoding); end + + # Retrieve the code units offset from the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#212 + sig { params(byte_offset: Integer).returns(Integer) } + def [](byte_offset); end +end + +# source://prism//lib/prism/parse_result.rb#184 +class Prism::CodeUnitsCache::LengthCounter + # @return [LengthCounter] a new instance of LengthCounter + # + # source://prism//lib/prism/parse_result.rb#185 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#190 + def count(byte_offset, byte_length); end +end + +# source://prism//lib/prism/parse_result.rb#173 +class Prism::CodeUnitsCache::UTF16Counter + # @return [UTF16Counter] a new instance of UTF16Counter + # + # source://prism//lib/prism/parse_result.rb#174 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#179 + def count(byte_offset, byte_length); end +end + +# This represents a comment that was encountered during parsing. It is the +# base class for all comment types. +# +# source://prism//lib/prism/parse_result.rb#507 +class Prism::Comment + abstract! + + # Create a new comment object with the given location. + # + # @return [Comment] a new instance of Comment + # + # source://prism//lib/prism/parse_result.rb#512 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # Implement the hash pattern matching interface for Comment. + # + # source://prism//lib/prism/parse_result.rb#517 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The location of this comment in the source. + # + # source://prism//lib/prism/parse_result.rb#509 + sig { returns(Prism::Location) } + def location; end + + # Returns the content of the comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#522 + sig { returns(String) } + def slice; end + + sig { abstract.returns(T::Boolean) } + def trailing?; end +end + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# source://prism//lib/prism/compiler.rb#27 +class Prism::Compiler < ::Prism::Visitor + # Visit an individual node. + # + # source://prism//lib/prism/compiler.rb#29 + sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) } + def visit(node); end + + # Visit the child nodes of the given node. + # Compile a AliasGlobalVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alias_global_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a AliasMethodNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://prism//lib/prism/compiler.rb#34 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.untyped]) } + def visit_all(nodes); end + + # Visit the child nodes of the given node. + # Compile a AlternationPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alternation_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AndNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_and_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_array_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_array_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_assoc_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocSplatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_assoc_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a BackReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_back_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a BeginNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_begin_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockArgumentNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_argument_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockLocalVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_local_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a BreakNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_break_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a CapturePatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_capture_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseMatchNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_case_match_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://prism//lib/prism/compiler.rb#39 + sig { params(node: Prism::Node).returns(T::Array[T.untyped]) } + def visit_child_nodes(node); end + + # Visit the child nodes of the given node. + # Compile a ClassNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_def_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefinedNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_defined_node(node); end + + # Visit the child nodes of the given node. + # Compile a ElseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_else_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedStatementsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_embedded_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_embedded_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a EnsureNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_ensure_node(node); end + + # Visit the child nodes of the given node. + # Compile a FalseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_false_node(node); end + + # Visit the child nodes of the given node. + # Compile a FindPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_find_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a FlipFlopNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_flip_flop_node(node); end + + # Visit the child nodes of the given node. + # Compile a FloatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_float_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_for_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingSuperNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_hash_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a IfNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_if_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImaginaryNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_imaginary_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_implicit_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitRestNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_implicit_rest_node(node); end + + # Visit the child nodes of the given node. + # Compile a InNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_in_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IntegerNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_integer_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedSymbolNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedXStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a ItLocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_it_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ItParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_it_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordHashNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_keyword_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordRestParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_keyword_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a LambdaNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_lambda_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchPredicateNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_predicate_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchRequiredNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_required_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MissingNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_missing_node(node); end + + # Visit the child nodes of the given node. + # Compile a ModuleNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_module_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_multi_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_multi_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a NextNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_next_node(node); end + + # Visit the child nodes of the given node. + # Compile a NilNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_nil_node(node); end + + # Visit the child nodes of the given node. + # Compile a NoKeywordsParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_no_keywords_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_numbered_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_numbered_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_optional_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_optional_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OrNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_or_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParenthesesNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_parentheses_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pinned_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pinned_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a PostExecutionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_post_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a PreExecutionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pre_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a ProgramNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_program_node(node); end + + # Visit the child nodes of the given node. + # Compile a RangeNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_range_node(node); end + + # Visit the child nodes of the given node. + # Compile a RationalNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rational_node(node); end + + # Visit the child nodes of the given node. + # Compile a RedoNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_redo_node(node); end + + # Visit the child nodes of the given node. + # Compile a RegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_required_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_required_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueModifierNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rescue_modifier_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rescue_node(node); end + + # Visit the child nodes of the given node. + # Compile a RestParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RetryNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_retry_node(node); end + + # Visit the child nodes of the given node. + # Compile a ReturnNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_return_node(node); end + + # Visit the child nodes of the given node. + # Compile a SelfNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_self_node(node); end + + # Visit the child nodes of the given node. + # Compile a ShareableConstantNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_shareable_constant_node(node); end + + # Visit the child nodes of the given node. + # Compile a SingletonClassNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_singleton_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceEncodingNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_encoding_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceFileNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_file_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a SplatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StatementsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a SuperNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a SymbolNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a TrueNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_true_node(node); end + + # Visit the child nodes of the given node. + # Compile a UndefNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_undef_node(node); end + + # Visit the child nodes of the given node. + # Compile a UnlessNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_unless_node(node); end + + # Visit the child nodes of the given node. + # Compile a UntilNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_until_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhenNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_when_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhileNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_while_node(node); end + + # Visit the child nodes of the given node. + # Compile a XStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a YieldNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3953 +class Prism::ConstantAndWriteNode < ::Prism::Node + # Initialize a new ConstantAndWriteNode node. + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#3955 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4041 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3967 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3982 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3977 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#3987 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#3995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#182 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4025 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4000 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4003 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4020 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4010 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4030 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4017 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4035 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4054 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # Initialize a new ConstantOperatorWriteNode node. + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4056 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4141 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4069 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4122 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4112 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4074 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4084 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4079 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4089 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4074 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#4097 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#194 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4125 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4102 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4105 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#371 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#378 + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4130 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4119 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4135 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4155 +class Prism::ConstantOrWriteNode < ::Prism::Node + # Initialize a new ConstantOrWriteNode node. + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4157 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4243 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4169 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4174 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4184 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4179 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4189 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4174 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#4197 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#188 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4227 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4202 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4205 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4222 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4212 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4232 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4219 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4237 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4256 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # Initialize a new ConstantPathAndWriteNode node. + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4258 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4336 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4269 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4274 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4284 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4279 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4289 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4274 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#4297 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4320 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4315 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4305 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4302 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4325 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4312 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4330 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4348 +class Prism::ConstantPathNode < ::Prism::Node + # Initialize a new ConstantPathNode node. + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://prism//lib/prism/node.rb#4350 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4459 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4362 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#202 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4367 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4379 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4372 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode + # + # source://prism//lib/prism/node.rb#4384 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4367 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } + # + # source://prism//lib/prism/node.rb#4392 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4438 + sig { returns(String) } + def delimiter; end + + # The location of the `::` delimiter. + # + # ::Foo + # ^^ + # + # One::Two + # ^^ + # + # source://prism//lib/prism/node.rb#4418 + sig { returns(Prism::Location) } + def delimiter_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#195 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#173 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4443 + sig { override.returns(String) } + def inspect; end + + # The name of the constant being accessed. This could be `nil` in the event of a syntax error. + # + # source://prism//lib/prism/node.rb#4409 + sig { returns(T.nilable(Symbol)) } + def name; end + + # The location of the name of the constant. + # + # ::Foo + # ^^^ + # + # One::Two + # ^^^ + # + # source://prism//lib/prism/node.rb#4431 + sig { returns(Prism::Location) } + def name_loc; end + + # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. + # + # Foo::Bar + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^^^ + # + # source://prism//lib/prism/node.rb#4406 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4448 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4453 + def type; end + end +end + +# An error class raised when dynamic parts are found while computing a +# constant path's full name. For example: +# Foo::Bar::Baz -> does not raise because all parts of the constant path are +# simple constants +# var::Bar::Baz -> raises because the first part of the constant path is a +# local variable +# +# source://prism//lib/prism/node_ext.rb#164 +class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end + +# An error class raised when missing nodes are found while computing a +# constant path's full name. For example: +# Foo:: -> raises because the constant path is missing the last part +# +# source://prism//lib/prism/node_ext.rb#169 +class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4472 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # Initialize a new ConstantPathOperatorWriteNode node. + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4474 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4551 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4486 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4532 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4522 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4501 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4496 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4506 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#4514 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4535 + sig { override.returns(String) } + def inspect; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#387 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#394 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4519 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4540 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4529 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4545 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4564 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # Initialize a new ConstantPathOrWriteNode node. + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#4566 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4644 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4577 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4592 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4587 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#4597 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#4605 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4628 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4623 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4613 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4610 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4633 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4620 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4638 + def type; end + end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4656 +class Prism::ConstantPathTargetNode < ::Prism::Node + # Initialize a new ConstantPathTargetNode node. + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#4658 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4746 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4670 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#243 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4675 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4687 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4680 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#4692 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4675 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } + # + # source://prism//lib/prism/node.rb#4700 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4725 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#4711 + sig { returns(Prism::Location) } + def delimiter_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#236 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#216 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4730 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#4708 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4718 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader parent: Prism::node? + # + # source://prism//lib/prism/node.rb#4705 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4735 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4740 + def type; end + end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4765 +class Prism::ConstantPathWriteNode < ::Prism::Node + # Initialize a new ConstantPathWriteNode node. + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#4767 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, target, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4857 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4778 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4793 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4788 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#4798 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#4806 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4841 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4836 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # ::ABC = 123 + # ^ + # + # source://prism//lib/prism/node.rb#4823 + sig { returns(Prism::Location) } + def operator_loc; end + + # A node representing the constant path being written to. + # + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ + # + # source://prism//lib/prism/node.rb#4817 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4846 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO::BAR = :abc + # ^^^^ + # + # source://prism//lib/prism/node.rb#4833 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4851 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://prism//lib/prism/node.rb#4869 +class Prism::ConstantReadNode < ::Prism::Node + # Initialize a new ConstantReadNode node. + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://prism//lib/prism/node.rb#4871 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4936 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4880 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4885 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4895 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4890 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode + # + # source://prism//lib/prism/node.rb#4900 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4885 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#4908 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#139 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#134 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4920 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # X # name `:X` + # + # SOME_CONSTANT # name `:SOME_CONSTANT` + # + # source://prism//lib/prism/node.rb#4917 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4925 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#4930 + def type; end + end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#4946 +class Prism::ConstantTargetNode < ::Prism::Node + # Initialize a new ConstantTargetNode node. + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://prism//lib/prism/node.rb#4948 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5009 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4957 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4962 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4972 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4967 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode + # + # source://prism//lib/prism/node.rb#4977 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4962 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#4985 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#262 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#257 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4993 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4990 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4998 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5003 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#5019 +class Prism::ConstantWriteNode < ::Prism::Node + # Initialize a new ConstantWriteNode node. + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5021 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5123 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5033 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5038 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5048 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5043 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5053 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5038 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#5061 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#152 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#147 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5107 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # Foo = :bar # name `:Foo` + # + # XYZ = 1 # name `:XYZ` + # + # source://prism//lib/prism/node.rb#5070 + sig { returns(Symbol) } + def name; end + + # The location of the constant name. + # + # FOO = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#5076 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5102 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # FOO = :bar + # ^ + # + # source://prism//lib/prism/node.rb#5095 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5112 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO = :bar + # ^^^^ + # + # MyClass = Class.new + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#5089 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5117 + def type; end + end +end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.for("[1]") +# +# Prism::ArrayNode.new( +# source, +# 0, +# Prism::Location.new(source, 0, 3), +# 0, +# [ +# Prism::IntegerNode.new( +# source, +# 0, +# Prism::Location.new(source, 1, 1), +# Prism::IntegerBaseFlags::DECIMAL, +# 1 +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1) +# ) +# +# you could instead write: +# +# class Builder +# include Prism::DSL +# +# attr_reader :default_source +# +# def initialize +# @default_source = source("[1]") +# end +# +# def build +# array_node( +# location: location(start_offset: 0, length: 3), +# elements: [ +# integer_node( +# location: location(start_offset: 1, length: 1), +# flags: integer_base_flag(:decimal), +# value: 1 +# ) +# ], +# opening_loc: location(start_offset: 0, length: 1), +# closing_loc: location(start_offset: 2, length: 1) +# ) +# end +# end +# +# This is mostly helpful in the context of generating trees programmatically. +# +# source://prism//lib/prism/dsl.rb#61 +module Prism::DSL + extend ::Prism::DSL + + # Create a new AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dsl.rb#77 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def alias_global_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new AliasMethodNode node. + # + # source://prism//lib/prism/dsl.rb#82 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def alias_method_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new AlternationPatternNode node. + # + # source://prism//lib/prism/dsl.rb#87 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def alternation_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new AndNode node. + # + # source://prism//lib/prism/dsl.rb#92 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end + def and_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new ArgumentsNode node. + # + # source://prism//lib/prism/dsl.rb#97 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).returns(Prism::ArgumentsNode) + end + def arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # Retrieve the value of one of the ArgumentsNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#832 + sig { params(name: Symbol).returns(Integer) } + def arguments_node_flag(name); end + + # Create a new ArrayNode node. + # + # source://prism//lib/prism/dsl.rb#102 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayNode) + end + def array_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the ArrayNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#844 + sig { params(name: Symbol).returns(Integer) } + def array_node_flag(name); end + + # Create a new ArrayPatternNode node. + # + # source://prism//lib/prism/dsl.rb#107 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end + def array_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new AssocNode node. + # + # source://prism//lib/prism/dsl.rb#112 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end + def assoc_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new AssocSplatNode node. + # + # source://prism//lib/prism/dsl.rb#117 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def assoc_splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node. + # + # source://prism//lib/prism/dsl.rb#122 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def back_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new BeginNode node. + # + # source://prism//lib/prism/dsl.rb#127 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end + def begin_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new BlockArgumentNode node. + # + # source://prism//lib/prism/dsl.rb#132 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def block_argument_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node. + # + # source://prism//lib/prism/dsl.rb#137 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def block_local_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new BlockNode node. + # + # source://prism//lib/prism/dsl.rb#142 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end + def block_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new BlockParameterNode node. + # + # source://prism//lib/prism/dsl.rb#147 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def block_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new BlockParametersNode node. + # + # source://prism//lib/prism/dsl.rb#152 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end + def block_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new BreakNode node. + # + # source://prism//lib/prism/dsl.rb#157 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + def break_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new CallAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#162 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallAndWriteNode) + end + def call_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallNode node. + # + # source://prism//lib/prism/dsl.rb#167 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::CallNode) + end + def call_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # Retrieve the value of one of the CallNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#852 + sig { params(name: Symbol).returns(Integer) } + def call_node_flag(name); end + + # Create a new CallOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#172 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOperatorWriteNode) + end + def call_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#177 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOrWriteNode) + end + def call_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallTargetNode node. + # + # source://prism//lib/prism/dsl.rb#182 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).returns(Prism::CallTargetNode) + end + def call_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end + + # Create a new CapturePatternNode node. + # + # source://prism//lib/prism/dsl.rb#187 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def capture_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new CaseMatchNode node. + # + # source://prism//lib/prism/dsl.rb#192 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def case_match_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new CaseNode node. + # + # source://prism//lib/prism/dsl.rb#197 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + def case_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new ClassNode node. + # + # source://prism//lib/prism/dsl.rb#202 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + def class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#207 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end + def class_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#212 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def class_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#217 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end + def class_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#222 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def class_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#227 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def class_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#232 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def class_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#237 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end + def constant_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#242 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end + def constant_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#247 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end + def constant_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#252 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + def constant_path_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantPathNode node. + # + # source://prism//lib/prism/dsl.rb#257 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def constant_path_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#262 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def constant_path_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#267 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + def constant_path_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node. + # + # source://prism//lib/prism/dsl.rb#272 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def constant_path_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node. + # + # source://prism//lib/prism/dsl.rb#277 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + def constant_path_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantReadNode node. + # + # source://prism//lib/prism/dsl.rb#282 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def constant_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ConstantTargetNode node. + # + # source://prism//lib/prism/dsl.rb#287 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def constant_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ConstantWriteNode node. + # + # source://prism//lib/prism/dsl.rb#292 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def constant_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new DefNode node. + # + # source://prism//lib/prism/dsl.rb#297 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end + def def_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new DefinedNode node. + # + # source://prism//lib/prism/dsl.rb#302 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end + def defined_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new ElseNode node. + # + # source://prism//lib/prism/dsl.rb#307 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end + def else_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dsl.rb#312 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def embedded_statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node. + # + # source://prism//lib/prism/dsl.rb#317 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + def embedded_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end + + # Retrieve the value of one of the EncodingFlags flags. + # + # source://prism//lib/prism/dsl.rb#863 + sig { params(name: Symbol).returns(Integer) } + def encoding_flag(name); end + + # Create a new EnsureNode node. + # + # source://prism//lib/prism/dsl.rb#322 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end + def ensure_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new FalseNode node. + # + # source://prism//lib/prism/dsl.rb#327 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::FalseNode) + end + def false_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new FindPatternNode node. + # + # source://prism//lib/prism/dsl.rb#332 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + def find_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new FlipFlopNode node. + # + # source://prism//lib/prism/dsl.rb#337 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def flip_flop_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new FloatNode node. + # + # source://prism//lib/prism/dsl.rb#342 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Float + ).returns(Prism::FloatNode) + end + def float_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ForNode node. + # + # source://prism//lib/prism/dsl.rb#347 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end + def for_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dsl.rb#352 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingArgumentsNode) + end + def forwarding_arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node. + # + # source://prism//lib/prism/dsl.rb#357 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingParameterNode) + end + def forwarding_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node. + # + # source://prism//lib/prism/dsl.rb#362 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def forwarding_super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#367 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end + def global_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#372 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def global_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#377 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end + def global_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#382 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def global_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#387 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def global_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#392 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def global_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new HashNode node. + # + # source://prism//lib/prism/dsl.rb#397 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end + def hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new HashPatternNode node. + # + # source://prism//lib/prism/dsl.rb#402 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end + def hash_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new IfNode node. + # + # source://prism//lib/prism/dsl.rb#407 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end + def if_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new ImaginaryNode node. + # + # source://prism//lib/prism/dsl.rb#412 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + def imaginary_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end + + # Create a new ImplicitNode node. + # + # source://prism//lib/prism/dsl.rb#417 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def implicit_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ImplicitRestNode node. + # + # source://prism//lib/prism/dsl.rb#422 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ImplicitRestNode) + end + def implicit_rest_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new InNode node. + # + # source://prism//lib/prism/dsl.rb#427 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end + def in_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end + + # Create a new IndexAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#432 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexAndWriteNode) + end + def index_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#437 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOperatorWriteNode) + end + def index_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new IndexOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#442 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOrWriteNode) + end + def index_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new IndexTargetNode node. + # + # source://prism//lib/prism/dsl.rb#447 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).returns(Prism::IndexTargetNode) + end + def index_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#452 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end + def instance_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#457 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def instance_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#462 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end + def instance_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#467 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def instance_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#472 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def instance_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#477 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def instance_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the IntegerBaseFlags flags. + # + # source://prism//lib/prism/dsl.rb#872 + sig { params(name: Symbol).returns(Integer) } + def integer_base_flag(name); end + + # Create a new IntegerNode node. + # + # source://prism//lib/prism/dsl.rb#482 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def integer_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dsl.rb#487 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def interpolated_match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dsl.rb#492 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def interpolated_regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node. + # + # source://prism//lib/prism/dsl.rb#497 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedStringNode) + end + def interpolated_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the InterpolatedStringNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#883 + sig { params(name: Symbol).returns(Integer) } + def interpolated_string_node_flag(name); end + + # Create a new InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dsl.rb#502 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end + def interpolated_symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node. + # + # source://prism//lib/prism/dsl.rb#507 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def interpolated_x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new ItLocalVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#512 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItLocalVariableReadNode) + end + def it_local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ItParametersNode node. + # + # source://prism//lib/prism/dsl.rb#517 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItParametersNode) + end + def it_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new KeywordHashNode node. + # + # source://prism//lib/prism/dsl.rb#522 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).returns(Prism::KeywordHashNode) + end + def keyword_hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end + + # Retrieve the value of one of the KeywordHashNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#892 + sig { params(name: Symbol).returns(Integer) } + def keyword_hash_node_flag(name); end + + # Create a new KeywordRestParameterNode node. + # + # source://prism//lib/prism/dsl.rb#527 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def keyword_rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new LambdaNode node. + # + # source://prism//lib/prism/dsl.rb#532 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + def lambda_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#537 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end + def local_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#542 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def local_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#547 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end + def local_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#552 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#557 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def local_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#562 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def local_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new Location object. + # + # source://prism//lib/prism/dsl.rb#72 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def location(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + + # Retrieve the value of one of the LoopFlags flags. + # + # source://prism//lib/prism/dsl.rb#900 + sig { params(name: Symbol).returns(Integer) } + def loop_flag(name); end + + # Create a new MatchLastLineNode node. + # + # source://prism//lib/prism/dsl.rb#567 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::MatchLastLineNode) + end + def match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new MatchPredicateNode node. + # + # source://prism//lib/prism/dsl.rb#572 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def match_predicate_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new MatchRequiredNode node. + # + # source://prism//lib/prism/dsl.rb#577 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def match_required_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new MatchWriteNode node. + # + # source://prism//lib/prism/dsl.rb#582 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + def match_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end + + # Create a new MissingNode node. + # + # source://prism//lib/prism/dsl.rb#587 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::MissingNode) + end + def missing_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ModuleNode node. + # + # source://prism//lib/prism/dsl.rb#592 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + def module_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new MultiTargetNode node. + # + # source://prism//lib/prism/dsl.rb#597 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + def multi_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # Create a new MultiWriteNode node. + # + # source://prism//lib/prism/dsl.rb#602 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + def multi_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new NextNode node. + # + # source://prism//lib/prism/dsl.rb#607 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + def next_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new NilNode node. + # + # source://prism//lib/prism/dsl.rb#612 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::NilNode) + end + def nil_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dsl.rb#617 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def no_keywords_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new NumberedParametersNode node. + # + # source://prism//lib/prism/dsl.rb#622 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def numbered_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dsl.rb#627 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def numbered_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end + + # Create a new OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dsl.rb#632 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalKeywordParameterNode) + end + def optional_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new OptionalParameterNode node. + # + # source://prism//lib/prism/dsl.rb#637 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalParameterNode) + end + def optional_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new OrNode node. + # + # source://prism//lib/prism/dsl.rb#642 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end + def or_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Retrieve the value of one of the ParameterFlags flags. + # + # source://prism//lib/prism/dsl.rb#908 + sig { params(name: Symbol).returns(Integer) } + def parameter_flag(name); end + + # Create a new ParametersNode node. + # + # source://prism//lib/prism/dsl.rb#647 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end + def parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + # Create a new ParenthesesNode node. + # + # source://prism//lib/prism/dsl.rb#652 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def parentheses_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node. + # + # source://prism//lib/prism/dsl.rb#657 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def pinned_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # Create a new PinnedVariableNode node. + # + # source://prism//lib/prism/dsl.rb#662 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def pinned_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new PostExecutionNode node. + # + # source://prism//lib/prism/dsl.rb#667 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def post_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new PreExecutionNode node. + # + # source://prism//lib/prism/dsl.rb#672 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def pre_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new ProgramNode node. + # + # source://prism//lib/prism/dsl.rb#677 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + def program_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end + + # Retrieve the value of one of the RangeFlags flags. + # + # source://prism//lib/prism/dsl.rb#916 + sig { params(name: Symbol).returns(Integer) } + def range_flag(name); end + + # Create a new RangeNode node. + # + # source://prism//lib/prism/dsl.rb#682 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::RangeNode) + end + def range_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new RationalNode node. + # + # source://prism//lib/prism/dsl.rb#687 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).returns(Prism::RationalNode) + end + def rational_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end + + # Create a new RedoNode node. + # + # source://prism//lib/prism/dsl.rb#692 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RedoNode) + end + def redo_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Retrieve the value of one of the RegularExpressionFlags flags. + # + # source://prism//lib/prism/dsl.rb#924 + sig { params(name: Symbol).returns(Integer) } + def regular_expression_flag(name); end + + # Create a new RegularExpressionNode node. + # + # source://prism//lib/prism/dsl.rb#697 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::RegularExpressionNode) + end + def regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dsl.rb#702 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def required_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # Create a new RequiredParameterNode node. + # + # source://prism//lib/prism/dsl.rb#707 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def required_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new RescueModifierNode node. + # + # source://prism//lib/prism/dsl.rb#712 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + def rescue_modifier_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end + + # Create a new RescueNode node. + # + # source://prism//lib/prism/dsl.rb#717 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + def rescue_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end + + # Create a new RestParameterNode node. + # + # source://prism//lib/prism/dsl.rb#722 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::RestParameterNode) + end + def rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new RetryNode node. + # + # source://prism//lib/prism/dsl.rb#727 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RetryNode) + end + def retry_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ReturnNode node. + # + # source://prism//lib/prism/dsl.rb#732 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + def return_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # Create a new SelfNode node. + # + # source://prism//lib/prism/dsl.rb#737 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SelfNode) + end + def self_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new ShareableConstantNode node. + # + # source://prism//lib/prism/dsl.rb#742 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).returns(Prism::ShareableConstantNode) + end + def shareable_constant_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end + + # Retrieve the value of one of the ShareableConstantNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#942 + sig { params(name: Symbol).returns(Integer) } + def shareable_constant_node_flag(name); end + + # Create a new SingletonClassNode node. + # + # source://prism//lib/prism/dsl.rb#747 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def singleton_class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new Source object. + # + # source://prism//lib/prism/dsl.rb#67 + sig { params(string: String).returns(Prism::Source) } + def source(string); end + + # Create a new SourceEncodingNode node. + # + # source://prism//lib/prism/dsl.rb#752 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceEncodingNode) + end + def source_encoding_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new SourceFileNode node. + # + # source://prism//lib/prism/dsl.rb#757 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def source_file_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end + + # Create a new SourceLineNode node. + # + # source://prism//lib/prism/dsl.rb#762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceLineNode) + end + def source_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new SplatNode node. + # + # source://prism//lib/prism/dsl.rb#767 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end + def splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end + + # Create a new StatementsNode node. + # + # source://prism//lib/prism/dsl.rb#772 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end + + # Retrieve the value of one of the StringFlags flags. + # + # source://prism//lib/prism/dsl.rb#952 + sig { params(name: Symbol).returns(Integer) } + def string_flag(name); end + + # Create a new StringNode node. + # + # source://prism//lib/prism/dsl.rb#777 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::StringNode) + end + def string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new SuperNode node. + # + # source://prism//lib/prism/dsl.rb#782 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + def super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # Retrieve the value of one of the SymbolFlags flags. + # + # source://prism//lib/prism/dsl.rb#963 + sig { params(name: Symbol).returns(Integer) } + def symbol_flag(name); end + + # Create a new SymbolNode node. + # + # source://prism//lib/prism/dsl.rb#787 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::SymbolNode) + end + def symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new TrueNode node. + # + # source://prism//lib/prism/dsl.rb#792 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::TrueNode) + end + def true_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # Create a new UndefNode node. + # + # source://prism//lib/prism/dsl.rb#797 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def undef_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new UnlessNode node. + # + # source://prism//lib/prism/dsl.rb#802 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end + def unless_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new UntilNode node. + # + # source://prism//lib/prism/dsl.rb#807 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::UntilNode) + end + def until_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + + # Create a new WhenNode node. + # + # source://prism//lib/prism/dsl.rb#812 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end + def when_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end + + # Create a new WhileNode node. + # + # source://prism//lib/prism/dsl.rb#817 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhileNode) + end + def while_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + + # Create a new XStringNode node. + # + # source://prism//lib/prism/dsl.rb#822 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::XStringNode) + end + def x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # Create a new YieldNode node. + # + # source://prism//lib/prism/dsl.rb#827 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end + def yield_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + private + + # The default location object that gets attached to nodes if no location is + # specified, which uses the given source. + # + # source://prism//lib/prism/dsl.rb#982 + sig { returns(Prism::Location) } + def default_location; end + + # The default node that gets attached to nodes if no node is specified for a + # required node field. + # + # source://prism//lib/prism/dsl.rb#988 + sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } + def default_node(source, location); end + + # The default source object that gets attached to nodes and locations if no + # source is specified. + # + # source://prism//lib/prism/dsl.rb#976 + sig { returns(Prism::Source) } + def default_source; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5137 +class Prism::DefNode < ::Prism::Node + # Initialize a new DefNode node. + # + # @return [DefNode] a new instance of DefNode + # + # source://prism//lib/prism/node.rb#5139 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5336 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5159 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#5212 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5164 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5178 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5169 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode + # + # source://prism//lib/prism/node.rb#5183 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5164 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#5191 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5290 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5218 + sig { returns(Prism::Location) } + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5315 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5277 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#5310 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # source://prism//lib/prism/node.rb#5264 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5320 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#5215 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#5300 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5238 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5196 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5199 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#5295 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#5225 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#5209 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#5206 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#5305 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5251 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5325 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5330 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5358 +class Prism::DefinedNode < ::Prism::Node + # Initialize a new DefinedNode node. + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://prism//lib/prism/node.rb#5360 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5472 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5372 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5377 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5387 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5382 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode + # + # source://prism//lib/prism/node.rb#5392 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5377 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#5400 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5456 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#5451 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5434 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#5441 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5405 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#5446 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5421 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5461 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5418 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5466 + def type; end + end +end + +# source://prism//lib/prism/desugar_compiler.rb#4 +class Prism::DesugarAndWriteNode + include ::Prism::DSL + + # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#9 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def arguments; end + + # Desugar `x &&= y` to `x && x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#18 + def compile; end + + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def default_source; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def read_class; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def write_class; end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# source://prism//lib/prism/desugar_compiler.rb#255 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#261 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#279 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#270 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#288 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#306 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#297 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#315 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#333 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#324 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#342 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#360 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#351 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#369 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#387 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#378 + def visit_local_variable_or_write_node(node); end +end + +# source://prism//lib/prism/desugar_compiler.rb#86 +class Prism::DesugarOperatorWriteNode + include ::Prism::DSL + + # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#91 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#89 + def arguments; end + + # Desugar `x += y` to `x = x + y` + # + # source://prism//lib/prism/desugar_compiler.rb#100 + def compile; end + + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#89 + def default_source; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#89 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#89 + def read_class; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#89 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#35 +class Prism::DesugarOrWriteDefinedNode + include ::Prism::DSL + + # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode + # + # source://prism//lib/prism/desugar_compiler.rb#40 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#38 + def arguments; end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#49 + def compile; end + + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#38 + def default_source; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#38 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#38 + def read_class; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#38 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#130 +class Prism::DesugarOrWriteNode + include ::Prism::DSL + + # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#135 + def initialize(node, default_source, read_class, write_class, **arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#133 + def arguments; end + + # Desugar `x ||= y` to `x || x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#144 + def compile; end + + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#133 + def default_source; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#133 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#133 + def read_class; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#133 + def write_class; end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# listener = OctalListener.new +# dispatcher = Prism::Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# source://prism//lib/prism/dispatcher.rb#42 +class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # + # @return [Dispatcher] a new instance of Dispatcher + # + # source://prism//lib/prism/dispatcher.rb#47 + def initialize; end + + # Walks `root` dispatching events to all registered listeners. + # + # def dispatch: (Node) -> void + # + # source://prism//lib/prism/visitor.rb#17 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners. + # + # def dispatch_once: (Node) -> void + # + # source://prism//lib/prism/dispatcher.rb#66 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # source://prism//lib/prism/dispatcher.rb#44 + def listeners; end + + # Register a listener for one or more events. + # + # def register: (Listener, *Symbol) -> void + # + # source://prism//lib/prism/dispatcher.rb#54 + def register(listener, *events); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#72 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#80 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#88 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#96 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#104 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#112 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#120 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#128 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#136 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#144 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#152 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#160 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#168 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#176 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#184 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#192 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#200 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#208 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#216 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#224 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#232 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#240 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#248 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#256 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#264 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#272 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#280 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#288 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#296 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#304 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#312 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#320 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#328 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#336 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#344 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#352 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#360 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#368 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#376 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#384 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#392 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#400 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#408 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#416 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#424 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#432 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#440 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#448 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#456 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#464 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#472 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#480 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#488 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#496 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#504 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#512 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#520 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#528 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#536 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#544 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#552 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#560 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#568 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#576 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#584 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#592 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#600 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#608 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#616 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#624 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#632 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#640 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#648 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#656 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#664 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#672 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#680 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#688 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#696 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#704 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#712 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#720 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#728 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#736 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#744 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#752 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#760 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#768 + def visit_it_local_variable_read_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#776 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#784 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#792 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#800 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#808 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#816 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#824 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#832 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#840 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#848 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#856 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#864 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#872 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#880 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#888 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#896 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#904 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#912 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#920 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#928 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#936 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#944 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#952 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#960 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#968 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#976 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#984 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#992 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1000 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1008 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1016 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1024 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1032 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1040 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1048 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1056 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1064 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1072 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1080 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1088 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1096 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1104 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1112 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1120 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1128 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1136 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1144 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1152 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1160 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1168 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1176 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1184 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1192 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1200 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1208 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1216 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1224 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1232 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1240 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1248 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1256 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1264 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1272 + def visit_yield_node(node); end +end + +# source://prism//lib/prism/dispatcher.rb#1278 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://prism//lib/prism/dispatcher.rb#1281 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://prism//lib/prism/dispatcher.rb#1279 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1286 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1292 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1298 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1304 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1310 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1316 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1322 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1328 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1334 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1340 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1346 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1352 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1358 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1364 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1370 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1376 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1382 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1388 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1394 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1400 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1406 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1412 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1418 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1424 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1430 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1436 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1442 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1448 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1454 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1460 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1466 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1472 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1478 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1484 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1490 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1496 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1502 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1508 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1514 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1520 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1526 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1532 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1538 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1544 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1550 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1556 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1562 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1568 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1574 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1580 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1586 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1592 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1598 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1604 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1610 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1616 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1622 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1628 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1634 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1640 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1646 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1652 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1658 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1664 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1670 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1676 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1682 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1688 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1694 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1700 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1706 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1712 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1718 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1724 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1730 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1736 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1742 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1748 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1754 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1760 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1766 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1772 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1778 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1784 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1790 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1796 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1802 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItLocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1808 + def visit_it_local_variable_read_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1814 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1820 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1826 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1832 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1838 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1844 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1850 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1856 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1862 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1868 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1874 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1880 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1886 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1892 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1898 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1904 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1910 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1916 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1922 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1928 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1934 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1940 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1946 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1952 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1958 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1964 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1970 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1976 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1982 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1988 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1994 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2000 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2006 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2012 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2018 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2024 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2030 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2036 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2042 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2048 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2054 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2060 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2066 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2072 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2078 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2084 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2090 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2096 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2102 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2108 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2114 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2120 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2126 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2132 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2138 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2144 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2150 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2156 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2162 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2168 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2174 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2180 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2186 + def visit_yield_node(node); end +end + +# This visitor provides the ability to call Node#to_dot, which converts a +# subtree into a graphviz dot graph. +# +# source://prism//lib/prism/dot_visitor.rb#14 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. + # + # @return [DotVisitor] a new instance of DotVisitor + # + # source://prism//lib/prism/dot_visitor.rb#106 + def initialize; end + + # The digraph that is being built. + # + # source://prism//lib/prism/dot_visitor.rb#103 + def digraph; end + + # Convert this visitor into a graphviz dot graph string. + # + # source://prism//lib/prism/dot_visitor.rb#111 + def to_dot; end + + # Visit a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#116 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node. + # + # source://prism//lib/prism/dot_visitor.rb#141 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#166 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node. + # + # source://prism//lib/prism/dot_visitor.rb#191 + def visit_and_node(node); end + + # Visit a ArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#216 + def visit_arguments_node(node); end + + # Visit a ArrayNode node. + # + # source://prism//lib/prism/dot_visitor.rb#246 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#286 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node. + # + # source://prism//lib/prism/dot_visitor.rb#348 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#375 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#398 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # + # source://prism//lib/prism/dot_visitor.rb#415 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node. + # + # source://prism//lib/prism/dot_visitor.rb#463 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#486 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. + # + # source://prism//lib/prism/dot_visitor.rb#506 + def visit_block_node(node); end + + # Visit a BlockParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#541 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#569 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node. + # + # source://prism//lib/prism/dot_visitor.rb#612 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#635 + def visit_call_and_write_node(node); end + + # Visit a CallNode node. + # + # source://prism//lib/prism/dot_visitor.rb#681 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#739 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#788 + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#834 + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#864 + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node. + # + # source://prism//lib/prism/dot_visitor.rb#889 + def visit_case_match_node(node); end + + # Visit a CaseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#934 + def visit_case_node(node); end + + # Visit a ClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#979 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1026 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1053 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1083 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1110 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1127 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1144 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1171 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1198 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1228 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1255 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1280 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1309 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1337 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1362 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1391 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1416 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1433 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1450 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1477 + def visit_def_node(node); end + + # Visit a DefinedNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1546 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1577 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1605 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1631 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1652 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1678 + def visit_false_node(node); end + + # Visit a FindPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1692 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1743 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1775 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1792 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1834 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1848 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1862 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1882 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1909 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1939 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1966 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1983 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2000 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2027 + def visit_hash_node(node); end + + # Visit a HashPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2060 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2109 + def visit_if_node(node); end + + # Visit a ImaginaryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2154 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2172 + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2190 + def visit_implicit_rest_node(node); end + + # Visit a InNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2204 + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2236 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2289 + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2345 + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2398 + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2437 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2464 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2494 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2521 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2538 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2555 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2582 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2602 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2638 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2674 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2714 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2751 + def visit_interpolated_x_string_node(node); end + + # Visit a ItLocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2784 + def visit_it_local_variable_read_node(node); end + + # Visit a ItParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2798 + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2812 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2842 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2870 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2908 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2938 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2971 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3001 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3021 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3041 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3071 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3100 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3125 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3150 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3181 + def visit_missing_node(node); end + + # Visit a ModuleNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3195 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3231 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3287 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3350 + def visit_next_node(node); end + + # Visit a NilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3373 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3387 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3407 + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3424 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3441 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3468 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3498 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3523 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3607 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3633 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3660 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3681 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3710 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3739 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3760 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3792 + def visit_rational_node(node); end + + # Visit a RedoNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3815 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3829 + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3858 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3881 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3901 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3926 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3979 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4007 + def visit_retry_node(node); end + + # Visit a ReturnNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4021 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4044 + def visit_self_node(node); end + + # Visit a ShareableConstantNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4058 + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4079 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4115 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4129 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4149 + def visit_source_line_node(node); end + + # Visit a SplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4163 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4186 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4213 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4246 + def visit_super_node(node); end + + # Visit a SymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4285 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4320 + def visit_true_node(node); end + + # Visit a UndefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4334 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4364 + def visit_unless_node(node); end + + # Visit a UntilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4407 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4442 + def visit_when_node(node); end + + # Visit a WhileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4483 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4518 + def visit_x_string_node(node); end + + # Visit a YieldNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4547 + def visit_yield_node(node); end + + private + + # Inspect a node that has arguments_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4593 + def arguments_node_flags_inspect(node); end + + # Inspect a node that has array_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4605 + def array_node_flags_inspect(node); end + + # Inspect a node that has call_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4613 + def call_node_flags_inspect(node); end + + # Inspect a node that has encoding_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4624 + def encoding_flags_inspect(node); end + + # Inspect a node that has integer_base_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4633 + def integer_base_flags_inspect(node); end + + # Inspect a node that has interpolated_string_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4644 + def interpolated_string_node_flags_inspect(node); end + + # Inspect a node that has keyword_hash_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4653 + def keyword_hash_node_flags_inspect(node); end + + # Inspect a location to display the start and end line and column numbers. + # + # source://prism//lib/prism/dot_visitor.rb#4587 + def location_inspect(location); end + + # Inspect a node that has loop_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4661 + def loop_flags_inspect(node); end + + # Generate a unique node ID for a node throughout the digraph. + # + # source://prism//lib/prism/dot_visitor.rb#4582 + def node_id(node); end + + # Inspect a node that has parameter_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4669 + def parameter_flags_inspect(node); end + + # Inspect a node that has range_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4677 + def range_flags_inspect(node); end + + # Inspect a node that has regular_expression_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4685 + def regular_expression_flags_inspect(node); end + + # Inspect a node that has shareable_constant_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4703 + def shareable_constant_node_flags_inspect(node); end + + # Inspect a node that has string_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4713 + def string_flags_inspect(node); end + + # Inspect a node that has symbol_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4724 + def symbol_flags_inspect(node); end +end + +# source://prism//lib/prism/dot_visitor.rb#59 +class Prism::DotVisitor::Digraph + # @return [Digraph] a new instance of Digraph + # + # source://prism//lib/prism/dot_visitor.rb#62 + def initialize; end + + # source://prism//lib/prism/dot_visitor.rb#76 + def edge(value); end + + # Returns the value of attribute edges. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def edges; end + + # source://prism//lib/prism/dot_visitor.rb#68 + def node(value); end + + # Returns the value of attribute nodes. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def nodes; end + + # source://prism//lib/prism/dot_visitor.rb#80 + def to_dot; end + + # source://prism//lib/prism/dot_visitor.rb#72 + def waypoint(value); end + + # Returns the value of attribute waypoints. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def waypoints; end +end + +# source://prism//lib/prism/dot_visitor.rb#15 +class Prism::DotVisitor::Field + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/dot_visitor.rb#18 + def initialize(name, value, port); end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def name; end + + # Returns the value of attribute port. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def port; end + + # source://prism//lib/prism/dot_visitor.rb#24 + def to_dot; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def value; end +end + +# source://prism//lib/prism/dot_visitor.rb#33 +class Prism::DotVisitor::Table + # @return [Table] a new instance of Table + # + # source://prism//lib/prism/dot_visitor.rb#36 + def initialize(name); end + + # source://prism//lib/prism/dot_visitor.rb#41 + def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end + + # Returns the value of attribute fields. + # + # source://prism//lib/prism/dot_visitor.rb#34 + def fields; end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#34 + def name; end + + # source://prism//lib/prism/dot_visitor.rb#45 + def to_dot; end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5485 +class Prism::ElseNode < ::Prism::Node + # Initialize a new ElseNode node. + # + # @return [ElseNode] a new instance of ElseNode + # + # source://prism//lib/prism/node.rb#5487 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5582 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5498 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5503 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5515 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5508 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode + # + # source://prism//lib/prism/node.rb#5520 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5503 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#5528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5556 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5533 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5561 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5543 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5566 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5540 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5571 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5576 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# source://prism//lib/prism/parse_result.rb#544 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#551 + sig { returns(String) } + def inspect; end + + # This can only be true for inline comments. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#546 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#5594 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # Initialize a new EmbeddedStatementsNode node. + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#5596 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5685 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5607 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5612 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#5664 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#5652 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5624 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5617 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#5629 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5612 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#5637 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5669 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#5659 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#5642 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5649 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5674 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5679 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#5697 +class Prism::EmbeddedVariableNode < ::Prism::Node + # Initialize a new EmbeddedVariableNode node. + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#5699 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).void + end + def initialize(source, node_id, location, flags, operator_loc, variable); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5773 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5709 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5724 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5719 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#5729 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } + # + # source://prism//lib/prism/node.rb#5737 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5757 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5752 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5742 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5762 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#5749 + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end + def variable; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5767 + def type; end + end +end + +# Flags for nodes that have unescaped content. +# +# source://prism//lib/prism/node.rb#16723 +module Prism::EncodingFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#16728 +Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#16725 +Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://prism//lib/prism/node.rb#5788 +class Prism::EnsureNode < ::Prism::Node + # Initialize a new EnsureNode node. + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://prism//lib/prism/node.rb#5790 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5879 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5801 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5818 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5811 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode + # + # source://prism//lib/prism/node.rb#5823 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#5831 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5858 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5846 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5853 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5836 + sig { returns(Prism::Location) } + def ensure_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5863 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5843 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5868 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5873 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://prism//lib/prism/node.rb#5891 +class Prism::FalseNode < ::Prism::Node + # Initialize a new FalseNode node. + # + # @return [FalseNode] a new instance of FalseNode + # + # source://prism//lib/prism/node.rb#5893 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5950 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5901 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5906 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5916 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5911 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode + # + # source://prism//lib/prism/node.rb#5921 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5906 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#5929 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5934 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5939 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5944 + def type; end + end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5965 +class Prism::FindPatternNode < ::Prism::Node + # Initialize a new FindPatternNode node. + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://prism//lib/prism/node.rb#5967 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6083 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5981 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5986 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#6062 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#6044 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6001 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5991 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # + # source://prism//lib/prism/node.rb#6019 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode + # + # source://prism//lib/prism/node.rb#6006 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5986 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#6014 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6067 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: SplatNode + # + # source://prism//lib/prism/node.rb#6022 + sig { returns(Prism::SplatNode) } + def left; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#6057 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#6031 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#6025 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader right: SplatNode | MissingNode + # + # source://prism//lib/prism/node.rb#6028 + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6072 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6077 + def type; end + end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6099 +class Prism::FlipFlopNode < ::Prism::Node + # Initialize a new FlipFlopNode node. + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://prism//lib/prism/node.rb#6101 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6187 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6112 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6117 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6130 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6122 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode + # + # source://prism//lib/prism/node.rb#6135 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6117 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#6143 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#6148 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6171 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node? + # + # source://prism//lib/prism/node.rb#6153 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6166 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6159 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node? + # + # source://prism//lib/prism/node.rb#6156 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6176 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6181 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#6200 +class Prism::FloatNode < ::Prism::Node + # Initialize a new FloatNode node. + # + # @return [FloatNode] a new instance of FloatNode + # + # source://prism//lib/prism/node.rb#6202 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6263 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6211 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6226 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6221 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode + # + # source://prism//lib/prism/node.rb#6231 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } + # + # source://prism//lib/prism/node.rb#6239 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6247 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6252 + sig { override.returns(Symbol) } + def type; end + + # The value of the floating point number as a Float. + # + # source://prism//lib/prism/node.rb#6244 + sig { returns(Float) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6257 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6273 +class Prism::ForNode < ::Prism::Node + # Initialize a new ForNode node. + # + # @return [ForNode] a new instance of ForNode + # + # source://prism//lib/prism/node.rb#6275 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6429 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6290 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # The collection to iterate over. + # + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#6336 + sig { returns(Prism::Node) } + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6309 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6300 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode + # + # source://prism//lib/prism/node.rb#6314 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#6322 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6403 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # The location of the `do` keyword, if present. + # + # for i in a do end + # ^^ + # + # source://prism//lib/prism/node.rb#6370 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6408 + sig { returns(String) } + def end_keyword; end + + # The location of the `end` keyword. + # + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#6386 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def for_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6393 + sig { returns(String) } + def for_keyword; end + + # The location of the `for` keyword. + # + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#6350 + sig { returns(Prism::Location) } + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6398 + sig { returns(String) } + def in_keyword; end + + # The location of the `in` keyword. + # + # for i in a end + # ^^ + # + # source://prism//lib/prism/node.rb#6360 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # The index expression for `for` loops. + # + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#6330 + sig do + returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) + end + def index; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6413 + sig { override.returns(String) } + def inspect; end + + # Represents the body of statements to execute for each iteration of the loop. + # + # for i in a + # foo(i) + # ^^^^^^ + # end + # + # source://prism//lib/prism/node.rb#6344 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6418 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6423 + def type; end + end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#6447 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # Initialize a new ForwardingArgumentsNode node. + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#6449 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6506 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6457 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6462 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6472 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6467 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#6477 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6462 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#6485 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6490 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6495 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6500 + def type; end + end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#6516 +class Prism::ForwardingParameterNode < ::Prism::Node + # Initialize a new ForwardingParameterNode node. + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6518 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6575 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6526 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6541 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6536 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6546 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#6554 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6559 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6564 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6569 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6584 +class Prism::ForwardingSuperNode < ::Prism::Node + # Initialize a new ForwardingSuperNode node. + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6586 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end + def initialize(source, node_id, location, flags, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6649 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6595 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://prism//lib/prism/node.rb#6630 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6600 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6605 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6617 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6600 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } + # + # source://prism//lib/prism/node.rb#6625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6633 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6638 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6643 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6659 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # Initialize a new GlobalVariableAndWriteNode node. + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6661 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6747 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6673 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6688 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6683 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6693 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#6701 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#200 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6731 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6706 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6709 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6726 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6716 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6736 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6723 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6741 + def type; end + end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6760 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # Initialize a new GlobalVariableOperatorWriteNode node. + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#6762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6847 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6775 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#6828 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#6818 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6780 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6790 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6785 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#6795 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6780 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#6803 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#212 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6831 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6808 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6811 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#403 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#410 + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6836 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6825 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6841 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6861 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # Initialize a new GlobalVariableOrWriteNode node. + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#6863 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6949 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6875 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6880 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6890 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6885 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#6895 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6880 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#6903 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#206 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6933 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6908 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6911 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6928 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6918 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6938 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6925 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6943 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#6962 +class Prism::GlobalVariableReadNode < ::Prism::Node + # Initialize a new GlobalVariableReadNode node. + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#6964 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7029 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6973 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6978 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6988 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6983 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#6993 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6978 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#7001 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7013 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo # name `:$foo` + # + # $_Test # name `:$_Test` + # + # source://prism//lib/prism/node.rb#7010 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7018 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7023 + def type; end + end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#7039 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # Initialize a new GlobalVariableTargetNode node. + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7041 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7102 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7050 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7055 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7065 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7060 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7070 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7055 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#7078 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7086 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7083 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7091 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7096 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7112 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # Initialize a new GlobalVariableWriteNode node. + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#7114 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7216 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7126 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7131 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7141 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7136 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#7146 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7131 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#7154 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7200 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo = :bar # name `:$foo` + # + # $_Test = 123 # name `:$_Test` + # + # source://prism//lib/prism/node.rb#7163 + sig { returns(Symbol) } + def name; end + + # The location of the global variable's name. + # + # $foo = :bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#7169 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7195 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # $foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#7188 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7205 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the global variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # $foo = :bar + # ^^^^ + # + # $-xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#7182 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7210 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7229 +class Prism::HashNode < ::Prism::Node + # Initialize a new HashNode node. + # + # @return [HashNode] a new instance of HashNode + # + # source://prism//lib/prism/node.rb#7231 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7330 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7242 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7247 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#7309 + sig { returns(String) } + def closing; end + + # The location of the closing brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#7297 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7257 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7252 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode + # + # source://prism//lib/prism/node.rb#7262 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7247 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#7270 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. + # + # { a: b } + # ^^^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/node.rb#7291 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7314 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#7304 + sig { returns(String) } + def opening; end + + # The location of the opening brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#7278 + sig { returns(Prism::Location) } + def opening_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7319 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7324 + def type; end + end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7346 +class Prism::HashPatternNode < ::Prism::Node + # Initialize a new HashPatternNode node. + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://prism//lib/prism/node.rb#7348 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7459 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7361 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#7438 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#7420 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7380 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7371 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # + # source://prism//lib/prism/node.rb#7398 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode + # + # source://prism//lib/prism/node.rb#7385 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#7393 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader elements: Array[AssocNode] + # + # source://prism//lib/prism/node.rb#7401 + sig { returns(T::Array[Prism::AssocNode]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7443 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#7433 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#7407 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#7404 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } + def rest; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7448 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7453 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#52 +module Prism::HeredocQuery + # Returns true if this node was represented as a heredoc in the source code. + # + # @return [Boolean] + # + # source://prism//lib/prism/node_ext.rb#54 + def heredoc?; end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# foo ? bar : baz +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7480 +class Prism::IfNode < ::Prism::Node + # Initialize a new IfNode node. + # + # @return [IfNode] a new instance of IfNode + # + # source://prism//lib/prism/node.rb#7482 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7658 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7496 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7501 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7515 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7506 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the subsequent if/elsif/else clause of the if node. This method is + # deprecated in favor of #subsequent. + # + # source://prism//lib/prism/node_ext.rb#485 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: ElseNode | IfNode | nil, ?end_keyword_loc: Location?) -> IfNode + # + # source://prism//lib/prism/node.rb#7520 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7501 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#7528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7637 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ + # + # source://prism//lib/prism/node.rb#7614 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7627 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ + # + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. + # + # source://prism//lib/prism/node.rb#7538 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7642 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#91 + def newline_flag!(lines); end + + # The node for the condition the `IfNode` is testing. + # + # if foo + # ^^^ + # bar + # end + # + # bar if foo + # ^^^ + # + # foo ? bar : baz + # ^^^ + # + # source://prism//lib/prism/node.rb#7562 + sig { returns(Prism::Node) } + def predicate; end + + # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. + # + # if foo + # bar + # ^^^ + # baz + # ^^^ + # end + # + # source://prism//lib/prism/node.rb#7591 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ + # + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#7606 + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } + def subsequent; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7632 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. + # + # if foo then bar end + # ^^^^ + # + # a ? b : c + # ^ + # + # source://prism//lib/prism/node.rb#7571 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7647 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7652 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#7673 +class Prism::ImaginaryNode < ::Prism::Node + # Initialize a new ImaginaryNode node. + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://prism//lib/prism/node.rb#7675 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).void + end + def initialize(source, node_id, location, flags, numeric); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7736 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7684 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7699 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7694 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode + # + # source://prism//lib/prism/node.rb#7704 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } + # + # source://prism//lib/prism/node.rb#7712 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7720 + sig { override.returns(String) } + def inspect; end + + # attr_reader numeric: FloatNode | IntegerNode | RationalNode + # + # source://prism//lib/prism/node.rb#7717 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } + def numeric; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7725 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://prism//lib/prism/node_ext.rb#107 + sig { returns(Complex) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7730 + def type; end + end +end + +# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# foo in { bar: } +# ^^^^ +# +# source://prism//lib/prism/node.rb#7752 +class Prism::ImplicitNode < ::Prism::Node + # Initialize a new ImplicitNode node. + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://prism//lib/prism/node.rb#7754 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).void + end + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7815 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7763 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7778 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7773 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode + # + # source://prism//lib/prism/node.rb#7783 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } + # + # source://prism//lib/prism/node.rb#7791 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7799 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7804 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7796 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7809 + def type; end + end +end + +# Represents using a trailing comma to indicate an implicit rest parameter. +# +# foo { |bar,| } +# ^ +# +# foo in [bar,] +# ^ +# +# for foo, in bar do end +# ^ +# +# foo, = bar +# ^ +# +# source://prism//lib/prism/node.rb#7834 +class Prism::ImplicitRestNode < ::Prism::Node + # Initialize a new ImplicitRestNode node. + # + # @return [ImplicitRestNode] a new instance of ImplicitRestNode + # + # source://prism//lib/prism/node.rb#7836 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7893 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7844 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7859 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7854 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode + # + # source://prism//lib/prism/node.rb#7864 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#7872 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7877 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7882 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7887 + def type; end + end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7902 +class Prism::InNode < ::Prism::Node + # Initialize a new InNode node. + # + # @return [InNode] a new instance of InNode + # + # source://prism//lib/prism/node.rb#7904 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8004 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7916 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7934 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7926 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode + # + # source://prism//lib/prism/node.rb#7939 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } + # + # source://prism//lib/prism/node.rb#7947 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def in: () -> String + # + # source://prism//lib/prism/node.rb#7978 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # source://prism//lib/prism/node.rb#7958 + sig { returns(Prism::Location) } + def in_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7988 + sig { override.returns(String) } + def inspect; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#7952 + sig { returns(Prism::Node) } + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7955 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#7983 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#7965 + sig { returns(T.nilable(Prism::Location)) } + def then_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7993 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7998 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8017 +class Prism::IndexAndWriteNode < ::Prism::Node + # Initialize a new IndexAndWriteNode node. + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#8019 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8175 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8035 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8116 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8083 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#8126 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8139 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8096 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8040 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8149 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8119 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8055 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8045 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#8060 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8040 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8068 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8088 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8159 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8144 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8109 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8154 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8129 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#8093 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8073 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8164 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8136 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8078 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8169 + def type; end + end +end + +# Represents the use of an assignment operator on a call to `[]`. +# +# foo.bar[baz] += value +# ^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8193 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # Initialize a new IndexOperatorWriteNode node. + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8195 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8350 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8212 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8293 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8260 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#8306 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#8309 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#8303 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8319 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8273 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8217 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8329 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8296 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8232 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8222 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8237 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8217 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8245 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8265 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8334 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8324 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8286 + sig { returns(Prism::Location) } + def opening_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#419 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#426 + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#8270 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8250 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8339 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8316 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8255 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8344 + def type; end + end +end + +# Represents the use of the `||=` operator on a call to `[]`. +# +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8369 +class Prism::IndexOrWriteNode < ::Prism::Node + # Initialize a new IndexOrWriteNode node. + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8371 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8527 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8387 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8468 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8435 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#8478 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8491 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8448 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8392 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8501 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8471 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8407 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8397 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8412 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8392 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8420 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8440 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8511 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8496 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8461 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8506 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8481 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#8445 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8425 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8516 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8488 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8430 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8521 + def type; end + end +end + +# Represents assigning to an index. +# +# foo[bar], = 1 +# ^^^^^^^^ +# +# begin +# rescue => foo[bar] +# ^^^^^^^^ +# end +# +# for foo[bar] in baz do end +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8553 +class Prism::IndexTargetNode < ::Prism::Node + # Initialize a new IndexTargetNode node. + # + # @return [IndexTargetNode] a new instance of IndexTargetNode + # + # source://prism//lib/prism/node.rb#8555 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).void + end + def initialize(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8674 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8568 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8635 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8615 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#8645 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8573 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8653 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8638 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8587 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8578 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode + # + # source://prism//lib/prism/node.rb#8592 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).returns(Prism::IndexTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8573 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? } + # + # source://prism//lib/prism/node.rb#8600 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8620 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8658 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8648 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8628 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#8625 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8605 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8663 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8610 + sig { returns(T::Boolean) } + def variable_call?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8668 + def type; end + end +end + +# InlineComment objects are the most common. They correspond to comments in +# the source file like this one that start with #. +# +# source://prism//lib/prism/parse_result.rb#529 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#537 + sig { returns(String) } + def inspect; end + + # Returns true if this comment happens on the same line as other code and + # false if the comment is by itself. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#532 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# This visitor is responsible for composing the strings that get returned by +# the various #inspect methods defined on each of the nodes. +# +# source://prism//lib/prism/inspect_visitor.rb#12 +class Prism::InspectVisitor < ::Prism::Visitor + # Initializes a new instance of the InspectVisitor. + # + # @return [InspectVisitor] a new instance of InspectVisitor + # + # source://prism//lib/prism/inspect_visitor.rb#35 + sig { params(indent: String).void } + def initialize(indent = T.unsafe(nil)); end + + # The list of commands that we need to execute in order to compose the + # final string. + # + # source://prism//lib/prism/inspect_visitor.rb#32 + def commands; end + + # Compose the final string. + # + # source://prism//lib/prism/inspect_visitor.rb#48 + sig { returns(String) } + def compose; end + + # The current prefix string. + # + # source://prism//lib/prism/inspect_visitor.rb#28 + def indent; end + + # Inspect a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#77 + def visit_alias_global_variable_node(node); end + + # Inspect a AliasMethodNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#89 + def visit_alias_method_node(node); end + + # Inspect a AlternationPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#101 + def visit_alternation_pattern_node(node); end + + # Inspect a AndNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#113 + def visit_and_node(node); end + + # Inspect a ArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#125 + def visit_arguments_node(node); end + + # Inspect a ArrayNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#141 + def visit_array_node(node); end + + # Inspect a ArrayPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#159 + def visit_array_pattern_node(node); end + + # Inspect a AssocNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#198 + def visit_assoc_node(node); end + + # Inspect a AssocSplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#210 + def visit_assoc_splat_node(node); end + + # Inspect a BackReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#224 + def visit_back_reference_read_node(node); end + + # Inspect a BeginNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#232 + def visit_begin_node(node); end + + # Inspect a BlockArgumentNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#265 + def visit_block_argument_node(node); end + + # Inspect a BlockLocalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#279 + def visit_block_local_variable_node(node); end + + # Inspect a BlockNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#287 + def visit_block_node(node); end + + # Inspect a BlockParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#309 + def visit_block_parameter_node(node); end + + # Inspect a BlockParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#323 + def visit_block_parameters_node(node); end + + # Inspect a BreakNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#347 + def visit_break_node(node); end + + # Inspect a CallAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#361 + def visit_call_and_write_node(node); end + + # Inspect a CallNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#381 + def visit_call_node(node); end + + # Inspect a CallOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#411 + def visit_call_operator_write_node(node); end + + # Inspect a CallOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#432 + def visit_call_or_write_node(node); end + + # Inspect a CallTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#452 + def visit_call_target_node(node); end + + # Inspect a CapturePatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#464 + def visit_capture_pattern_node(node); end + + # Inspect a CaseMatchNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#476 + def visit_case_match_node(node); end + + # Inspect a CaseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#506 + def visit_case_node(node); end + + # Inspect a ClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#536 + def visit_class_node(node); end + + # Inspect a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#562 + def visit_class_variable_and_write_node(node); end + + # Inspect a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#574 + def visit_class_variable_operator_write_node(node); end + + # Inspect a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#587 + def visit_class_variable_or_write_node(node); end + + # Inspect a ClassVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#599 + def visit_class_variable_read_node(node); end + + # Inspect a ClassVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#607 + def visit_class_variable_target_node(node); end + + # Inspect a ClassVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#615 + def visit_class_variable_write_node(node); end + + # Inspect a ConstantAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#627 + def visit_constant_and_write_node(node); end + + # Inspect a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#639 + def visit_constant_operator_write_node(node); end + + # Inspect a ConstantOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#652 + def visit_constant_or_write_node(node); end + + # Inspect a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#664 + def visit_constant_path_and_write_node(node); end + + # Inspect a ConstantPathNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#676 + def visit_constant_path_node(node); end + + # Inspect a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#696 + def visit_constant_path_operator_write_node(node); end + + # Inspect a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#709 + def visit_constant_path_or_write_node(node); end + + # Inspect a ConstantPathTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#721 + def visit_constant_path_target_node(node); end + + # Inspect a ConstantPathWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#741 + def visit_constant_path_write_node(node); end + + # Inspect a ConstantReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#753 + def visit_constant_read_node(node); end + + # Inspect a ConstantTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#761 + def visit_constant_target_node(node); end + + # Inspect a ConstantWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#769 + def visit_constant_write_node(node); end + + # Inspect a DefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#781 + def visit_def_node(node); end + + # Inspect a DefinedNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#815 + def visit_defined_node(node); end + + # Inspect a ElseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#827 + def visit_else_node(node); end + + # Inspect a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#842 + def visit_embedded_statements_node(node); end + + # Inspect a EmbeddedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#857 + def visit_embedded_variable_node(node); end + + # Inspect a EnsureNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#867 + def visit_ensure_node(node); end + + # Inspect a FalseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#882 + def visit_false_node(node); end + + # Inspect a FindPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#889 + def visit_find_pattern_node(node); end + + # Inspect a FlipFlopNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#917 + def visit_flip_flop_node(node); end + + # Inspect a FloatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#937 + def visit_float_node(node); end + + # Inspect a ForNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#945 + def visit_for_node(node); end + + # Inspect a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#966 + def visit_forwarding_arguments_node(node); end + + # Inspect a ForwardingParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#973 + def visit_forwarding_parameter_node(node); end + + # Inspect a ForwardingSuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#980 + def visit_forwarding_super_node(node); end + + # Inspect a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#993 + def visit_global_variable_and_write_node(node); end + + # Inspect a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1005 + def visit_global_variable_operator_write_node(node); end + + # Inspect a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1018 + def visit_global_variable_or_write_node(node); end + + # Inspect a GlobalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1030 + def visit_global_variable_read_node(node); end + + # Inspect a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1038 + def visit_global_variable_target_node(node); end + + # Inspect a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1046 + def visit_global_variable_write_node(node); end + + # Inspect a HashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1058 + def visit_hash_node(node); end + + # Inspect a HashPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1076 + def visit_hash_pattern_node(node); end + + # Inspect a IfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1106 + def visit_if_node(node); end + + # Inspect a ImaginaryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1130 + def visit_imaginary_node(node); end + + # Inspect a ImplicitNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1139 + def visit_implicit_node(node); end + + # Inspect a ImplicitRestNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1148 + def visit_implicit_rest_node(node); end + + # Inspect a InNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1155 + def visit_in_node(node); end + + # Inspect a IndexAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1172 + def visit_index_and_write_node(node); end + + # Inspect a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1203 + def visit_index_operator_write_node(node); end + + # Inspect a IndexOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1235 + def visit_index_or_write_node(node); end + + # Inspect a IndexTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1266 + def visit_index_target_node(node); end + + # Inspect a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1289 + def visit_instance_variable_and_write_node(node); end + + # Inspect a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1301 + def visit_instance_variable_operator_write_node(node); end + + # Inspect a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1314 + def visit_instance_variable_or_write_node(node); end + + # Inspect a InstanceVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1326 + def visit_instance_variable_read_node(node); end + + # Inspect a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1334 + def visit_instance_variable_target_node(node); end + + # Inspect a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1342 + def visit_instance_variable_write_node(node); end + + # Inspect a IntegerNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1354 + def visit_integer_node(node); end + + # Inspect a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1362 + def visit_interpolated_match_last_line_node(node); end + + # Inspect a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1380 + def visit_interpolated_regular_expression_node(node); end + + # Inspect a InterpolatedStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1398 + def visit_interpolated_string_node(node); end + + # Inspect a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1416 + def visit_interpolated_symbol_node(node); end + + # Inspect a InterpolatedXStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1434 + def visit_interpolated_x_string_node(node); end + + # Inspect a ItLocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1452 + def visit_it_local_variable_read_node(node); end + + # Inspect a ItParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1459 + def visit_it_parameters_node(node); end + + # Inspect a KeywordHashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1466 + def visit_keyword_hash_node(node); end + + # Inspect a KeywordRestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1482 + def visit_keyword_rest_parameter_node(node); end + + # Inspect a LambdaNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1496 + def visit_lambda_node(node); end + + # Inspect a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1519 + def visit_local_variable_and_write_node(node); end + + # Inspect a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1532 + def visit_local_variable_operator_write_node(node); end + + # Inspect a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1546 + def visit_local_variable_or_write_node(node); end + + # Inspect a LocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1559 + def visit_local_variable_read_node(node); end + + # Inspect a LocalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1568 + def visit_local_variable_target_node(node); end + + # Inspect a LocalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1577 + def visit_local_variable_write_node(node); end + + # Inspect a MatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1590 + def visit_match_last_line_node(node); end + + # Inspect a MatchPredicateNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1601 + def visit_match_predicate_node(node); end + + # Inspect a MatchRequiredNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1613 + def visit_match_required_node(node); end + + # Inspect a MatchWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1625 + def visit_match_write_node(node); end + + # Inspect a MissingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1643 + def visit_missing_node(node); end + + # Inspect a ModuleNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1650 + def visit_module_node(node); end + + # Inspect a MultiTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1669 + def visit_multi_target_node(node); end + + # Inspect a MultiWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1702 + def visit_multi_write_node(node); end + + # Inspect a NextNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1738 + def visit_next_node(node); end + + # Inspect a NilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1752 + def visit_nil_node(node); end + + # Inspect a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1759 + def visit_no_keywords_parameter_node(node); end + + # Inspect a NumberedParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1768 + def visit_numbered_parameters_node(node); end + + # Inspect a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1776 + def visit_numbered_reference_read_node(node); end + + # Inspect a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1784 + def visit_optional_keyword_parameter_node(node); end + + # Inspect a OptionalParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1795 + def visit_optional_parameter_node(node); end + + # Inspect a OrNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1807 + def visit_or_node(node); end + + # Inspect a ParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1819 + def visit_parameters_node(node); end + + # Inspect a ParenthesesNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1880 + def visit_parentheses_node(node); end + + # Inspect a PinnedExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1895 + def visit_pinned_expression_node(node); end + + # Inspect a PinnedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1907 + def visit_pinned_variable_node(node); end + + # Inspect a PostExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1917 + def visit_post_execution_node(node); end + + # Inspect a PreExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1933 + def visit_pre_execution_node(node); end + + # Inspect a ProgramNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1949 + def visit_program_node(node); end + + # Inspect a RangeNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1959 + def visit_range_node(node); end + + # Inspect a RationalNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1979 + def visit_rational_node(node); end + + # Inspect a RedoNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1988 + def visit_redo_node(node); end + + # Inspect a RegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1995 + def visit_regular_expression_node(node); end + + # Inspect a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2006 + def visit_required_keyword_parameter_node(node); end + + # Inspect a RequiredParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2015 + def visit_required_parameter_node(node); end + + # Inspect a RescueModifierNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2023 + def visit_rescue_modifier_node(node); end + + # Inspect a RescueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2035 + def visit_rescue_node(node); end + + # Inspect a RestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2071 + def visit_rest_parameter_node(node); end + + # Inspect a RetryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2085 + def visit_retry_node(node); end + + # Inspect a ReturnNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2092 + def visit_return_node(node); end + + # Inspect a SelfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2106 + def visit_self_node(node); end + + # Inspect a ShareableConstantNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2113 + def visit_shareable_constant_node(node); end + + # Inspect a SingletonClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2122 + def visit_singleton_class_node(node); end + + # Inspect a SourceEncodingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2141 + def visit_source_encoding_node(node); end + + # Inspect a SourceFileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2148 + def visit_source_file_node(node); end + + # Inspect a SourceLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2156 + def visit_source_line_node(node); end + + # Inspect a SplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2163 + def visit_splat_node(node); end + + # Inspect a StatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2177 + def visit_statements_node(node); end + + # Inspect a StringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2193 + def visit_string_node(node); end + + # Inspect a SuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2204 + def visit_super_node(node); end + + # Inspect a SymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2226 + def visit_symbol_node(node); end + + # Inspect a TrueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2237 + def visit_true_node(node); end + + # Inspect a UndefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2244 + def visit_undef_node(node); end + + # Inspect a UnlessNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2261 + def visit_unless_node(node); end + + # Inspect a UntilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2285 + def visit_until_node(node); end + + # Inspect a WhenNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2302 + def visit_when_node(node); end + + # Inspect a WhileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2326 + def visit_while_node(node); end + + # Inspect a XStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2343 + def visit_x_string_node(node); end + + # Inspect a YieldNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2354 + def visit_yield_node(node); end + + private + + # Compose a string representing the given inner location field. + # + # source://prism//lib/prism/inspect_visitor.rb#2378 + def inspect_location(location); end + + # Compose a header for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#2372 + def inspect_node(name, node); end + + class << self + # Compose an inspect string for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#41 + sig { params(node: Prism::Node).returns(String) } + def compose(node); end + end +end + +# Most of the time, we can simply pass down the indent to the next node. +# However, when we are inside a list we want some extra special formatting +# when we hit an element in that list. In this case, we have a special +# command that replaces the subsequent indent with the given value. +# +# source://prism//lib/prism/inspect_visitor.rb#17 +class Prism::InspectVisitor::Replace + # @return [Replace] a new instance of Replace + # + # source://prism//lib/prism/inspect_visitor.rb#20 + def initialize(value); end + + # source://prism//lib/prism/inspect_visitor.rb#18 + def value; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8689 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # Initialize a new InstanceVariableAndWriteNode node. + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8691 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8777 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8703 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8708 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8718 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8713 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8723 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8708 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8731 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#218 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8761 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8736 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8739 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8756 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8746 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8766 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8753 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8771 + def type; end + end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8790 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # Initialize a new InstanceVariableOperatorWriteNode node. + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8792 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8877 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8805 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#8858 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#8848 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8820 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8815 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8825 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#8833 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#230 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8861 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8838 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8841 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#435 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#442 + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8866 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8855 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8871 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8891 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # Initialize a new InstanceVariableOrWriteNode node. + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8893 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8979 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8905 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8910 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8920 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8915 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8925 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8910 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8933 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#224 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8963 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8938 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8941 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8958 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8948 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8968 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8955 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#8973 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#8992 +class Prism::InstanceVariableReadNode < ::Prism::Node + # Initialize a new InstanceVariableReadNode node. + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#8994 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9059 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9003 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9008 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9018 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9013 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#9023 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9008 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#9031 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9043 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x # name `:@x` + # + # @_test # name `:@_test` + # + # source://prism//lib/prism/node.rb#9040 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9048 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9053 + def type; end + end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#9069 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # Initialize a new InstanceVariableTargetNode node. + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#9071 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9132 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9080 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9085 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9095 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9090 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#9100 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9085 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#9108 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9116 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#9113 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9121 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9126 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9142 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # Initialize a new InstanceVariableWriteNode node. + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#9144 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9246 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9156 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9161 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9171 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9166 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#9176 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9161 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#9184 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9230 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x = :y # name `:@x` + # + # @_foo = "bar" # name `@_foo` + # + # source://prism//lib/prism/node.rb#9193 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @_x = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#9199 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9225 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @x = y + # ^ + # + # source://prism//lib/prism/node.rb#9218 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9235 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the instance variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @foo = :bar + # ^^^^ + # + # @_x = 1234 + # ^^^^ + # + # source://prism//lib/prism/node.rb#9212 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9240 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#16732 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://prism//lib/prism/node.rb#16734 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://prism//lib/prism/node.rb#16737 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://prism//lib/prism/node.rb#16743 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://prism//lib/prism/node.rb#16740 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#9259 +class Prism::IntegerNode < ::Prism::Node + # Initialize a new IntegerNode node. + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://prism//lib/prism/node.rb#9261 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).void + end + def initialize(source, node_id, location, flags, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9342 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9270 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9303 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9275 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9285 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9280 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode + # + # source://prism//lib/prism/node.rb#9290 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9308 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9275 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } + # + # source://prism//lib/prism/node.rb#9298 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9318 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9326 + sig { override.returns(String) } + def inspect; end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9313 + sig { returns(T::Boolean) } + def octal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9331 + sig { override.returns(Symbol) } + def type; end + + # The value of the integer literal as a number. + # + # source://prism//lib/prism/node.rb#9323 + sig { returns(Integer) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9336 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9353 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new InterpolatedMatchLastLineNode node. + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#9355 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9497 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9366 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9424 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9371 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9476 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9464 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9381 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9376 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#9386 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9371 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#9394 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9419 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9404 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9444 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9449 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9439 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9399 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9481 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9409 + sig { returns(T::Boolean) } + def multi_line?; end + + # source://prism//lib/prism/parse_result/newlines.rb#121 + def newline_flag!(lines); end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9414 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9471 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9454 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#9461 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9486 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9434 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9429 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9491 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9511 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new InterpolatedRegularExpressionNode node. + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#9513 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9655 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9524 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9582 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9529 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9634 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9622 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9539 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9534 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#9544 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9529 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#9552 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9577 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9562 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9602 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9607 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9597 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9557 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9639 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9567 + sig { returns(T::Boolean) } + def multi_line?; end + + # source://prism//lib/prism/parse_result/newlines.rb#128 + def newline_flag!(lines); end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9572 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9629 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9612 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#9619 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9644 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9592 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9587 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9649 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9669 +class Prism::InterpolatedStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new InterpolatedStringNode node. + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#9671 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9780 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9682 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9687 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9759 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#9741 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9697 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9692 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?) -> InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#9702 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedStringNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9687 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#9710 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9715 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9764 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9720 + sig { returns(T::Boolean) } + def mutable?; end + + # source://prism//lib/prism/parse_result/newlines.rb#135 + def newline_flag!(lines); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#9754 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#9725 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] + # + # source://prism//lib/prism/node.rb#9738 + sig do + returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) + end + def parts; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9769 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9774 + def type; end + end +end + +# Flags for interpolated string nodes that indicated mutability if they are also marked as literals. +# +# source://prism//lib/prism/node.rb#16747 +module Prism::InterpolatedStringNodeFlags; end + +# source://prism//lib/prism/node.rb#16749 +Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#16752 +Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9794 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # Initialize a new InterpolatedSymbolNode node. + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#9796 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9895 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9807 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9812 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9874 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#9856 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9822 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9817 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#9827 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9812 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#9835 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9879 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#142 + def newline_flag!(lines); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#9869 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#9840 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#9853 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9884 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9889 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9908 +class Prism::InterpolatedXStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new InterpolatedXStringNode node. + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#9910 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9997 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9921 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9926 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9976 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9964 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9936 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9931 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#9941 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9926 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#9949 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9981 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#149 + def newline_flag!(lines); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9971 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9954 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#9961 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9986 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#9991 + def type; end + end +end + +# Represents reading from the implicit `it` local variable. +# +# -> { it } +# ^^ +# +# source://prism//lib/prism/node.rb#10010 +class Prism::ItLocalVariableReadNode < ::Prism::Node + # Initialize a new ItLocalVariableReadNode node. + # + # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10012 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10069 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10020 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10035 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10030 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10040 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#10048 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10053 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10058 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10063 + def type; end + end +end + +# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. +# +# -> { it + it } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10078 +class Prism::ItParametersNode < ::Prism::Node + # Initialize a new ItParametersNode node. + # + # @return [ItParametersNode] a new instance of ItParametersNode + # + # source://prism//lib/prism/node.rb#10080 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10137 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10088 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10103 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10098 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode + # + # source://prism//lib/prism/node.rb#10108 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#10116 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10121 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10126 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10131 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#10146 +class Prism::KeywordHashNode < ::Prism::Node + # Initialize a new KeywordHashNode node. + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://prism//lib/prism/node.rb#10148 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).void + end + def initialize(source, node_id, location, flags, elements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10214 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10157 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10162 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10172 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10167 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode + # + # source://prism//lib/prism/node.rb#10177 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).returns(Prism::KeywordHashNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10162 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } + # + # source://prism//lib/prism/node.rb#10185 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader elements: Array[AssocNode | AssocSplatNode] + # + # source://prism//lib/prism/node.rb#10195 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10198 + sig { override.returns(String) } + def inspect; end + + # def symbol_keys?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10190 + sig { returns(T::Boolean) } + def symbol_keys?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10203 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10208 + def type; end + end +end + +# Flags for keyword hash nodes. +# +# source://prism//lib/prism/node.rb#16756 +module Prism::KeywordHashNodeFlags; end + +# a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments +# +# source://prism//lib/prism/node.rb#16758 +Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#10227 +class Prism::KeywordRestParameterNode < ::Prism::Node + # Initialize a new KeywordRestParameterNode node. + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#10229 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10322 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10240 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10245 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10255 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10250 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#10260 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10245 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#10268 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10306 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#10278 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#10281 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10301 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10294 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10273 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10311 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10316 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10335 +class Prism::LambdaNode < ::Prism::Node + # Initialize a new LambdaNode node. + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://prism//lib/prism/node.rb#10337 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).void + end + def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10448 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10351 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#10414 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10356 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10427 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10404 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10369 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10361 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode + # + # source://prism//lib/prism/node.rb#10374 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10356 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } + # + # source://prism//lib/prism/node.rb#10382 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10432 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#10387 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10422 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10397 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10417 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10390 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil + # + # source://prism//lib/prism/node.rb#10411 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } + def parameters; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10437 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10442 + def type; end + end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# source://prism//lib/prism/lex_compat.rb#12 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://prism//lib/prism/lex_compat.rb#619 + def initialize(source, **options); end + + # Returns the value of attribute options. + # + # source://prism//lib/prism/lex_compat.rb#617 + def options; end + + # source://prism//lib/prism/lex_compat.rb#624 + def result; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/lex_compat.rb#617 + def source; end +end + +# Ripper doesn't include the rest of the token in the event, so we need to +# trim it down to just the content on the first line when comparing. +# +# source://prism//lib/prism/lex_compat.rb#230 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#231 + def ==(other); end +end + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# source://prism//lib/prism/lex_compat.rb#291 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://prism//lib/prism/lex_compat.rb#603 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#315 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://prism//lib/prism/lex_compat.rb#318 + def initialize(split); end + + # source://prism//lib/prism/lex_compat.rb#323 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#316 + def split; end + + # source://prism//lib/prism/lex_compat.rb#327 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#316 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# source://prism//lib/prism/lex_compat.rb#374 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://prism//lib/prism/lex_compat.rb#379 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://prism//lib/prism/lex_compat.rb#390 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://prism//lib/prism/lex_compat.rb#377 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://prism//lib/prism/lex_compat.rb#377 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://prism//lib/prism/lex_compat.rb#377 + def embexpr_balance; end + + # source://prism//lib/prism/lex_compat.rb#427 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#377 + def tokens; end +end + +# source://prism//lib/prism/lex_compat.rb#375 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#296 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://prism//lib/prism/lex_compat.rb#299 + def initialize; end + + # source://prism//lib/prism/lex_compat.rb#303 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#307 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#297 + def tokens; end +end + +# Ident tokens for the most part are exactly the same, except sometimes we +# know an ident is a local when ripper doesn't (when they are introduced +# through named captures in regular expressions). In that case we don't +# compare the state. +# +# source://prism//lib/prism/lex_compat.rb#248 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#249 + def ==(other); end +end + +# Tokens where state should be ignored +# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://prism//lib/prism/lex_compat.rb#238 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#239 + def ==(other); end +end + +# Ignored newlines can occasionally have a LABEL state attached to them, so +# we compare the state differently here. +# +# source://prism//lib/prism/lex_compat.rb#259 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#260 + def ==(other); end +end + +# If we have an identifier that follows a method name like: +# +# def foo bar +# +# then Ripper will mark bar as END|LABEL if there is a local in a parent +# scope named bar because it hasn't pushed the local table yet. We do this +# more accurately, so we need to allow comparing against both END and +# END|LABEL. +# +# source://prism//lib/prism/lex_compat.rb#279 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#280 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# source://prism//lib/prism/lex_compat.rb#33 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# A result class specialized for holding tokens produced by the lexer. +# +# source://prism//lib/prism/lex_compat.rb#14 +class Prism::LexCompat::Result < ::Prism::Result + # Create a new lex compat result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/lex_compat.rb#19 + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/lex_compat.rb#25 + def deconstruct_keys(keys); end + + # The list of tokens that were produced by the lexer. + # + # source://prism//lib/prism/lex_compat.rb#16 + def value; end +end + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://prism//lib/prism/lex_compat.rb#204 +class Prism::LexCompat::Token < ::SimpleDelegator + # The type of the token. + # + # source://prism//lib/prism/lex_compat.rb#213 + def event; end + + # The location of the token in the source. + # + # source://prism//lib/prism/lex_compat.rb#208 + def location; end + + # The state of the lexer when this token was produced. + # + # source://prism//lib/prism/lex_compat.rb#223 + def state; end + + # The slice of the source that this token represents. + # + # source://prism//lib/prism/lex_compat.rb#218 + def value; end +end + +# This is a result specific to the `lex` and `lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#764 +class Prism::LexResult < ::Prism::Result + # Create a new lex result object with the given values. + # + # @return [LexResult] a new instance of LexResult + # + # source://prism//lib/prism/parse_result.rb#769 + sig do + params( + value: T::Array[T.untyped], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for LexResult. + # + # source://prism//lib/prism/parse_result.rb#775 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The list of tokens that were parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#766 + sig { returns(T::Array[T.untyped]) } + def value; end +end + +# This is a class that wraps the Ripper lexer to produce almost exactly the +# same tokens. +# +# source://prism//lib/prism/lex_compat.rb#872 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://prism//lib/prism/lex_compat.rb#875 + def initialize(source); end + + # source://prism//lib/prism/lex_compat.rb#879 + def result; end + + # source://prism//lib/prism/lex_compat.rb#873 + def source; end + + private + + # source://prism//lib/prism/lex_compat.rb#913 + def lex(source); end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10464 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # Initialize a new LocalVariableAndWriteNode node. + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10466 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10556 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10479 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10484 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10494 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10489 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10499 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10484 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#10507 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10532 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#236 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10540 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10529 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10512 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10535 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10519 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10545 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10526 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10550 + def type; end + end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10570 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # Initialize a new LocalVariableOperatorWriteNode node. + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10572 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10661 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10586 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#10639 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#10626 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10601 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10596 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10606 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#10614 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10642 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#248 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10645 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10636 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10619 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#451 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#458 + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10650 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10633 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10655 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10676 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # Initialize a new LocalVariableOrWriteNode node. + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10678 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10768 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10691 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10706 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10701 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10711 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#10719 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10744 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#242 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10752 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10741 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10724 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10747 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10731 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10757 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10738 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10762 + def type; end + end +end + +# Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# source://prism//lib/prism/node.rb#10782 +class Prism::LocalVariableReadNode < ::Prism::Node + # Initialize a new LocalVariableReadNode node. + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10784 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10863 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10794 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10799 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10809 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10804 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10799 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#10822 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of visible scopes that should be searched to find the origin of this local variable. + # + # foo = 1; foo # depth 0 + # + # bar = 2; tap { bar } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#10844 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10847 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # x # name `:x` + # + # _Test # name `:_Test` + # + # Note that this can also be an underscore followed by a number for the default block parameters. + # + # _1 # name `:_1` + # + # source://prism//lib/prism/node.rb#10835 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10852 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10857 + def type; end + end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#10874 +class Prism::LocalVariableTargetNode < ::Prism::Node + # Initialize a new LocalVariableTargetNode node. + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#10876 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10941 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10886 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10891 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10901 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10896 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#10906 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10891 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } + # + # source://prism//lib/prism/node.rb#10914 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10922 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10925 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10919 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10930 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#10935 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#10952 +class Prism::LocalVariableWriteNode < ::Prism::Node + # Initialize a new LocalVariableWriteNode node. + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#10954 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11070 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10967 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10982 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10977 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#10987 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#10995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of semantic scopes we have to traverse to find the declaration of this variable. + # + # foo = 1 # depth 0 + # + # tap { foo = 1 } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#11013 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11054 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # foo = :bar # name `:foo` + # + # abc = 123 # name `:abc` + # + # source://prism//lib/prism/node.rb#11004 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # foo = :bar + # ^^^ + # + # source://prism//lib/prism/node.rb#11019 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11049 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # x = :y + # ^ + # + # source://prism//lib/prism/node.rb#11042 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11059 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the local variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo = :bar + # ^^^^ + # + # abc = 1234 + # ^^^^ + # + # Note that since the name of a local variable is known before the value is parsed, it is valid for a local variable to appear within the value of its own write. + # + # foo = foo + # + # source://prism//lib/prism/node.rb#11036 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11064 + def type; end + end +end + +# This represents a location in the source. +# +# source://prism//lib/prism/parse_result.rb#273 +class Prism::Location + # Create a new location object with the given source, start byte offset, and + # byte length. + # + # @return [Location] a new instance of Location + # + # source://prism//lib/prism/parse_result.rb#288 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } + def initialize(source, start_offset, length); end + + # Returns true if the given other location is equal to this location. + # + # source://prism//lib/prism/parse_result.rb#476 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Join this location with the first occurrence of the string in the source + # that occurs after this location on the same line, and return the new + # location. This will raise an error if the string does not exist. + # + # source://prism//lib/prism/parse_result.rb#495 + sig { params(string: String).returns(Prism::Location) } + def adjoin(string); end + + # The end column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#461 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_column(cache); end + + # The end offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism//lib/prism/parse_result.rb#397 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_offset(cache); end + + # The start column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#437 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_column(cache); end + + # The start offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism//lib/prism/parse_result.rb#375 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_offset(cache); end + + # Returns a new location that is the result of chopping off the last byte. + # + # source://prism//lib/prism/parse_result.rb#334 + sig { returns(Prism::Location) } + def chop; end + + # Returns all comments that are associated with this location (both leading + # and trailing comments). + # + # source://prism//lib/prism/parse_result.rb#324 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # Create a new location object with the given options. + # + # source://prism//lib/prism/parse_result.rb#329 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + + # Implement the hash pattern matching interface for Location. + # + # source://prism//lib/prism/parse_result.rb#466 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#449 + sig { returns(Integer) } + def end_character_column; end + + # The character offset from the beginning of the source where this location + # ends. + # + # source://prism//lib/prism/parse_result.rb#386 + sig { returns(Integer) } + def end_character_offset; end + + # The column number in code units of the given encoding where this location + # ends from the start of the line. + # + # source://prism//lib/prism/parse_result.rb#455 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_column(encoding = T.unsafe(nil)); end + + # The offset from the start of the file in code units of the given encoding. + # + # source://prism//lib/prism/parse_result.rb#391 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_offset(encoding = T.unsafe(nil)); end + + # The column number in bytes where this location ends from the start of the + # line. + # + # source://prism//lib/prism/parse_result.rb#443 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # source://prism//lib/prism/parse_result.rb#413 + sig { returns(Integer) } + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # source://prism//lib/prism/parse_result.rb#380 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # source://prism//lib/prism/parse_result.rb#339 + sig { returns(String) } + def inspect; end + + # Returns a new location that stretches from this location to the given + # other location. Raises an error if this location is not before the other + # location or if they don't share the same source. + # + # source://prism//lib/prism/parse_result.rb#485 + sig { params(other: Prism::Location).returns(Prism::Location) } + def join(other); end + + # Attach a comment to the leading comments of this location. + # + # source://prism//lib/prism/parse_result.rb#307 + sig { params(comment: Prism::Comment).void } + def leading_comment(comment); end + + # These are the comments that are associated with this location that exist + # before the start of this location. + # + # source://prism//lib/prism/parse_result.rb#302 + sig { returns(T::Array[Prism::Comment]) } + def leading_comments; end + + # The length of this location in bytes. + # + # source://prism//lib/prism/parse_result.rb#284 + sig { returns(Integer) } + def length; end + + # Implement the pretty print interface for Location. + # + # source://prism//lib/prism/parse_result.rb#471 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The source code that this location represents. + # + # source://prism//lib/prism/parse_result.rb#349 + sig { returns(String) } + def slice; end + + # The source code that this location represents starting from the beginning + # of the line that this location starts on to the end of the line that this + # location ends on. + # + # source://prism//lib/prism/parse_result.rb#356 + def slice_lines; end + + # Returns all of the lines of the source code associated with this location. + # + # source://prism//lib/prism/parse_result.rb#344 + sig { returns(T::Array[String]) } + def source_lines; end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#425 + sig { returns(Integer) } + def start_character_column; end + + # The character offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#364 + sig { returns(Integer) } + def start_character_offset; end + + # The column number in code units of the given encoding where this location + # starts from the start of the line. + # + # source://prism//lib/prism/parse_result.rb#431 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_column(encoding = T.unsafe(nil)); end + + # The offset from the start of the file in code units of the given encoding. + # + # source://prism//lib/prism/parse_result.rb#369 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_offset(encoding = T.unsafe(nil)); end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#419 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # source://prism//lib/prism/parse_result.rb#402 + sig { returns(Integer) } + def start_line; end + + # The content of the line where this location starts before this location. + # + # source://prism//lib/prism/parse_result.rb#407 + sig { returns(String) } + def start_line_slice; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#281 + sig { returns(Integer) } + def start_offset; end + + # Attach a comment to the trailing comments of this location. + # + # source://prism//lib/prism/parse_result.rb#318 + sig { params(comment: Prism::Comment).void } + def trailing_comment(comment); end + + # These are the comments that are associated with this location that exist + # after the end of this location. + # + # source://prism//lib/prism/parse_result.rb#313 + sig { returns(T::Array[Prism::Comment]) } + def trailing_comments; end + + protected + + # A Source object that is used to determine more information from the given + # offset and length. + # + # source://prism//lib/prism/parse_result.rb#276 + sig { returns(Prism::Source) } + def source; end +end + +# Flags for while and until loop nodes. +# +# source://prism//lib/prism/node.rb#16762 +module Prism::LoopFlags; end + +# a loop after a begin statement, so the body is executed first before the condition +# +# source://prism//lib/prism/node.rb#16764 +Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# This represents a magic comment that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#557 +class Prism::MagicComment + # Create a new magic comment object with the given key and value locations. + # + # @return [MagicComment] a new instance of MagicComment + # + # source://prism//lib/prism/parse_result.rb#565 + sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } + def initialize(key_loc, value_loc); end + + # Implement the hash pattern matching interface for MagicComment. + # + # source://prism//lib/prism/parse_result.rb#581 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this magic comment. + # + # source://prism//lib/prism/parse_result.rb#586 + sig { returns(String) } + def inspect; end + + # Returns the key of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#571 + sig { returns(String) } + def key; end + + # A Location object representing the location of the key in the source. + # + # source://prism//lib/prism/parse_result.rb#559 + sig { returns(Prism::Location) } + def key_loc; end + + # Returns the value of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#576 + sig { returns(String) } + def value; end + + # A Location object representing the location of the value in the source. + # + # source://prism//lib/prism/parse_result.rb#562 + sig { returns(Prism::Location) } + def value_loc; end +end + +# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo/i then end +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#11084 +class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new MatchLastLineNode node. + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://prism//lib/prism/node.rb#11086 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11241 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11098 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11156 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11103 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11220 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11200 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11113 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11108 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#11215 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#11193 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode + # + # source://prism//lib/prism/node.rb#11118 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::MatchLastLineNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11103 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # source://prism//lib/prism/node.rb#11126 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11151 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11136 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11176 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11181 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11171 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11131 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11225 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11141 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11146 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11210 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11186 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11230 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#11207 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11166 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11161 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11235 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11255 +class Prism::MatchPredicateNode < ::Prism::Node + # Initialize a new MatchPredicateNode node. + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://prism//lib/prism/node.rb#11257 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11335 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11268 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11283 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11278 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode + # + # source://prism//lib/prism/node.rb#11288 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#11296 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11319 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11314 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11307 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#11304 + sig { returns(Prism::Node) } + def pattern; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11324 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#11301 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11329 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11347 +class Prism::MatchRequiredNode < ::Prism::Node + # Initialize a new MatchRequiredNode node. + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://prism//lib/prism/node.rb#11349 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11427 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11360 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11365 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11375 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11370 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode + # + # source://prism//lib/prism/node.rb#11380 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11365 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#11388 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11411 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11406 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11399 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#11396 + sig { returns(Prism::Node) } + def pattern; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11416 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#11393 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11421 + def type; end + end +end + +# Represents writing local variables using a regular expression match with named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11439 +class Prism::MatchWriteNode < ::Prism::Node + # Initialize a new MatchWriteNode node. + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://prism//lib/prism/node.rb#11441 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).void + end + def initialize(source, node_id, location, flags, call, targets); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11506 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11451 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://prism//lib/prism/node.rb#11484 + sig { returns(Prism::CallNode) } + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11466 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11461 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode + # + # source://prism//lib/prism/node.rb#11471 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } + # + # source://prism//lib/prism/node.rb#11479 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11490 + sig { override.returns(String) } + def inspect; end + + # attr_reader targets: Array[LocalVariableTargetNode] + # + # source://prism//lib/prism/node.rb#11487 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } + def targets; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11495 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11500 + def type; end + end +end + +# Represents a node that is missing from the source and results in a syntax error. +# +# source://prism//lib/prism/node.rb#11515 +class Prism::MissingNode < ::Prism::Node + # Initialize a new MissingNode node. + # + # @return [MissingNode] a new instance of MissingNode + # + # source://prism//lib/prism/node.rb#11517 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11574 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11525 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11530 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11540 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11535 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode + # + # source://prism//lib/prism/node.rb#11545 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11530 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#11553 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11558 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11563 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11568 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11583 +class Prism::ModuleNode < ::Prism::Node + # Initialize a new ModuleNode node. + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://prism//lib/prism/node.rb#11585 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end + def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11687 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11599 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#11648 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11617 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11609 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode + # + # source://prism//lib/prism/node.rb#11645 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } + def constant_path; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode + # + # source://prism//lib/prism/node.rb#11622 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#11630 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#11666 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11651 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11671 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#11635 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # source://prism//lib/prism/node.rb#11661 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11638 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#11658 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11676 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11681 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# This can be a part of `MultiWriteNode` as above, or the target of a `for` loop +# +# for a, b in [[1, 2], [3, 4]] +# ^^^^ +# +# source://prism//lib/prism/node.rb#11708 +class Prism::MultiTargetNode < ::Prism::Node + # Initialize a new MultiTargetNode node. + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://prism//lib/prism/node.rb#11710 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11851 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11723 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11742 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11733 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode + # + # source://prism//lib/prism/node.rb#11747 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } + # + # source://prism//lib/prism/node.rb#11755 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11835 + sig { override.returns(String) } + def inspect; end + + # Represents the targets expressions before a splat node. + # + # a, (b, c, *) = 1, 2, 3, 4, 5 + # ^^^^ + # + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, (b, c) = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11768 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#11825 + sig { returns(T.nilable(String)) } + def lparen; end + + # The location of the opening parenthesis. + # + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11796 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # Represents a splat node in the target expression. + # + # a, (b, *c) = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, (b, *) = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, (b,) = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#11784 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } + def rest; end + + # Represents the targets expressions after a splat node. + # + # a, (*, b, c) = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11790 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#11830 + sig { returns(T.nilable(String)) } + def rparen; end + + # The location of the closing parenthesis. + # + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11812 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11840 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#11845 + def type; end + end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11867 +class Prism::MultiWriteNode < ::Prism::Node + # Initialize a new MultiWriteNode node. + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://prism//lib/prism/node.rb#11869 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12034 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11884 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11904 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11894 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode + # + # source://prism//lib/prism/node.rb#11909 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#11917 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12018 + sig { override.returns(String) } + def inspect; end + + # Represents the targets expressions before a splat node. + # + # a, b, * = 1, 2, 3, 4, 5 + # ^^^^ + # + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, b, c = 1, 2, 3, 4, 5 + # ^^^^^^^ + # + # source://prism//lib/prism/node.rb#11930 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#12003 + sig { returns(T.nilable(String)) } + def lparen; end + + # The location of the opening parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11958 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12013 + sig { returns(String) } + def operator; end + + # The location of the operator. + # + # a, b, c = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11990 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents a splat node in the target expression. + # + # a, b, *c = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, b, * = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, b, = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#11946 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } + def rest; end + + # Represents the targets expressions after a splat node. + # + # a, *, b, c = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11952 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#12008 + sig { returns(T.nilable(String)) } + def rparen; end + + # The location of the closing parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11974 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12023 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the targets. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # a, b, c = 1, 2, 3 + # ^^^^^^^ + # + # source://prism//lib/prism/node.rb#12000 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12028 + def type; end + end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://prism//lib/prism/mutation_compiler.rb#13 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#15 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://prism//lib/prism/mutation_compiler.rb#20 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#25 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://prism//lib/prism/mutation_compiler.rb#30 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#35 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://prism//lib/prism/mutation_compiler.rb#40 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#45 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://prism//lib/prism/mutation_compiler.rb#50 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#55 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#60 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://prism//lib/prism/mutation_compiler.rb#65 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://prism//lib/prism/mutation_compiler.rb#70 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#75 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://prism//lib/prism/mutation_compiler.rb#80 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#85 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#90 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://prism//lib/prism/mutation_compiler.rb#95 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#100 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://prism//lib/prism/mutation_compiler.rb#105 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#110 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#115 + def visit_call_or_write_node(node); end + + # Copy a CallTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#120 + def visit_call_target_node(node); end + + # Copy a CapturePatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#125 + def visit_capture_pattern_node(node); end + + # Copy a CaseMatchNode node + # + # source://prism//lib/prism/mutation_compiler.rb#130 + def visit_case_match_node(node); end + + # Copy a CaseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#135 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#140 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#145 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#150 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#155 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#160 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#165 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#170 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#175 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#180 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#185 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#190 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://prism//lib/prism/mutation_compiler.rb#195 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#200 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#205 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#210 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#215 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#220 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#225 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#230 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#235 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://prism//lib/prism/mutation_compiler.rb#240 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#245 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#250 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#255 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://prism//lib/prism/mutation_compiler.rb#260 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#265 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#270 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://prism//lib/prism/mutation_compiler.rb#275 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#280 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://prism//lib/prism/mutation_compiler.rb#285 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#290 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#295 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#300 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#305 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#310 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#315 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#320 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#325 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#330 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#335 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#340 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#345 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#350 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://prism//lib/prism/mutation_compiler.rb#355 + def visit_implicit_node(node); end + + # Copy a ImplicitRestNode node + # + # source://prism//lib/prism/mutation_compiler.rb#360 + def visit_implicit_rest_node(node); end + + # Copy a InNode node + # + # source://prism//lib/prism/mutation_compiler.rb#365 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#370 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#375 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#380 + def visit_index_or_write_node(node); end + + # Copy a IndexTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#385 + def visit_index_target_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#390 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#395 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#400 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#405 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#410 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#415 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://prism//lib/prism/mutation_compiler.rb#420 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#425 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#430 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#435 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#440 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#445 + def visit_interpolated_x_string_node(node); end + + # Copy a ItLocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#450 + def visit_it_local_variable_read_node(node); end + + # Copy a ItParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#455 + def visit_it_parameters_node(node); end + + # Copy a KeywordHashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#460 + def visit_keyword_hash_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#465 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://prism//lib/prism/mutation_compiler.rb#470 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#475 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#480 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#485 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#490 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#495 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#500 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#505 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://prism//lib/prism/mutation_compiler.rb#510 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://prism//lib/prism/mutation_compiler.rb#515 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#520 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#525 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://prism//lib/prism/mutation_compiler.rb#530 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#535 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#540 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://prism//lib/prism/mutation_compiler.rb#545 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#550 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#555 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#560 + def visit_numbered_parameters_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#565 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#570 + def visit_optional_keyword_parameter_node(node); end + + # Copy a OptionalParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#575 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://prism//lib/prism/mutation_compiler.rb#580 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#585 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://prism//lib/prism/mutation_compiler.rb#590 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#595 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#600 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#605 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#610 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://prism//lib/prism/mutation_compiler.rb#615 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://prism//lib/prism/mutation_compiler.rb#620 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://prism//lib/prism/mutation_compiler.rb#625 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://prism//lib/prism/mutation_compiler.rb#630 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#635 + def visit_regular_expression_node(node); end + + # Copy a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#640 + def visit_required_keyword_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#645 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://prism//lib/prism/mutation_compiler.rb#650 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#655 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#660 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#665 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://prism//lib/prism/mutation_compiler.rb#670 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#675 + def visit_self_node(node); end + + # Copy a ShareableConstantNode node + # + # source://prism//lib/prism/mutation_compiler.rb#680 + def visit_shareable_constant_node(node); end + + # Copy a SingletonClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#685 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#690 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#695 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#700 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#705 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#710 + def visit_statements_node(node); end + + # Copy a StringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#715 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#720 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#725 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#730 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#735 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://prism//lib/prism/mutation_compiler.rb#740 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#745 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://prism//lib/prism/mutation_compiler.rb#750 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#755 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#760 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://prism//lib/prism/mutation_compiler.rb#765 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#12052 +class Prism::NextNode < ::Prism::Node + # Initialize a new NextNode node. + # + # @return [NextNode] a new instance of NextNode + # + # source://prism//lib/prism/node.rb#12054 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12130 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12064 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#12099 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12081 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12074 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode + # + # source://prism//lib/prism/node.rb#12086 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#12094 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12114 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#12109 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#12102 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12119 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12124 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://prism//lib/prism/node.rb#12141 +class Prism::NilNode < ::Prism::Node + # Initialize a new NilNode node. + # + # @return [NilNode] a new instance of NilNode + # + # source://prism//lib/prism/node.rb#12143 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12200 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12151 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12166 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12161 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode + # + # source://prism//lib/prism/node.rb#12171 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12179 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12184 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12189 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12194 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#12210 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # Initialize a new NoKeywordsParameterNode node. + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#12212 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, operator_loc, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12295 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12222 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12227 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12237 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12232 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#12242 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12227 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#12250 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12279 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#12274 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#12262 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12269 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12255 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12284 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12289 + def type; end + end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://prism//lib/prism/node.rb#12 +class Prism::Node + abstract! + + # Accepts a visitor and calls back into the specialized visit function. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#169 + sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Returns the first node that matches the given block when visited in a + # depth-first search. This is useful for finding a node that matches a + # particular condition. + # + # node.breadth_first_search { |node| node.node_id == node_id } + # + # source://prism//lib/prism/node.rb#139 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } + def breadth_first_search(&block); end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#175 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # Returns an array of child nodes and locations that could potentially have + # comments attached to them. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#189 + sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # Returns an array of child nodes, excluding any `nil`s in the place of + # optional nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#183 + sig { abstract.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#175 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # source://prism//lib/prism/node_ext.rb#7 + def deprecated(*replacements); end + + # The end offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#40 + sig { returns(Integer) } + def end_offset; end + + sig { abstract.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns a string representation of the node. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#194 + sig { abstract.returns(String) } + def inspect; end + + # A Location instance that represents the location of this node in the + # source. + # + # source://prism//lib/prism/node.rb#25 + sig { returns(Prism::Location) } + def location; end + + # Returns true if the node has the newline flag set. + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#72 + sig { returns(T::Boolean) } + def newline?; end + + # source://prism//lib/prism/parse_result/newlines.rb#69 + def newline_flag!(lines); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/newlines.rb#65 + def newline_flag?; end + + # A unique identifier for this node. This is used in a very specific + # use case where you want to keep around a reference to a node without + # having to keep around the syntax tree in memory. This unique identifier + # will be consistent across multiple parses of the same source code. + # + # source://prism//lib/prism/node.rb#21 + sig { returns(Integer) } + def node_id; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # source://prism//lib/prism/node.rb#83 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # Returns all of the lines of the source code associated with this node. + # An alias for source_lines, used to mimic the API from + # RubyVM::AbstractSyntaxTree to make it easier to migrate. + # + # source://prism//lib/prism/node.rb#46 + sig { returns(T::Array[String]) } + def script_lines; end + + # Slice the location of the node from the source. + # + # source://prism//lib/prism/node.rb#55 + sig { returns(String) } + def slice; end + + # Slice the location of the node from the source, starting at the beginning + # of the line that the location starts on, ending at the end of the line + # that the location ends on. + # + # source://prism//lib/prism/node.rb#62 + sig { returns(String) } + def slice_lines; end + + # Returns all of the lines of the source code associated with this node. + # + # source://prism//lib/prism/node.rb#46 + sig { returns(T::Array[String]) } + def source_lines; end + + # The start offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#33 + sig { returns(Integer) } + def start_offset; end + + # Returns true if the node has the static literal flag set. + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#77 + sig { returns(T::Boolean) } + def static_literal?; end + + # Convert this node into a graphviz dot graph string. + # + # source://prism//lib/prism/node.rb#91 + sig { returns(String) } + def to_dot; end + + # Returns a list of nodes that are descendants of this node that contain the + # given line and column. This is useful for locating a node that is selected + # based on the line and column of the source code. + # + # Important to note is that the column given to this method should be in + # bytes, as opposed to characters or code units. + # + # source://prism//lib/prism/node.rb#102 + sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } + def tunnel(line, column); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#210 + sig { abstract.returns(Symbol) } + def type; end + + protected + + # An bitset of flags for this node. There are certain flags that are common + # for all nodes, and then some nodes have specific flags. + # + # source://prism//lib/prism/node.rb#68 + sig { returns(Integer) } + def flags; end + + private + + # A pointer to the source that this node was created from. + # + # source://prism//lib/prism/node.rb#14 + sig { returns(Prism::Source) } + def source; end + + class << self + # Returns a list of the fields that exist for this node class. Fields + # describe the structure of the node. This kind of reflection is useful for + # things like recursively visiting each node _and_ field in the tree. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#153 + def fields; end + + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#218 + def type; end + end +end + +# The flags that are common to all nodes. +# +# source://prism//lib/prism/node.rb#16855 +module Prism::NodeFlags; end + +# A flag to indicate that the node is a candidate to emit a :line event +# through tracepoint when compiled. +# +# source://prism//lib/prism/node.rb#16858 +Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) + +# A flag to indicate that the value that the node represents is a value that +# can be determined at parse-time. +# +# source://prism//lib/prism/node.rb#16862 +Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. +# +# -> { _1 + _2 } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12306 +class Prism::NumberedParametersNode < ::Prism::Node + # Initialize a new NumberedParametersNode node. + # + # @return [NumberedParametersNode] a new instance of NumberedParametersNode + # + # source://prism//lib/prism/node.rb#12308 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end + def initialize(source, node_id, location, flags, maximum); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12369 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12317 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12332 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12327 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode + # + # source://prism//lib/prism/node.rb#12337 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } + # + # source://prism//lib/prism/node.rb#12345 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12353 + sig { override.returns(String) } + def inspect; end + + # attr_reader maximum: Integer + # + # source://prism//lib/prism/node.rb#12350 + sig { returns(Integer) } + def maximum; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12358 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12363 + def type; end + end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://prism//lib/prism/node.rb#12379 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # Initialize a new NumberedReferenceReadNode node. + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12381 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end + def initialize(source, node_id, location, flags, number); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12448 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12390 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12395 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12405 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12400 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12410 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12395 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } + # + # source://prism//lib/prism/node.rb#12418 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12432 + sig { override.returns(String) } + def inspect; end + + # The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. + # + # $1 # number `1` + # + # $5432 # number `5432` + # + # $4294967296 # number `0` + # + # source://prism//lib/prism/node.rb#12429 + sig { returns(Integer) } + def number; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12437 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12442 + def type; end + end +end + +# Represents an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#12459 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # Initialize a new OptionalKeywordParameterNode node. + # + # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#12461 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12539 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12472 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12477 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12487 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12482 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#12492 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalKeywordParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12477 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#12500 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12523 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12510 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12513 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12505 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12528 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12520 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12533 + def type; end + end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#12553 +class Prism::OptionalParameterNode < ::Prism::Node + # Initialize a new OptionalParameterNode node. + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://prism//lib/prism/node.rb#12555 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12646 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12567 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12572 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12582 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12577 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode + # + # source://prism//lib/prism/node.rb#12587 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12572 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#12595 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12630 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12605 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12608 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12625 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12615 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12600 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12635 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12622 + sig { returns(Prism::Node) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12640 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12660 +class Prism::OrNode < ::Prism::Node + # Initialize a new OrNode node. + # + # @return [OrNode] a new instance of OrNode + # + # source://prism//lib/prism/node.rb#12662 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12755 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12673 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12688 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12683 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode + # + # source://prism//lib/prism/node.rb#12693 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#12701 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12739 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left or right + # ^^^^ + # + # 1 || 2 + # ^ + # + # source://prism//lib/prism/node.rb#12712 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12734 + sig { returns(String) } + def operator; end + + # The location of the `or` keyword or the `||` operator. + # + # left or right + # ^^ + # + # source://prism//lib/prism/node.rb#12727 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # left || right + # ^^^^^ + # + # 1 or 2 + # ^ + # + # source://prism//lib/prism/node.rb#12721 + sig { returns(Prism::Node) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12744 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12749 + def type; end + end +end + +# A parser for the pack template language. +# +# source://prism//lib/prism/pack.rb#6 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# A directive in the pack template language. +# +# source://prism//lib/prism/pack.rb#60 +class Prism::Pack::Directive + # Initialize a new directive with the given values. + # + # @return [Directive] a new instance of Directive + # + # source://prism//lib/prism/pack.rb#89 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # Provide a human-readable description of the directive. + # + # source://prism//lib/prism/pack.rb#131 + def describe; end + + # The type of endianness of the directive. + # + # source://prism//lib/prism/pack.rb#77 + def endian; end + + # The length of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#86 + def length; end + + # The length type of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#83 + def length_type; end + + # The type of signedness of the directive. + # + # source://prism//lib/prism/pack.rb#74 + def signed; end + + # The size of the directive. + # + # source://prism//lib/prism/pack.rb#80 + def size; end + + # A byteslice of the source string that this directive represents. + # + # source://prism//lib/prism/pack.rb#68 + def source; end + + # The type of the directive. + # + # source://prism//lib/prism/pack.rb#71 + def type; end + + # A symbol representing whether or not we are packing or unpacking. + # + # source://prism//lib/prism/pack.rb#65 + def variant; end + + # A symbol representing the version of Ruby. + # + # source://prism//lib/prism/pack.rb#62 + def version; end +end + +# The descriptions of the various types of endianness. +# +# source://prism//lib/prism/pack.rb#102 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of signedness. +# +# source://prism//lib/prism/pack.rb#111 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of sizes. +# +# source://prism//lib/prism/pack.rb#118 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# The result of parsing a pack template. +# +# source://prism//lib/prism/pack.rb#198 +class Prism::Pack::Format + # Create a new Format with the given directives and encoding. + # + # @return [Format] a new instance of Format + # + # source://prism//lib/prism/pack.rb#206 + def initialize(directives, encoding); end + + # Provide a human-readable description of the format. + # + # source://prism//lib/prism/pack.rb#212 + def describe; end + + # A list of the directives in the template. + # + # source://prism//lib/prism/pack.rb#200 + def directives; end + + # The encoding of the template. + # + # source://prism//lib/prism/pack.rb#203 + def encoding; end +end + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Flags for parameter nodes. +# +# source://prism//lib/prism/node.rb#16768 +module Prism::ParameterFlags; end + +# a parameter name that has been repeated in the method signature +# +# source://prism//lib/prism/node.rb#16770 +Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#12768 +class Prism::ParametersNode < ::Prism::Node + # Initialize a new ParametersNode node. + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://prism//lib/prism/node.rb#12770 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).void + end + def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12863 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12785 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://prism//lib/prism/node.rb#12844 + sig { returns(T.nilable(Prism::BlockParameterNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12790 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12808 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12795 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode + # + # source://prism//lib/prism/node.rb#12813 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12790 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } + # + # source://prism//lib/prism/node.rb#12821 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12847 + sig { override.returns(String) } + def inspect; end + + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#12841 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end + def keyword_rest; end + + # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] + # + # source://prism//lib/prism/node.rb#12838 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } + def keywords; end + + # attr_reader optionals: Array[OptionalParameterNode] + # + # source://prism//lib/prism/node.rb#12829 + sig { returns(T::Array[Prism::OptionalParameterNode]) } + def optionals; end + + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] + # + # source://prism//lib/prism/node.rb#12835 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) + end + def posts; end + + # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#12826 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } + def requireds; end + + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil + # + # source://prism//lib/prism/node.rb#12832 + sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } + def rest; end + + # Mirrors the Method#parameters method. + # + # source://prism//lib/prism/node_ext.rb#269 + sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } + def signature; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12852 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12857 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12883 +class Prism::ParenthesesNode < ::Prism::Node + # Initialize a new ParenthesesNode node. + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://prism//lib/prism/node.rb#12885 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12974 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12896 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#12931 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12901 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12953 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12941 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12913 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12906 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode + # + # source://prism//lib/prism/node.rb#12918 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12901 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#12926 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12958 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#85 + def newline_flag!(lines); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12948 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12934 + sig { returns(Prism::Location) } + def opening_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12963 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#12968 + def type; end + end +end + +# This represents an error that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#592 +class Prism::ParseError + # Create a new error object with the given message and location. + # + # @return [ParseError] a new instance of ParseError + # + # source://prism//lib/prism/parse_result.rb#607 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseError. + # + # source://prism//lib/prism/parse_result.rb#615 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this error. + # + # source://prism//lib/prism/parse_result.rb#620 + sig { returns(String) } + def inspect; end + + # The level of this error. + # + # source://prism//lib/prism/parse_result.rb#604 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this error in the source. + # + # source://prism//lib/prism/parse_result.rb#601 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # source://prism//lib/prism/parse_result.rb#598 + sig { returns(String) } + def message; end + + # The type of error. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # source://prism//lib/prism/parse_result.rb#595 + sig { returns(Symbol) } + def type; end +end + +# This is a result specific to the `parse_lex` and `parse_lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#781 +class Prism::ParseLexResult < ::Prism::Result + # Create a new parse lex result object with the given values. + # + # @return [ParseLexResult] a new instance of ParseLexResult + # + # source://prism//lib/prism/parse_result.rb#787 + sig do + params( + value: [Prism::ProgramNode, T::Array[T.untyped]], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for ParseLexResult. + # + # source://prism//lib/prism/parse_result.rb#793 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # A tuple of the syntax tree and the list of tokens that were parsed from + # the source code. + # + # source://prism//lib/prism/parse_result.rb#784 + sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } + def value; end +end + +# This is a result specific to the `parse` and `parse_file` methods. +# +# source://prism//lib/prism/parse_result.rb#722 +class Prism::ParseResult < ::Prism::Result + # Create a new parse result object with the given values. + # + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#735 + sig do + params( + value: Prism::ProgramNode, + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://prism//lib/prism/parse_result.rb#746 + def attach_comments!; end + + # Implement the hash pattern matching interface for ParseResult. + # + # source://prism//lib/prism/parse_result.rb#741 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of the syntax tree with the errors + # displayed inline. + # + # source://prism//lib/prism/parse_result.rb#758 + def errors_format; end + + # Walk the tree and mark nodes that are on a new line, loosely emulating + # the behavior of CRuby's `:line` tracepoint event. + # + # source://prism//lib/prism/parse_result.rb#752 + def mark_newlines!; end + + # The syntax tree that was parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#732 + sig { returns(Prism::ProgramNode) } + def value; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# source://prism//lib/prism/parse_result/comments.rb#19 +class Prism::ParseResult::Comments + # Create a new Comments object that will attach comments to the given + # parse result. + # + # @return [Comments] a new instance of Comments + # + # source://prism//lib/prism/parse_result/comments.rb#86 + def initialize(parse_result); end + + # Attach the comments to their respective locations in the tree by + # mutating the parse result. + # + # source://prism//lib/prism/parse_result/comments.rb#92 + def attach!; end + + # The parse result that we are attaching comments to. + # + # source://prism//lib/prism/parse_result/comments.rb#82 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://prism//lib/prism/parse_result/comments.rb#119 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://prism//lib/prism/parse_result/comments.rb#53 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://prism//lib/prism/parse_result/comments.rb#56 + def initialize(location); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#68 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#64 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#72 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#54 + def location; end + + # source://prism//lib/prism/parse_result/comments.rb#60 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#76 + def trailing_comment(comment); end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://prism//lib/prism/parse_result/comments.rb#22 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://prism//lib/prism/parse_result/comments.rb#25 + def initialize(node); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#37 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#33 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#42 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#23 + def node; end + + # source://prism//lib/prism/parse_result/comments.rb#29 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#46 + def trailing_comment(comment); end +end + +# An object to represent the set of errors on a parse result. This object +# can be used to format the errors in a human-readable way. +# +# source://prism//lib/prism/parse_result/errors.rb#9 +class Prism::ParseResult::Errors + # Initialize a new set of errors from the given parse result. + # + # @return [Errors] a new instance of Errors + # + # source://prism//lib/prism/parse_result/errors.rb#14 + def initialize(parse_result); end + + # Formats the errors in a human-readable way and return them as a string. + # + # source://prism//lib/prism/parse_result/errors.rb#19 + def format; end + + # The parse result that contains the errors. + # + # source://prism//lib/prism/parse_result/errors.rb#11 + def parse_result; end +end + +# The :line tracepoint event gets fired whenever the Ruby VM encounters an +# expression on a new line. The types of expressions that can trigger this +# event are: +# +# * if statements +# * unless statements +# * nodes that are children of statements lists +# +# In order to keep track of the newlines, we have a list of offsets that +# come back from the parser. We assign these offsets to the first nodes that +# we find in the tree that are on those lines. +# +# Note that the logic in this file should be kept in sync with the Java +# MarkNewlinesVisitor, since that visitor is responsible for marking the +# newlines for JRuby/TruffleRuby. +# +# This file is autoloaded only when `mark_newlines!` is called, so the +# re-opening of the various nodes in this file will only be performed in +# that case. We do that to avoid storing the extra `@newline` instance +# variable on every node if we don't need it. +# +# source://prism//lib/prism/parse_result/newlines.rb#25 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # Create a new Newlines visitor with the given newline offsets. + # + # @return [Newlines] a new instance of Newlines + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def initialize(lines); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#33 + def visit_block_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#47 + def visit_if_node(node); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#33 + def visit_lambda_node(node); end + + # Permit statements lists to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#55 + def visit_statements_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#47 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#626 +class Prism::ParseWarning + # Create a new warning object with the given message and location. + # + # @return [ParseWarning] a new instance of ParseWarning + # + # source://prism//lib/prism/parse_result.rb#641 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseWarning. + # + # source://prism//lib/prism/parse_result.rb#649 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this warning. + # + # source://prism//lib/prism/parse_result.rb#654 + sig { returns(String) } + def inspect; end + + # The level of this warning. + # + # source://prism//lib/prism/parse_result.rb#638 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this warning in the source. + # + # source://prism//lib/prism/parse_result.rb#635 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # source://prism//lib/prism/parse_result.rb#632 + sig { returns(String) } + def message; end + + # The type of warning. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # source://prism//lib/prism/parse_result.rb#629 + sig { returns(Symbol) } + def type; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# source://prism//lib/prism/pattern.rb#37 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#63 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#70 + def compile; end + + # The query that this pattern was initialized with. + # + # source://prism//lib/prism/pattern.rb#59 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # source://prism//lib/prism/pattern.rb#86 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://prism//lib/prism/pattern.rb#102 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://prism//lib/prism/pattern.rb#108 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#143 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#118 + def compile_array_pattern_node(node); end + + # Compile a name associated with a constant. + # + # source://prism//lib/prism/pattern.rb#168 + def compile_constant_name(node, name); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#148 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#163 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#113 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#184 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://prism//lib/prism/pattern.rb#214 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://prism//lib/prism/pattern.rb#243 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#219 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#227 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#235 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://prism//lib/prism/pattern.rb#40 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#43 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#12986 +class Prism::PinnedExpressionNode < ::Prism::Node + # Initialize a new PinnedExpressionNode node. + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#12988 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13088 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13000 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13015 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13010 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#13020 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } + # + # source://prism//lib/prism/node.rb#13028 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#13033 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13072 + sig { override.returns(String) } + def inspect; end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#13062 + sig { returns(String) } + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://prism//lib/prism/node.rb#13043 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13057 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13036 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#13067 + sig { returns(String) } + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://prism//lib/prism/node.rb#13050 + sig { returns(Prism::Location) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13077 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13082 + def type; end + end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://prism//lib/prism/node.rb#13101 +class Prism::PinnedVariableNode < ::Prism::Node + # Initialize a new PinnedVariableNode node. + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://prism//lib/prism/node.rb#13103 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, variable, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13177 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13113 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13128 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13123 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode + # + # source://prism//lib/prism/node.rb#13133 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#13141 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13161 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13156 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13149 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13166 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode + # + # source://prism//lib/prism/node.rb#13146 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end + def variable; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13171 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13188 +class Prism::PostExecutionNode < ::Prism::Node + # Initialize a new PostExecutionNode node. + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://prism//lib/prism/node.rb#13190 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13292 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13202 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13207 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13271 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13254 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13219 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13212 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode + # + # source://prism//lib/prism/node.rb#13224 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13207 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#13232 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13276 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13261 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13240 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13266 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13247 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#13237 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13281 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13286 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13305 +class Prism::PreExecutionNode < ::Prism::Node + # Initialize a new PreExecutionNode node. + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://prism//lib/prism/node.rb#13307 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13409 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13319 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13388 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13371 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13336 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13329 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode + # + # source://prism//lib/prism/node.rb#13341 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#13349 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13393 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13378 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13357 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13383 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13364 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#13354 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13398 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13403 + def type; end + end +end + +# The top level node of any parse tree. +# +# source://prism//lib/prism/node.rb#13419 +class Prism::ProgramNode < ::Prism::Node + # Initialize a new ProgramNode node. + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://prism//lib/prism/node.rb#13421 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).void + end + def initialize(source, node_id, location, flags, locals, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13486 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13431 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13446 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13441 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode + # + # source://prism//lib/prism/node.rb#13451 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } + # + # source://prism//lib/prism/node.rb#13459 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13470 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#13464 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#13467 + sig { returns(Prism::StatementsNode) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13475 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13480 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#16774 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#16776 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13501 +class Prism::RangeNode < ::Prism::Node + # Initialize a new RangeNode node. + # + # @return [RangeNode] a new instance of RangeNode + # + # source://prism//lib/prism/node.rb#13503 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, left, right, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13602 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13514 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13519 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13532 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13524 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode + # + # source://prism//lib/prism/node.rb#13537 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::RangeNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13519 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#13545 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13550 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13586 + sig { override.returns(String) } + def inspect; end + + # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # 1... + # ^ + # + # hello...goodbye + # ^^^^^ + # + # source://prism//lib/prism/node.rb#13561 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13581 + sig { returns(String) } + def operator; end + + # The location of the `..` or `...` operator. + # + # source://prism//lib/prism/node.rb#13574 + sig { returns(Prism::Location) } + def operator_loc; end + + # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # ..5 + # ^ + # + # 1...foo + # ^^^ + # If neither right-hand or left-hand side was included, this will be a MissingNode. + # + # source://prism//lib/prism/node.rb#13571 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13591 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13596 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#13615 +class Prism::RationalNode < ::Prism::Node + # Initialize a new RationalNode node. + # + # @return [RationalNode] a new instance of RationalNode + # + # source://prism//lib/prism/node.rb#13617 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).void + end + def initialize(source, node_id, location, flags, numerator, denominator); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13706 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13627 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13660 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13642 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13637 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode + # + # source://prism//lib/prism/node.rb#13647 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).returns(Prism::RationalNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13665 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } + # + # source://prism//lib/prism/node.rb#13655 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The denominator of the rational number. + # + # 1.5r # denominator 2 + # + # source://prism//lib/prism/node.rb#13687 + sig { returns(Integer) } + def denominator; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13675 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13690 + sig { override.returns(String) } + def inspect; end + + # The numerator of the rational number. + # + # 1.5r # numerator 3 + # + # source://prism//lib/prism/node.rb#13682 + sig { returns(Integer) } + def numerator; end + + # Returns the value of the node as an IntegerNode or a FloatNode. This + # method is deprecated in favor of #value or #numerator/#denominator. + # + # source://prism//lib/prism/node_ext.rb#120 + def numeric; end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13670 + sig { returns(T::Boolean) } + def octal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13695 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://prism//lib/prism/node_ext.rb#114 + sig { returns(Rational) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13700 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://prism//lib/prism/node.rb#13718 +class Prism::RedoNode < ::Prism::Node + # Initialize a new RedoNode node. + # + # @return [RedoNode] a new instance of RedoNode + # + # source://prism//lib/prism/node.rb#13720 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13777 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13728 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13733 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13743 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13738 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode + # + # source://prism//lib/prism/node.rb#13748 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13733 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#13756 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13761 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13766 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13771 + def type; end + end +end + +# The Reflection module provides the ability to reflect on the structure of +# the syntax tree itself, as opposed to looking at a single syntax tree. This +# is useful in metaprogramming contexts. +# +# source://prism//lib/prism/reflection.rb#13 +module Prism::Reflection + class << self + # Returns the fields for the given node. + # + # source://prism//lib/prism/reflection.rb#104 + sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } + def fields_for(node); end + end +end + +# A constant field represents a constant value on a node. Effectively, it +# represents an identifier found within the source. It resolves to a symbol +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#45 +class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end + +# A constant list field represents a list of constant values on a node. It +# resolves to an array of symbols in Ruby. +# +# source://prism//lib/prism/reflection.rb#55 +class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end + +# A field represents a single piece of data on a node. It is the base class +# for all other field types. +# +# source://prism//lib/prism/reflection.rb#16 +class Prism::Reflection::Field + # Initializes the field with the given name. + # + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/reflection.rb#21 + sig { params(name: Symbol).void } + def initialize(name); end + + # The name of the field. + # + # source://prism//lib/prism/reflection.rb#18 + sig { returns(Symbol) } + def name; end +end + +# A flags field represents a bitset of flags on a node. It resolves to an +# integer in Ruby. Note that the flags cannot be accessed directly on the +# node because the integer is kept private. Instead, the various flags in +# the bitset should be accessed through their query methods. +# +# source://prism//lib/prism/reflection.rb#92 +class Prism::Reflection::FlagsField < ::Prism::Reflection::Field + # Initializes the flags field with the given name and flags. + # + # @return [FlagsField] a new instance of FlagsField + # + # source://prism//lib/prism/reflection.rb#97 + sig { params(name: Symbol, flags: T::Array[Symbol]).void } + def initialize(name, flags); end + + # The names of the flags in the bitset. + # + # source://prism//lib/prism/reflection.rb#94 + sig { returns(T::Array[Symbol]) } + def flags; end +end + +# A float field represents a double-precision floating point value. It is +# used exclusively to represent the value of a floating point literal. It +# resolves to a Float in Ruby. +# +# source://prism//lib/prism/reflection.rb#85 +class Prism::Reflection::FloatField < ::Prism::Reflection::Field; end + +# An integer field represents an integer value. It is used to represent the +# value of an integer literal, the depth of local variables, and the number +# of a numbered reference. It resolves to an Integer in Ruby. +# +# source://prism//lib/prism/reflection.rb#79 +class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end + +# A location field represents the location of some part of the node in the +# source code. For example, the location of a keyword or an operator. It +# resolves to a Prism::Location in Ruby. +# +# source://prism//lib/prism/reflection.rb#67 +class Prism::Reflection::LocationField < ::Prism::Reflection::Field; end + +# A node field represents a single child node in the syntax tree. It +# resolves to a Prism::Node in Ruby. +# +# source://prism//lib/prism/reflection.rb#28 +class Prism::Reflection::NodeField < ::Prism::Reflection::Field; end + +# A node list field represents a list of child nodes in the syntax tree. It +# resolves to an array of Prism::Node instances in Ruby. +# +# source://prism//lib/prism/reflection.rb#39 +class Prism::Reflection::NodeListField < ::Prism::Reflection::Field; end + +# An optional constant field represents a constant value on a node that may +# or may not be present. It resolves to either a symbol or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#50 +class Prism::Reflection::OptionalConstantField < ::Prism::Reflection::Field; end + +# An optional location field represents the location of some part of the +# node in the source code that may or may not be present. It resolves to +# either a Prism::Location or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#73 +class Prism::Reflection::OptionalLocationField < ::Prism::Reflection::Field; end + +# An optional node field represents a single child node in the syntax tree +# that may or may not be present. It resolves to either a Prism::Node or nil +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#34 +class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end + +# A string field represents a string value on a node. It almost always +# represents the unescaped value of a string-like literal. It resolves to a +# string in Ruby. +# +# source://prism//lib/prism/reflection.rb#61 +class Prism::Reflection::StringField < ::Prism::Reflection::Field; end + +# Flags for regular expression and match last line nodes. +# +# source://prism//lib/prism/node.rb#16780 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://prism//lib/prism/node.rb#16797 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://prism//lib/prism/node.rb#16794 +Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) + +# x - ignores whitespace and allows comments in regular expressions +# +# source://prism//lib/prism/node.rb#16785 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#16809 +Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# source://prism//lib/prism/node.rb#16812 +Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#16806 +Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://prism//lib/prism/node.rb#16782 +Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) + +# m - allows $ to match the end of lines within strings +# +# source://prism//lib/prism/node.rb#16788 +Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) + +# o - only interpolates values into the regular expression once +# +# source://prism//lib/prism/node.rb#16791 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://prism//lib/prism/node.rb#16803 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://prism//lib/prism/node.rb#16800 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13786 +class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # Initialize a new RegularExpressionNode node. + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://prism//lib/prism/node.rb#13788 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13943 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13800 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13858 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13805 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13922 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13902 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13815 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13810 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#13917 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#13895 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode + # + # source://prism//lib/prism/node.rb#13820 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::RegularExpressionNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13805 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # source://prism//lib/prism/node.rb#13828 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13853 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13838 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13878 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13883 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13873 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13833 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13927 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13843 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13848 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13912 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13888 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13932 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#13909 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13868 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13863 + sig { returns(T::Boolean) } + def windows_31j?; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13937 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#20 +module Prism::RegularExpressionOptions + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://prism//lib/prism/node_ext.rb#23 + def options; end +end + +# Represents a required keyword parameter to a method, block, or lambda definition. +# +# def a(b: ) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#13958 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # Initialize a new RequiredKeywordParameterNode node. + # + # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#13960 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14034 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13970 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13975 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13985 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13980 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#13990 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13975 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } + # + # source://prism//lib/prism/node.rb#13998 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14018 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14008 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14011 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14003 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14023 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14028 + def type; end + end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://prism//lib/prism/node.rb#14047 +class Prism::RequiredParameterNode < ::Prism::Node + # Initialize a new RequiredParameterNode node. + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://prism//lib/prism/node.rb#14049 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14115 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14058 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14063 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14073 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14068 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode + # + # source://prism//lib/prism/node.rb#14078 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14063 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#14086 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14099 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14096 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14091 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14104 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14109 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14126 +class Prism::RescueModifierNode < ::Prism::Node + # Initialize a new RescueModifierNode node. + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism//lib/prism/node.rb#14128 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14206 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14139 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14144 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14154 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14149 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode + # + # source://prism//lib/prism/node.rb#14159 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14144 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } + # + # source://prism//lib/prism/node.rb#14167 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#14172 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14190 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14185 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14175 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#115 + def newline_flag!(lines); end + + # attr_reader rescue_expression: Prism::node + # + # source://prism//lib/prism/node.rb#14182 + sig { returns(Prism::Node) } + def rescue_expression; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14195 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14200 + def type; end + end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# foo +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. +# +# source://prism//lib/prism/node.rb#14223 +class Prism::RescueNode < ::Prism::Node + # Initialize a new RescueNode node. + # + # @return [RescueNode] a new instance of RescueNode + # + # source://prism//lib/prism/node.rb#14225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14335 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14239 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14244 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14259 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14249 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the subsequent rescue clause of the rescue node. This method is + # deprecated in favor of #subsequent. + # + # source://prism//lib/prism/node_ext.rb#494 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode + # + # source://prism//lib/prism/node.rb#14264 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14244 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, statements: StatementsNode?, subsequent: RescueNode? } + # + # source://prism//lib/prism/node.rb#14272 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#14284 + sig { returns(T::Array[Prism::Node]) } + def exceptions; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14319 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14309 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14277 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#14314 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#14287 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil + # + # source://prism//lib/prism/node.rb#14300 + sig do + returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) + end + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#14303 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # attr_reader subsequent: RescueNode? + # + # source://prism//lib/prism/node.rb#14306 + sig { returns(T.nilable(Prism::RescueNode)) } + def subsequent; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14324 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14329 + def type; end + end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#14352 +class Prism::RestParameterNode < ::Prism::Node + # Initialize a new RestParameterNode node. + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://prism//lib/prism/node.rb#14354 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14447 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14365 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14370 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14380 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14375 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode + # + # source://prism//lib/prism/node.rb#14385 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::RestParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14370 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#14393 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14431 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#14403 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#14406 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14426 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14419 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14398 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14436 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14441 + def type; end + end +end + +# This represents the result of a call to ::parse or ::parse_file. It contains +# the requested structure, any comments that were encounters, and any errors +# that were encountered. +# +# source://prism//lib/prism/parse_result.rb#662 +class Prism::Result + # Create a new result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/parse_result.rb#684 + sig do + params( + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + + # Create a code units cache for the given encoding. + # + # source://prism//lib/prism/parse_result.rb#716 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#664 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # An optional location that represents the location of the __END__ marker + # and the rest of the content of the file. This content is loaded into the + # DATA constant when the file being parsed is the main file being executed. + # + # source://prism//lib/prism/parse_result.rb#672 + sig { returns(T.nilable(Prism::Location)) } + def data_loc; end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/parse_result.rb#694 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns the encoding of the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#699 + sig { returns(Encoding) } + def encoding; end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#675 + sig { returns(T::Array[Prism::ParseError]) } + def errors; end + + # Returns true if there were errors during parsing and false if there were + # not. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#711 + sig { returns(T::Boolean) } + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#667 + sig { returns(T::Array[Prism::MagicComment]) } + def magic_comments; end + + # A Source instance that represents the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#681 + sig { returns(Prism::Source) } + def source; end + + # Returns true if there were no errors during parsing and false if there + # were. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#705 + sig { returns(T::Boolean) } + def success?; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#678 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://prism//lib/prism/node.rb#14460 +class Prism::RetryNode < ::Prism::Node + # Initialize a new RetryNode node. + # + # @return [RetryNode] a new instance of RetryNode + # + # source://prism//lib/prism/node.rb#14462 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14519 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14470 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14485 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14480 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode + # + # source://prism//lib/prism/node.rb#14490 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14498 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14503 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14508 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14513 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14528 +class Prism::ReturnNode < ::Prism::Node + # Initialize a new ReturnNode node. + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://prism//lib/prism/node.rb#14530 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, arguments); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14606 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14540 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#14582 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14557 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14550 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode + # + # source://prism//lib/prism/node.rb#14562 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } + # + # source://prism//lib/prism/node.rb#14570 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14590 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14585 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14575 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14595 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14600 + def type; end + end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://prism//lib/prism/node.rb#14617 +class Prism::SelfNode < ::Prism::Node + # Initialize a new SelfNode node. + # + # @return [SelfNode] a new instance of SelfNode + # + # source://prism//lib/prism/node.rb#14619 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14676 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14627 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14642 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14637 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode + # + # source://prism//lib/prism/node.rb#14647 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14655 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14660 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14665 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14670 + def type; end + end +end + +# A module responsible for deserializing parse results. +# +# source://prism//lib/prism/serialize.rb#14 +module Prism::Serialize + class << self + # Deserialize the AST represented by the given string into a parse result. + # + # source://prism//lib/prism/serialize.rb#28 + def load(input, serialized); end + + # Deserialize the tokens represented by the given string into a parse + # result. + # + # source://prism//lib/prism/serialize.rb#51 + def load_tokens(source, serialized); end + end +end + +# source://prism//lib/prism/serialize.rb#55 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://prism//lib/prism/serialize.rb#91 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://prism//lib/prism/serialize.rb#88 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://prism//lib/prism/serialize.rb#88 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/serialize.rb#87 + def encoding; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#87 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#87 + def io; end + + # source://prism//lib/prism/serialize.rb#129 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#115 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#106 + def load_header; end + + # source://prism//lib/prism/serialize.rb#125 + def load_line_offsets; end + + # source://prism//lib/prism/serialize.rb#462 + def load_metadata; end + + # source://prism//lib/prism/serialize.rb#496 + def load_nodes; end + + # source://prism//lib/prism/serialize.rb#510 + def load_result; end + + # source://prism//lib/prism/serialize.rb#121 + def load_start_line; end + + # source://prism//lib/prism/serialize.rb#471 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#484 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://prism//lib/prism/serialize.rb#87 + def serialized; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#88 + def source; end + + # Returns the value of attribute start_line. + # + # source://prism//lib/prism/serialize.rb#89 + def start_line; end + + private + + # source://prism//lib/prism/serialize.rb#596 + def load_constant(index); end + + # source://prism//lib/prism/serialize.rb#549 + def load_double; end + + # source://prism//lib/prism/serialize.rb#564 + def load_embedded_string; end + + # source://prism//lib/prism/serialize.rb#626 + def load_error_level; end + + # source://prism//lib/prism/serialize.rb#538 + def load_integer; end + + # source://prism//lib/prism/serialize.rb#580 + def load_location; end + + # source://prism//lib/prism/serialize.rb#584 + def load_location_object; end + + # source://prism//lib/prism/serialize.rb#655 + def load_node; end + + # source://prism//lib/prism/serialize.rb#621 + def load_optional_constant; end + + # source://prism//lib/prism/serialize.rb#588 + def load_optional_location; end + + # source://prism//lib/prism/serialize.rb#592 + def load_optional_location_object; end + + # source://prism//lib/prism/serialize.rb#557 + def load_optional_node; end + + # source://prism//lib/prism/serialize.rb#617 + def load_required_constant; end + + # source://prism//lib/prism/serialize.rb#568 + def load_string; end + + # source://prism//lib/prism/serialize.rb#553 + def load_uint32; end + + # source://prism//lib/prism/serialize.rb#533 + def load_varsint; end + + # variable-length integer using https://en.wikipedia.org/wiki/LEB128 + # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints + # + # source://prism//lib/prism/serialize.rb#519 + def load_varuint; end + + # source://prism//lib/prism/serialize.rb#641 + def load_warning_level; end +end + +# source://prism//lib/prism/serialize.rb#138 +Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) + +# StringIO is synchronized and that adds a high overhead on TruffleRuby. +# +# source://prism//lib/prism/serialize.rb#83 +Prism::Serialize::Loader::FastStringIO = StringIO + +# The major version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#17 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The minor version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#21 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The patch version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#25 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# The token types that can be indexed by their enum values. +# +# source://prism//lib/prism/serialize.rb#1737 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. +# +# C = { a: 1 } +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14686 +class Prism::ShareableConstantNode < ::Prism::Node + # Initialize a new ShareableConstantNode node. + # + # @return [ShareableConstantNode] a new instance of ShareableConstantNode + # + # source://prism//lib/prism/node.rb#14688 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).void + end + def initialize(source, node_id, location, flags, write); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14764 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14697 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14702 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14712 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14707 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode + # + # source://prism//lib/prism/node.rb#14717 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).returns(Prism::ShareableConstantNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14702 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } + # + # source://prism//lib/prism/node.rb#14725 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def experimental_copy?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14740 + sig { returns(T::Boolean) } + def experimental_copy?; end + + # def experimental_everything?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14735 + sig { returns(T::Boolean) } + def experimental_everything?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14748 + sig { override.returns(String) } + def inspect; end + + # def literal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14730 + sig { returns(T::Boolean) } + def literal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14753 + sig { override.returns(Symbol) } + def type; end + + # The constant write that should be modified with the shareability state. + # + # source://prism//lib/prism/node.rb#14745 + sig do + returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) + end + def write; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14758 + def type; end + end +end + +# Flags for shareable constant nodes. +# +# source://prism//lib/prism/node.rb#16816 +module Prism::ShareableConstantNodeFlags; end + +# constant writes that should be modified with shareable constant value experimental copy +# +# source://prism//lib/prism/node.rb#16824 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value experimental everything +# +# source://prism//lib/prism/node.rb#16821 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value literal +# +# source://prism//lib/prism/node.rb#16818 +Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14775 +class Prism::SingletonClassNode < ::Prism::Node + # Initialize a new SingletonClassNode node. + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#14777 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14888 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14791 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#14847 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#14857 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14830 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14809 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14801 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#14814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#14822 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#14867 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14850 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#14844 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14872 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#14827 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14862 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14837 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14877 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14882 + def type; end + end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://prism//lib/prism/parse_result.rb#7 +class Prism::Source + # Create a new source object with the given source code. + # + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/parse_result.rb#45 + sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } + def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#97 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#92 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Generate a cache that targets a specific encoding for calculating code + # unit offsets. + # + # source://prism//lib/prism/parse_result.rb#125 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # Returns the column number in code units for the given encoding for the + # given byte offset. + # + # source://prism//lib/prism/parse_result.rb#131 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # We purposefully replace invalid and undefined characters with replacement + # characters in this conversion. This happens for two reasons. First, it's + # possible that the given byte offset will not occur on a character + # boundary. Second, it's possible that the source code will contain a + # character that has no equivalent in the given encoding. + # + # source://prism//lib/prism/parse_result.rb#113 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end + + # Return the column number for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#87 + sig { params(byte_offset: Integer).returns(Integer) } + def column(byte_offset); end + + # Returns the encoding of the source code, which is set by parameters to the + # parser or by the encoding magic comment. + # + # source://prism//lib/prism/parse_result.rb#53 + sig { returns(Encoding) } + def encoding; end + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#70 + sig { params(byte_offset: Integer).returns(Integer) } + def line(byte_offset); end + + # Returns the byte offset of the end of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#82 + def line_end(byte_offset); end + + # Return the byte offset of the start of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#76 + sig { params(byte_offset: Integer).returns(Integer) } + def line_start(byte_offset); end + + # Returns the lines of the source code as an array of strings. + # + # source://prism//lib/prism/parse_result.rb#58 + sig { returns(T::Array[String]) } + def lines; end + + # The list of newline byte offsets in the source code. + # + # source://prism//lib/prism/parse_result.rb#42 + sig { returns(T::Array[Integer]) } + def offsets; end + + # Perform a byteslice on the source code using the given byte offset and + # byte length. + # + # source://prism//lib/prism/parse_result.rb#64 + sig { params(byte_offset: Integer, length: Integer).returns(String) } + def slice(byte_offset, length); end + + # The source code that this source object represents. + # + # source://prism//lib/prism/parse_result.rb#36 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#39 + sig { returns(Integer) } + def start_line; end + + private + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#139 + def find_line(byte_offset); end + + class << self + # Create a new source object with the given source code. This method should + # be used instead of `new` and it will return either a `Source` or a + # specialized and more performant `ASCIISource` if no multibyte characters + # are present in the source code. + # + # source://prism//lib/prism/parse_result.rb#12 + def for(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14904 +class Prism::SourceEncodingNode < ::Prism::Node + # Initialize a new SourceEncodingNode node. + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://prism//lib/prism/node.rb#14906 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14963 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14914 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14919 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14929 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14924 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode + # + # source://prism//lib/prism/node.rb#14934 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14919 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14942 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14947 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14952 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#14957 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14972 +class Prism::SourceFileNode < ::Prism::Node + # Initialize a new SourceFileNode node. + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://prism//lib/prism/node.rb#14974 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).void + end + def initialize(source, node_id, location, flags, filepath); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15055 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14983 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14988 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14998 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14993 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode + # + # source://prism//lib/prism/node.rb#15003 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14988 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } + # + # source://prism//lib/prism/node.rb#15011 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. + # + # source://prism//lib/prism/node.rb#15036 + sig { returns(String) } + def filepath; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15021 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15016 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15026 + sig { returns(T::Boolean) } + def frozen?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15039 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15031 + sig { returns(T::Boolean) } + def mutable?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15044 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15049 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15066 +class Prism::SourceLineNode < ::Prism::Node + # Initialize a new SourceLineNode node. + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#15068 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15125 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15076 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15091 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15086 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#15096 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#15104 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15109 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15114 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15119 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#15134 +class Prism::SplatNode < ::Prism::Node + # Initialize a new SplatNode node. + # + # @return [SplatNode] a new instance of SplatNode + # + # source://prism//lib/prism/node.rb#15136 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).void + end + def initialize(source, node_id, location, flags, operator_loc, expression); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15212 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15146 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15163 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15156 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode + # + # source://prism//lib/prism/node.rb#15168 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } + # + # source://prism//lib/prism/node.rb#15176 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#15188 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15196 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15191 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15181 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15201 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15206 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15223 +class Prism::StatementsNode < ::Prism::Node + # Initialize a new StatementsNode node. + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://prism//lib/prism/node.rb#15225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, body); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15286 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15234 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#15267 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15239 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15249 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15244 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode + # + # source://prism//lib/prism/node.rb#15254 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15239 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } + # + # source://prism//lib/prism/node.rb#15262 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15270 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15275 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15280 + def type; end + end +end + +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#16828 +module Prism::StringFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#16833 +Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#16830 +Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#16836 +Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#16839 +Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. +# +# "foo" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#15303 +class Prism::StringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new StringNode node. + # + # @return [StringNode] a new instance of StringNode + # + # source://prism//lib/prism/node.rb#15305 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15437 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15317 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15416 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15390 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15332 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15327 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#15411 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#15383 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode + # + # source://prism//lib/prism/node.rb#15337 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::StringNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } + # + # source://prism//lib/prism/node.rb#15345 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15355 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15350 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15360 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15421 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15365 + sig { returns(T::Boolean) } + def mutable?; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#15406 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#15370 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # source://prism//lib/prism/node_ext.rb#72 + sig { returns(Prism::InterpolatedStringNode) } + def to_interpolated; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15426 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15403 + sig { returns(String) } + def unescaped; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15431 + def type; end + end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15454 +class Prism::SuperNode < ::Prism::Node + # Initialize a new SuperNode node. + # + # @return [SuperNode] a new instance of SuperNode + # + # source://prism//lib/prism/node.rb#15456 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15575 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15469 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#15525 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: BlockNode | BlockArgumentNode | nil + # + # source://prism//lib/prism/node.rb#15541 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15474 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15487 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15479 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode + # + # source://prism//lib/prism/node.rb#15492 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15474 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } + # + # source://prism//lib/prism/node.rb#15500 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15559 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15544 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15505 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#15549 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#15512 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#15554 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#15528 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15564 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15569 + def type; end + end +end + +# Flags for symbol nodes. +# +# source://prism//lib/prism/node.rb#16843 +module Prism::SymbolFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#16848 +Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# source://prism//lib/prism/node.rb#16851 +Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#16845 +Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://prism//lib/prism/node.rb#15592 +class Prism::SymbolNode < ::Prism::Node + # Initialize a new SymbolNode node. + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://prism//lib/prism/node.rb#15594 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15727 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15606 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15611 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15706 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15680 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15621 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15616 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode + # + # source://prism//lib/prism/node.rb#15626 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::SymbolNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15611 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } + # + # source://prism//lib/prism/node.rb#15634 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15644 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15649 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15639 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15711 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#15696 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#15654 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15716 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15693 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # source://prism//lib/prism/node.rb#15701 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # source://prism//lib/prism/node.rb#15667 + sig { returns(T.nilable(Prism::Location)) } + def value_loc; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15721 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# source://prism//lib/prism/parse_result.rb#799 +class Prism::Token + # Create a new token object with the given type, value, and location. + # + # @return [Token] a new instance of Token + # + # source://prism//lib/prism/parse_result.rb#811 + sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } + def initialize(source, type, value, location); end + + # Returns true if the given other token is equal to this token. + # + # source://prism//lib/prism/parse_result.rb#846 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Implement the hash pattern matching interface for Token. + # + # source://prism//lib/prism/parse_result.rb#819 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this token. + # + # source://prism//lib/prism/parse_result.rb#853 + def inspect; end + + # A Location object representing the location of this token in the source. + # + # source://prism//lib/prism/parse_result.rb#824 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # source://prism//lib/prism/parse_result.rb#831 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The type of token that this token is. + # + # source://prism//lib/prism/parse_result.rb#805 + sig { returns(Symbol) } + def type; end + + # A byteslice of the source that this token represents. + # + # source://prism//lib/prism/parse_result.rb#808 + sig { returns(String) } + def value; end + + private + + # The Source object that represents the source this token came from. + # + # source://prism//lib/prism/parse_result.rb#801 + sig { returns(Prism::Source) } + def source; end +end + +# This module is responsible for converting the prism syntax tree into other +# syntax trees. +# +# source://prism//lib/prism/translation.rb#6 +module Prism::Translation; end + +# This class is the entry-point for converting a prism syntax tree into the +# whitequark/parser gem's syntax tree. It inherits from the base parser for +# the parser gem, and overrides the parse* methods to parse with prism and +# then translate. +# +# source://prism//lib/prism/translation/parser.rb#16 +class Prism::Translation::Parser < ::Parser::Base + # The default encoding for Ruby files is UTF-8. + # + # source://prism//lib/prism/translation/parser.rb#41 + def default_encoding; end + + # Parses a source buffer and returns the AST. + # + # source://prism//lib/prism/translation/parser.rb#49 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # source://prism//lib/prism/translation/parser.rb#62 + def parse_with_comments(source_buffer); end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. + # + # source://prism//lib/prism/translation/parser.rb#79 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + # Since prism resolves num params for us, we don't need to support this + # kind of logic here. + # + # source://prism//lib/prism/translation/parser.rb#105 + def try_declare_numparam(node); end + + # source://prism//lib/prism/translation/parser.rb#36 + sig { overridable.returns(Integer) } + def version; end + + # source://prism//lib/prism/translation/parser.rb#45 + def yyerror; end + + private + + # Build the parser gem AST from the prism AST. + # + # source://prism//lib/prism/translation/parser.rb#263 + def build_ast(program, offset_cache); end + + # Build the parser gem comments from the prism comments. + # + # source://prism//lib/prism/translation/parser.rb#268 + def build_comments(comments, offset_cache); end + + # Prism deals with offsets in bytes, while the parser gem deals with + # offsets in characters. We need to handle this conversion in order to + # build the parser gem AST. + # + # If the bytesize of the source is the same as the length, then we can + # just use the offset directly. Otherwise, we build an array where the + # index is the byte offset and the value is the character offset. + # + # source://prism//lib/prism/translation/parser.rb#246 + def build_offset_cache(source); end + + # Build a range from a prism location. + # + # source://prism//lib/prism/translation/parser.rb#280 + def build_range(location, offset_cache); end + + # Build the parser gem tokens from the prism tokens. + # + # source://prism//lib/prism/translation/parser.rb#275 + def build_tokens(tokens, offset_cache); end + + # Converts the version format handled by Parser to the format handled by Prism. + # + # source://prism//lib/prism/translation/parser.rb#289 + def convert_for_prism(version); end + + # Build a diagnostic from the given prism parse error. + # + # source://prism//lib/prism/translation/parser.rb#124 + def error_diagnostic(error, offset_cache); end + + # If there was a error generated during the parse, then raise an + # appropriate syntax error. Otherwise return the result. + # + # source://prism//lib/prism/translation/parser.rb#224 + def unwrap(result, offset_cache); end + + # This is a hook to allow consumers to disable some errors if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#113 + def valid_error?(error); end + + # This is a hook to allow consumers to disable some warnings if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#119 + def valid_warning?(warning); end + + # Build a diagnostic from the given prism parse warning. + # + # source://prism//lib/prism/translation/parser.rb#197 + def warning_diagnostic(warning, offset_cache); end +end + +# This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser33.rb#6 +class Prism::Translation::Parser33 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser33.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser34.rb#6 +class Prism::Translation::Parser34 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser34.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# A visitor that knows how to convert a prism syntax tree into the +# whitequark/parser gem's syntax tree. +# +# source://prism//lib/prism/translation/parser/compiler.rb#8 +class Prism::Translation::Parser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given parser, offset cache, and + # options. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/parser/compiler.rb#39 + def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # The Parser::Builders::Default instance that is being used to build the + # AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#18 + def builder; end + + # The types of values that can be forwarded in the current scope. + # + # source://prism//lib/prism/translation/parser/compiler.rb#29 + def forwarding; end + + # Whether or not the current node is in a destructure. + # + # source://prism//lib/prism/translation/parser/compiler.rb#32 + def in_destructure; end + + # Whether or not the current node is in a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#35 + def in_pattern; end + + # The offset cache that is used to map between byte and character + # offsets in the file. + # + # source://prism//lib/prism/translation/parser/compiler.rb#26 + def offset_cache; end + + # The Parser::Base instance that is being used to build the AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#14 + def parser; end + + # The Parser::Source::Buffer instance that is holding a reference to the + # source code. + # + # source://prism//lib/prism/translation/parser/compiler.rb#22 + def source_buffer; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#58 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#52 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#64 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#70 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#105 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#76 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#82 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#111 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#160 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#172 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#178 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#216 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#222 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#227 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#233 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/parser/compiler.rb#238 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#247 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#352 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#259 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#333 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#371 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#390 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#402 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#421 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#408 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#434 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#473 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#463 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#483 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#447 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#493 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#453 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#524 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#514 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#534 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#590 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#550 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#580 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#600 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#610 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#570 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#499 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#544 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#508 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#619 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#666 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#678 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#684 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#694 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#700 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#706 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#712 + def visit_find_pattern_node(node); end + + # 0..5 + # ^^^^ + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1475 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#724 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#730 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#748 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#754 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#763 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#801 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#791 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#811 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#775 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#821 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#781 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#827 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#837 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#855 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#897 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#903 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#909 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#915 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#959 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#941 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#977 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#995 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1032 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1022 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1042 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1006 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1052 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1012 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1058 + def visit_integer_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1064 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1064 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1079 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1113 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1123 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1137 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1143 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1149 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1158 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1167 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1219 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1209 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1229 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1193 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1239 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1199 + def visit_local_variable_write_node(node); end + + # /foo/ + # ^^^^^ + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1509 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1249 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1259 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1269 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1280 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1286 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1297 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1307 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1330 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1342 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1348 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1358 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1364 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1370 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1376 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1382 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1388 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1427 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1437 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1444 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1449 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1459 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1469 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1475 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1497 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1503 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1509 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1535 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1541 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1547 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1565 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1574 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1580 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1589 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1601 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1606 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1612 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1624 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1630 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1636 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1648 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1661 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1667 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1709 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1732 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1764 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1770 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1779 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1809 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1831 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1849 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1871 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1902 + def visit_yield_node(node); end + + private + + # The parser gem automatically converts \r\n to \n, meaning our offsets + # need to be adjusted to always subtract 1 from the length. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2045 + def chomped_bytesize(line); end + + # Initialize a new compiler with the given option overrides, used to + # visit a subtree with the given options. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1916 + def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # When *, **, &, or ... are used as an argument in a method call, we + # check if they were allowed by the current context. To determine that + # we build this lookup table. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1923 + def find_forwarding(node); end + + # Returns the set of targets for a MultiTargetNode or a MultiWriteNode. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1936 + def multi_target_elements(node); end + + # Negate the value of a numeric node. This is a special case where you + # have a negative sign on one line and then a number on the next line. + # In normal Ruby, this will always be a method call. The parser gem, + # however, marks this as a numeric literal. We have to massage the tree + # here to get it into the correct form. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1948 + def numeric_negate(message_loc, receiver); end + + # Blocks can have a special set of parameters that automatically expand + # when given arrays if they have a single required parameter and no + # other parameters. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1962 + def procarg0?(parameters); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1979 + def srange(location); end + + # Constructs a new source range by finding the given tokens between the + # given start offset and end offset. If the needle is not found, it + # returns nil. Importantly it does not search past newlines or comments. + # + # Note that end_offset is allowed to be nil, in which case this will + # search until the end of the string. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1994 + def srange_find(start_offset, end_offset, tokens); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1984 + def srange_offsets(start_offset, end_offset); end + + # Transform a location into a token that the parser gem expects. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2004 + def token(location); end + + # Visit a block node on a call. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2009 + def visit_block(call, block); end + + # Visit a heredoc that can be either a string or an xstring. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2051 + def visit_heredoc(node); end + + # Visit a numeric node and account for the optional sign. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2123 + def visit_numeric(node, value); end + + # Within the given block, track that we're within a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2135 + def within_pattern; end +end + +# Raised when the tree is malformed or there is a bug in the compiler. +# +# source://prism//lib/prism/translation/parser/compiler.rb#10 +class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end + +# Locations in the parser gem AST are generated using this class. We +# store a reference to its constant to make it slightly faster to look +# up. +# +# source://prism//lib/prism/translation/parser/compiler.rb#1976 +Prism::Translation::Parser::Compiler::Range = Parser::Source::Range + +# source://prism//lib/prism/translation/parser.rb#17 +Prism::Translation::Parser::Diagnostic = Parser::Diagnostic + +# Accepts a list of prism tokens and converts them into the expected +# format for the parser gem. +# +# source://prism//lib/prism/translation/parser/lexer.rb#8 +class Prism::Translation::Parser::Lexer + # Initialize the lexer with the given source buffer, prism tokens, and + # offset cache. + # + # @return [Lexer] a new instance of Lexer + # + # source://prism//lib/prism/translation/parser/lexer.rb#217 + def initialize(source_buffer, lexed, offset_cache); end + + # An array of tuples that contain prism tokens and their associated lex + # state when they were lexed. + # + # source://prism//lib/prism/translation/parser/lexer.rb#210 + def lexed; end + + # A hash that maps offsets in bytes to offsets in characters. + # + # source://prism//lib/prism/translation/parser/lexer.rb#213 + def offset_cache; end + + # The Parser::Source::Buffer that the tokens were lexed from. + # + # source://prism//lib/prism/translation/parser/lexer.rb#206 + def source_buffer; end + + # Convert the prism tokens into the expected format for the parser gem. + # + # source://prism//lib/prism/translation/parser/lexer.rb#227 + def to_a; end + + private + + # Parse a complex from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#409 + def parse_complex(value); end + + # Parse a float from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#402 + def parse_float(value); end + + # Parse an integer from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#395 + def parse_integer(value); end + + # Parse a rational from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#424 + def parse_rational(value); end +end + +# These constants represent flags in our lex state. We really, really +# don't want to be using them and we really, really don't want to be +# exposing them as part of our public API. Unfortunately, we don't have +# another way of matching the exact tokens that the parser gem expects +# without them. We should find another way to do this, but in the +# meantime we'll hide them from the documentation and mark them as +# private constants. +# +# source://prism//lib/prism/translation/parser/lexer.rb#187 +Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#188 +Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# It is used to determine whether `do` is of the token type `kDO` or `kDO_LAMBDA`. +# +# NOTE: In edge cases like `-> (foo = -> (bar) {}) do end`, please note that `kDO` is still returned +# instead of `kDO_LAMBDA`, which is expected: https://github.com/ruby/prism/pull/3046 +# +# source://prism//lib/prism/translation/parser/lexer.rb#194 +Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem. +# The following token types are listed as those classified as `tLPAREN`. +# +# source://prism//lib/prism/translation/parser/lexer.rb#198 +Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://prism//lib/prism/translation/parser/lexer.rb#223 +Prism::Translation::Parser::Lexer::Range = Parser::Source::Range + +# The direct translating of types between the two lexers. +# +# source://prism//lib/prism/translation/parser/lexer.rb#10 +Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) + +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# source://prism//lib/prism/translation/parser.rb#23 +class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic + # Initialize a new diagnostic with the given message and location. + # + # @return [PrismDiagnostic] a new instance of PrismDiagnostic + # + # source://prism//lib/prism/translation/parser.rb#28 + def initialize(message, level, reason, location); end + + # This is the cached message coming from prism. + # + # source://prism//lib/prism/translation/parser.rb#25 + def message; end +end + +# source://prism//lib/prism/translation/parser.rb#34 +Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# This class provides a compatibility layer between prism and Ripper. It +# functions by parsing the entire tree first and then walking it and +# executing each of the Ripper callbacks as it goes. To use this class, you +# treat `Prism::Translation::Ripper` effectively as you would treat the +# `Ripper` class. +# +# Note that this class will serve the most common use cases, but Ripper's +# API is extensive and undocumented. It relies on reporting the state of the +# parser at any given time. We do our best to replicate that here, but +# because it is a different architecture it is not possible to perfectly +# replicate the behavior of Ripper. +# +# The main known difference is that we may omit dispatching some events in +# some cases. This impacts the following events: +# +# - on_assign_error +# - on_comma +# - on_ignored_nl +# - on_ignored_sp +# - on_kw +# - on_label_end +# - on_lbrace +# - on_lbracket +# - on_lparen +# - on_nl +# - on_op +# - on_operator_ambiguous +# - on_rbrace +# - on_rbracket +# - on_rparen +# - on_semicolon +# - on_sp +# - on_symbeg +# - on_tstring_beg +# - on_tstring_end +# +# source://prism//lib/prism/translation/ripper.rb#43 +class Prism::Translation::Ripper < ::Prism::Compiler + # Create a new Translation::Ripper object with the given source. + # + # @return [Ripper] a new instance of Ripper + # + # source://prism//lib/prism/translation/ripper.rb#444 + def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # The current column number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#441 + def column; end + + # True if the parser encountered an error during parsing. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#457 + sig { returns(T::Boolean) } + def error?; end + + # The filename of the source being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#435 + def filename; end + + # The current line number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#438 + def lineno; end + + # Parse the source and return the result. + # + # source://prism//lib/prism/translation/ripper.rb#462 + sig { returns(T.untyped) } + def parse; end + + # The source that is being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#432 + def source; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#561 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#551 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#585 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#605 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#796 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#615 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#775 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#803 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#816 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#825 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#832 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#896 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#902 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode. + # + # source://prism//lib/prism/translation/ripper.rb#908 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#944 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ripper.rb#958 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#982 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1194 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1002 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1172 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1216 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1238 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1263 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1286 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1273 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1299 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1352 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1338 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1366 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1317 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1380 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1327 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1422 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1408 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1436 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1523 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1457 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1509 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1537 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1551 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1480 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1387 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1450 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1397 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1560 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1607 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1614 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1630 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1651 + def visit_embedded_variable_node(node); end + + # Visit an EnsureNode node. + # + # source://prism//lib/prism/translation/ripper.rb#1662 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1680 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1687 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1712 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1726 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1732 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1749 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1756 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1766 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1815 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1801 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1829 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1780 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1843 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1790 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1850 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1865 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1907 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1943 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1949 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#1954 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1961 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1996 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1979 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2013 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2030 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2072 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2058 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2086 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2040 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2100 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2047 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2107 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2113 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2132 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2151 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2179 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2192 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2222 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2229 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2234 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2246 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ripper.rb#2260 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2352 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2338 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2366 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2320 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2380 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2327 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2387 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2402 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2411 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2420 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#2426 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2432 + def visit_module_node(node); end + + # (foo, bar), bar = qux + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2449 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2503 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2523 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2537 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2544 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2553 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2558 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2565 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2575 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2585 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2595 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2622 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2636 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2645 + def visit_pinned_variable_node(node); end + + # END {} + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2651 + def visit_post_execution_node(node); end + + # BEGIN {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2666 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/ripper.rb#2680 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2691 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2705 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2711 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2718 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2740 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2747 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2754 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2764 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2822 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2834 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2844 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2858 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ripper.rb#2864 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2870 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2880 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2887 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2894 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2907 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/ripper.rb#2912 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2929 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3061 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3082 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3106 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3113 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3125 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3153 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3177 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3198 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3222 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3245 + def visit_yield_node(node); end + + private + + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper.rb#3385 + def _dispatch_0; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def _dispatch_1(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def _dispatch_2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def _dispatch_3(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def _dispatch_4(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def _dispatch_5(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def _dispatch_7(_, _, _, _, _, _, _); end + + # This method is responsible for updating lineno and column information + # to reflect the current node. + # + # This method could be drastically improved with some caching on the start + # of every line, but for now it's good enough. + # + # source://prism//lib/prism/translation/ripper.rb#3375 + def bounds(location); end + + # Returns true if the given node is a command node. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#1163 + def command?(node); end + + # This method is called when the parser found syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#3413 + def compile_error(msg); end + + # This method is provided by the Ripper C extension. It is called when a + # string needs to be dedented because of a tilde heredoc. It is expected + # that it will modify the string in place and return the number of bytes + # that were removed. + # + # source://prism//lib/prism/translation/ripper.rb#3428 + def dedent_string(string, width); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_BEGIN(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_CHAR(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_END(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on___end__(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_alias_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_aref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_aref_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_arg_ambiguous(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_arg_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_args_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_args_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_args_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_args_forward; end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_array(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_aryptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_assign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_assign_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_assoc_new(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_assoc_splat(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_assoclist_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_backref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_backtick(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_bare_assoc_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_begin(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_binary(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_block_var(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_blockarg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_bodystmt(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_brace_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_break(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_call(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_case(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_class(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_class_name_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_comma(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_command(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_command_call(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_comment(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_const(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_const_path_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_const_path_ref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_cvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_def(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_defined(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_defs(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_do_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_dot2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_dot3(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_dyna_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_else(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_elsif(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embdoc(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embdoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embdoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embexpr_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embexpr_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ensure(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_excessed_comma; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_fcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_field(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_float(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_fndptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_for(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_gvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_heredoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_heredoc_dedent(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_heredoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_hshptn(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ident(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_if(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_if_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_ifop(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ignored_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ignored_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_imaginary(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_in(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_int(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ivar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_kw(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_kwrest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_label(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_label_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_lambda(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_lbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_lbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_lparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_magic_comment(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_massign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_method_add_arg(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_method_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mlhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mlhs_add_post(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mlhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_mlhs_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_module(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mrhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mrhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_mrhs_new_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_next(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_nokw_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_op(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_opassign(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_operator_ambiguous(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_param_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_params(_, _, _, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_parse_error(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_period(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_program(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_qsymbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_qsymbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_qwords_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_qwords_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rational(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_redo; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_regexp_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_regexp_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_regexp_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_regexp_literal(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_rescue(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_rescue_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_retry; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_return(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_return0; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_sclass(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_semicolon(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_stmts_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_string_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_string_concat(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_string_content; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_string_dvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_string_embexpr(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_string_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_super(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_symbeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_symbol_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_symbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_symbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tlambda(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tlambeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_top_const_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_top_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tstring_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tstring_content(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tstring_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_unary(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_undef(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_unless(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_unless_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_until(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_until_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_var_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_var_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_var_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_vcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_void_stmt; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_when(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_while(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_while_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_word_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_words_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_words_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_words_sep(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_xstring_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_xstring_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_xstring_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_yield(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_yield0; end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_zsuper; end + + # Lazily initialize the parse result. + # + # source://prism//lib/prism/translation/ripper.rb#3271 + def result; end + + # Returns true if there is a comma between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3280 + def trailing_comma?(left, right); end + + # Visit one side of an alias global variable node. + # + # source://prism//lib/prism/translation/ripper.rb#570 + def visit_alias_global_variable_node_value(node); end + + # Visit a list of elements, like the elements of an array or arguments. + # + # source://prism//lib/prism/translation/ripper.rb#756 + def visit_arguments(elements); end + + # Visit the clauses of a begin node to form an on_bodystmt call. + # + # source://prism//lib/prism/translation/ripper.rb#840 + def visit_begin_node_clauses(location, node, allow_newline); end + + # Visit the body of a structure that can have either a set of statements + # or statements wrapped in rescue/else/ensure. + # + # source://prism//lib/prism/translation/ripper.rb#875 + def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end + + # Visit the arguments and block of a call node and return the arguments + # and block as they should be used. + # + # source://prism//lib/prism/translation/ripper.rb#1136 + def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end + + # Visit a constant path that is part of a write node. + # + # source://prism//lib/prism/translation/ripper.rb#1489 + def visit_constant_path_write_node_target(node); end + + # Visit a destructured positional parameter node. + # + # source://prism//lib/prism/translation/ripper.rb#2609 + def visit_destructured_parameter_node(node); end + + # Visit a string that is expressed using a <<~ heredoc. + # + # source://prism//lib/prism/translation/ripper.rb#2980 + def visit_heredoc_node(parts, base); end + + # Ripper gives back the escaped string content but strips out the common + # leading whitespace. Prism gives back the unescaped string content and + # a location for the escaped string content. Unfortunately these don't + # work well together, so here we need to re-derive the common leading + # whitespace. + # + # source://prism//lib/prism/translation/ripper.rb#2955 + def visit_heredoc_node_whitespace(parts); end + + # Visit a heredoc node that is representing a string. + # + # source://prism//lib/prism/translation/ripper.rb#3026 + def visit_heredoc_string_node(node); end + + # Visit a heredoc node that is representing an xstring. + # + # source://prism//lib/prism/translation/ripper.rb#3043 + def visit_heredoc_x_string_node(node); end + + # Visit the targets of a multi-target node. + # + # source://prism//lib/prism/translation/ripper.rb#2462 + def visit_multi_target_node_targets(lefts, rest, rights, skippable); end + + # Visit a node that represents a number. We need to explicitly handle the + # unary - operator. + # + # source://prism//lib/prism/translation/ripper.rb#3319 + def visit_number_node(node); end + + # Visit a pattern within a pattern match. This is used to bypass the + # parenthesis node that can be used to wrap patterns. + # + # source://prism//lib/prism/translation/ripper.rb#595 + def visit_pattern_node(node); end + + # Visit the list of statements of a statements node. We support nil + # statements in the list. This would normally not be allowed by the + # structure of the prism parse tree, but we manually add them here so that + # we can mirror Ripper's void stmt. + # + # source://prism//lib/prism/translation/ripper.rb#2921 + def visit_statements_node_body(body); end + + # Visit an individual part of a string-like node. + # + # source://prism//lib/prism/translation/ripper.rb#2211 + def visit_string_content(part); end + + # Visit the string content of a particular node. This method is used to + # split into the various token types. + # + # source://prism//lib/prism/translation/ripper.rb#3292 + def visit_token(token, allow_keywords = T.unsafe(nil)); end + + # Dispatch a words_sep event that contains the space between the elements + # of list literals. + # + # source://prism//lib/prism/translation/ripper.rb#745 + def visit_words_sep(opening_loc, previous, current); end + + # Visit a node that represents a write value. This is used to handle the + # special case of an implicit array that is generated without brackets. + # + # source://prism//lib/prism/translation/ripper.rb#3337 + def visit_write_value(node); end + + # Returns true if there is a semicolon between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3285 + def void_stmt?(left, right, allow_newline); end + + # This method is called when weak warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # source://prism//lib/prism/translation/ripper.rb#3404 + def warn(fmt, *args); end + + # This method is called when strong warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # source://prism//lib/prism/translation/ripper.rb#3409 + def warning(fmt, *args); end + + class << self + # Tokenizes the Ruby program and returns an array of an array, + # which is formatted like + # [[lineno, column], type, token, state]. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] + # + # source://prism//lib/prism/translation/ripper.rb#72 + def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses the given Ruby program read from +src+. + # +src+ must be a String or an IO or a object with a #gets method. + # + # source://prism//lib/prism/translation/ripper.rb#46 + def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # Returns more readable tree rather than Ripper.sexp_raw. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [[:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], + # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#381 + def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp_raw("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#416 + def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + end +end + +# A list of all of the Ruby binary operators. +# +# source://prism//lib/prism/translation/ripper.rb#337 +Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# This array contains name of all ripper events. +# +# source://prism//lib/prism/translation/ripper.rb#289 +Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) + +# A list of all of the Ruby keywords. +# +# source://prism//lib/prism/translation/ripper.rb#292 +Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) + +# This array contains name of parser events. +# +# source://prism//lib/prism/translation/ripper.rb#283 +Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the parser events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#84 +Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This array contains name of scanner events. +# +# source://prism//lib/prism/translation/ripper.rb#286 +Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the scanner events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#227 +Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#10 +class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper/sexp.rb#13 + def error; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_BEGIN(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_CHAR(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_END(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on___end__(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_forward(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_array(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aryptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backref(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backtick(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_begin(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_binary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_block_var(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_blockarg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bodystmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_brace_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_break(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_case(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class_name_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comma(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comment(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_const(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_cvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_def(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defined(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defs(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_do_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot2(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot3(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_else(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_elsif(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ensure(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_float(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fndptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_for(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_gvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hshptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ident(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ifop(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_imaginary(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_in(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_int(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ivar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_kw(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_lambda(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_magic_comment(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_massign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_module(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_next(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_nokw_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_op(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_opassign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_param_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_params(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_period(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_program(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qsymbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qwords_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rational(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_redo(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_retry(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_sclass(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_semicolon(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_concat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_content(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_dvar(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_super(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambda(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_content(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_undef(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_vcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_void_stmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_when(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_sep(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_zsuper(*args); end + + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def compile_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#17 + def dedent_element(e, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#24 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_parse_error(mesg); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#74 +class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def _dispatch_event_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_args_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#79 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#109 + def on_mlhs_add_post(list, post); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#105 + def on_mlhs_add_star(list, star); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#101 + def on_mlhs_paren(list); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_string_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_word_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_words_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_xstring_new; end +end + +# This module is the entry-point for converting a prism syntax tree into the +# seattlerb/ruby_parser gem's syntax tree. +# +# source://prism//lib/prism/translation/ruby_parser.rb#14 +class Prism::Translation::RubyParser + # Parse the given source and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1598 + def parse(source, filepath = T.unsafe(nil)); end + + # Parse the given file and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1604 + def parse_file(filepath); end + + private + + # Translate the given parse result and filepath into the + # seattlerb/ruby_parser gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1626 + def translate(result, filepath); end + + class << self + # Parse the given source and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1611 + def parse(source, filepath = T.unsafe(nil)); end + + # Parse the given file and translate it into the seattlerb/ruby_parser + # gem's Sexp format. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1617 + def parse_file(filepath); end + end +end + +# A prism visitor that builds Sexp objects. +# +# source://prism//lib/prism/translation/ruby_parser.rb#16 +class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given file name. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/ruby_parser.rb#31 + def initialize(file, in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # This is the name of the file that we are compiling. We set it on every + # Sexp object that is generated, and also use it to compile __FILE__ + # nodes. + # + # source://prism//lib/prism/translation/ruby_parser.rb#20 + def file; end + + # Class variables will change their type based on if they are inside of + # a method definition or not, so we need to track that state. + # + # source://prism//lib/prism/translation/ruby_parser.rb#24 + def in_def; end + + # Some nodes will change their representation if they are inside of a + # pattern, so we need to track that state. + # + # source://prism//lib/prism/translation/ruby_parser.rb#28 + def in_pattern; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#45 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#39 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#51 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#57 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#108 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#75 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#85 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#114 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#123 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#133 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#139 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#172 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#180 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # source://prism//lib/prism/translation/ruby_parser.rb#185 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#191 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ruby_parser.rb#196 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#236 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#304 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#254 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#294 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#314 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#337 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#343 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#355 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#349 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#361 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#402 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#396 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#408 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#381 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#414 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#390 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#447 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#441 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#453 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#490 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#465 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#484 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#496 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#502 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#478 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#426 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#459 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#435 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#518 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#549 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#555 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#561 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#569 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#575 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#581 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#587 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#593 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#603 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#609 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#615 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#621 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#630 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#657 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#651 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#663 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#636 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#669 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#645 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#675 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#681 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#702 + def visit_if_node(node); end + + # 1i + # + # source://prism//lib/prism/translation/ruby_parser.rb#707 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#713 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#718 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#723 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#749 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#736 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#762 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#775 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#805 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#799 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#811 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#784 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#817 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # @foo, @bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#793 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#823 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#829 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#846 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#861 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#868 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#875 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#947 + def visit_it_local_variable_read_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#953 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#962 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#967 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1010 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1004 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1016 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#985 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1022 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # foo, bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#998 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1028 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1034 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1040 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1046 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1053 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1059 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1079 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1089 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1113 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1126 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1132 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1138 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1144 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1150 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1156 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1162 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1180 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1218 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1228 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1234 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1243 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1248 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1253 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1259 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1281 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1287 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1293 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1299 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1305 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1311 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1317 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1337 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1343 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1352 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1365 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1370 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1376 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1384 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1391 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1397 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1409 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1418 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1430 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1442 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1456 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1462 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1468 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1478 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1487 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1493 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1502 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1508 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1524 + def visit_yield_node(node); end + + private + + # If a class variable is written within a method definition, it has a + # different type than everywhere else. + # + # source://prism//lib/prism/translation/ruby_parser.rb#420 + def class_variable_write_type; end + + # Create a new compiler with the given options. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1531 + def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # Call nodes with operators following them will either be op_asgn or + # op_asgn2 nodes. That is determined by their call operator and their + # right-hand side. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ruby_parser.rb#325 + def op_asgn?(node); end + + # Call nodes with operators following them can use &. as an operator, + # which changes their type by prefixing "safe_". + # + # source://prism//lib/prism/translation/ruby_parser.rb#331 + def op_asgn_type(node, type); end + + # Create a new Sexp object from the given prism node and arguments. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1536 + def s(node, *arguments); end + + # Visit a block node, which will modify the AST by wrapping the given + # visited node in an iter node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1546 + def visit_block(node, sexp, block); end + + # def foo((bar, baz)); end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1195 + def visit_destructured_parameter(node); end + + # Visit the interpolated content of the string-like node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#882 + def visit_interpolated_parts(parts); end + + # Pattern constants get wrapped in another layer of :const. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1567 + def visit_pattern_constant(node); end + + # If the bounds of a range node are empty parentheses, then they do not + # get replaced by their usual s(:nil), but instead are s(:begin). + # + # source://prism//lib/prism/translation/ruby_parser.rb#1271 + def visit_range_bounds_node(node); end + + # Visit the value of a write, which will be on the right-hand side of + # a write operator. Because implicit arrays can have splats, those could + # potentially be wrapped in an svalue node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1581 + def visit_write_value(node); end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://prism//lib/prism/node.rb#15741 +class Prism::TrueNode < ::Prism::Node + # Initialize a new TrueNode node. + # + # @return [TrueNode] a new instance of TrueNode + # + # source://prism//lib/prism/node.rb#15743 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15800 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15751 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15756 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15766 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15761 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode + # + # source://prism//lib/prism/node.rb#15771 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15756 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#15779 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15784 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15789 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15794 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15809 +class Prism::UndefNode < ::Prism::Node + # Initialize a new UndefNode node. + # + # @return [UndefNode] a new instance of UndefNode + # + # source://prism//lib/prism/node.rb#15811 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, names, keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15885 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15821 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15836 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15831 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode + # + # source://prism//lib/prism/node.rb#15841 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#15849 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15869 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15864 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15857 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # source://prism//lib/prism/node.rb#15854 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } + def names; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15874 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15879 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15900 +class Prism::UnlessNode < ::Prism::Node + # Initialize a new UnlessNode node. + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#15902 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16051 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15916 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15935 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15926 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the else clause of the unless node. This method is deprecated in + # favor of #else_clause. + # + # source://prism//lib/prism/node_ext.rb#503 + def consequent; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?else_clause: ElseNode?, ?end_keyword_loc: Location?) -> UnlessNode + # + # source://prism//lib/prism/node.rb#15940 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#15948 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#16001 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#16030 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword, if present. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#16007 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16035 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16020 + sig { returns(String) } + def keyword; end + + # The location of the `unless` keyword. + # + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#15959 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#97 + def newline_flag!(lines); end + + # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # unless cond then bar end + # ^^^^ + # + # bar unless cond + # ^^^^ + # + # source://prism//lib/prism/node.rb#15972 + sig { returns(Prism::Node) } + def predicate; end + + # The body of statements that will executed if the unless condition is + # falsey. Will be `nil` if no body is provided. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#15995 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#16025 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword, if present. + # + # unless cond then bar end + # ^^^^ + # + # source://prism//lib/prism/node.rb#15978 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16040 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16045 + def type; end + end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16069 +class Prism::UntilNode < ::Prism::Node + # Initialize a new UntilNode node. + # + # @return [UntilNode] a new instance of UntilNode + # + # source://prism//lib/prism/node.rb#16071 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16176 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16083 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16119 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16088 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#16155 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#16131 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16101 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16093 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode + # + # source://prism//lib/prism/node.rb#16106 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::UntilNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16088 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } + # + # source://prism//lib/prism/node.rb#16114 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16160 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16150 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16124 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#103 + def newline_flag!(lines); end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#16144 + sig { returns(Prism::Node) } + def predicate; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16147 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16165 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16170 + def type; end + end +end + +# The version constant is set by reading the result of calling pm_version. +Prism::VERSION = T.let(T.unsafe(nil), String) + +# A visitor is a class that provides a default implementation for every accept +# method defined on the nodes. This means it can walk a tree without the +# caller needing to define any special handling. This allows you to handle a +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == "foo" +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# source://prism//lib/prism/visitor.rb#54 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # Visit a CaseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # Visit a InNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a ItLocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ItLocalVariableReadNode).void } + def visit_it_local_variable_read_node(node); end + + # Visit a ItParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ItParametersNode).void } + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SelfNode).void } + def visit_self_node(node); end + + # Visit a ShareableConstantNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ShareableConstantNode).void } + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#16192 +class Prism::WhenNode < ::Prism::Node + # Initialize a new WhenNode node. + # + # @return [WhenNode] a new instance of WhenNode + # + # source://prism//lib/prism/node.rb#16194 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16294 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16206 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16211 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16224 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16216 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#16249 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode + # + # source://prism//lib/prism/node.rb#16229 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16211 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } + # + # source://prism//lib/prism/node.rb#16237 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16278 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16268 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16242 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16265 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#16273 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#16252 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16283 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16288 + def type; end + end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16311 +class Prism::WhileNode < ::Prism::Node + # Initialize a new WhileNode node. + # + # @return [WhileNode] a new instance of WhileNode + # + # source://prism//lib/prism/node.rb#16313 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16418 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16325 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16361 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16330 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#16397 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#16373 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16343 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16335 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode + # + # source://prism//lib/prism/node.rb#16348 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhileNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16330 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } + # + # source://prism//lib/prism/node.rb#16356 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16402 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16392 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16366 + sig { returns(Prism::Location) } + def keyword_loc; end + + # source://prism//lib/prism/parse_result/newlines.rb#109 + def newline_flag!(lines); end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#16386 + sig { returns(Prism::Node) } + def predicate; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16389 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16407 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16412 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#16432 +class Prism::XStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # Initialize a new XStringNode node. + # + # @return [XStringNode] a new instance of XStringNode + # + # source://prism//lib/prism/node.rb#16434 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).void + end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16544 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16446 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16451 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#16523 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#16503 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16461 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16456 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#16518 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#16496 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode + # + # source://prism//lib/prism/node.rb#16466 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::XStringNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16451 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } + # + # source://prism//lib/prism/node.rb#16474 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16484 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16479 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16528 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16513 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#16489 + sig { returns(Prism::Location) } + def opening_loc; end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # source://prism//lib/prism/node_ext.rb#90 + sig { returns(Prism::InterpolatedXStringNode) } + def to_interpolated; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16533 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#16510 + sig { returns(String) } + def unescaped; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16538 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#16558 +class Prism::YieldNode < ::Prism::Node + # Initialize a new YieldNode node. + # + # @return [YieldNode] a new instance of YieldNode + # + # source://prism//lib/prism/node.rb#16560 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16674 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16572 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#16627 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16577 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16589 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16582 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode + # + # source://prism//lib/prism/node.rb#16594 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16577 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } + # + # source://prism//lib/prism/node.rb#16602 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16658 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16643 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16607 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#16648 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#16614 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#16653 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#16630 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16663 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#16668 + def type; end + end +end diff --git a/sorbet/rbi/gems/psych@5.1.2.rbi b/sorbet/rbi/gems/psych@5.1.2.rbi index b3dda12..f3d4c02 100644 --- a/sorbet/rbi/gems/psych@5.1.2.rbi +++ b/sorbet/rbi/gems/psych@5.1.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `psych` gem. # Please instead update this file by running `bin/tapioca gem psych`. + class Object < ::BasicObject include ::Kernel include ::PP::ObjectMixin diff --git a/sorbet/rbi/gems/racc@1.7.3.rbi b/sorbet/rbi/gems/racc@1.8.1.rbi similarity index 66% rename from sorbet/rbi/gems/racc@1.7.3.rbi rename to sorbet/rbi/gems/racc@1.8.1.rbi index ef9b9bf..5d4f161 100644 --- a/sorbet/rbi/gems/racc@1.7.3.rbi +++ b/sorbet/rbi/gems/racc@1.8.1.rbi @@ -4,35 +4,36 @@ # This is an autogenerated file for types exported from the `racc` gem. # Please instead update this file by running `bin/tapioca gem racc`. -# source://racc//lib/racc/parser.rb#23 + +# source://racc//lib/racc/parser.rb#19 ParseError = Racc::ParseError # source://racc//lib/racc/info.rb#17 Racc::Copyright = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#188 +# source://racc//lib/racc/parser.rb#184 class Racc::Parser - # source://racc//lib/racc/parser.rb#283 + # source://racc//lib/racc/parser.rb#279 def _racc_do_parse_rb(arg, in_debug); end - # source://racc//lib/racc/parser.rb#483 + # source://racc//lib/racc/parser.rb#479 def _racc_do_reduce(arg, act); end # common # - # source://racc//lib/racc/parser.rb#386 + # source://racc//lib/racc/parser.rb#382 def _racc_evalact(act, arg); end - # source://racc//lib/racc/parser.rb#236 + # source://racc//lib/racc/parser.rb#232 def _racc_init_sysvars; end - # source://racc//lib/racc/parser.rb#224 + # source://racc//lib/racc/parser.rb#220 def _racc_setup; end - # source://racc//lib/racc/parser.rb#333 + # source://racc//lib/racc/parser.rb#329 def _racc_yyparse_rb(recv, mid, arg, c_debug); end - # source://racc//lib/racc/parser.rb#266 + # source://racc//lib/racc/parser.rb#262 def do_parse; end # The method to fetch next token. @@ -46,7 +47,7 @@ class Racc::Parser # # @raise [NotImplementedError] # - # source://racc//lib/racc/parser.rb#279 + # source://racc//lib/racc/parser.rb#275 def next_token; end # This method is called when a parse error is found. @@ -66,88 +67,92 @@ class Racc::Parser # # @raise [ParseError] # - # source://racc//lib/racc/parser.rb#539 + # source://racc//lib/racc/parser.rb#535 def on_error(t, val, vstack); end - # source://racc//lib/racc/parser.rb#588 + # source://racc//lib/racc/parser.rb#584 def racc_accept; end - # source://racc//lib/racc/parser.rb#593 + # source://racc//lib/racc/parser.rb#589 def racc_e_pop(state, tstack, vstack); end - # source://racc//lib/racc/parser.rb#600 + # source://racc//lib/racc/parser.rb#596 def racc_next_state(curstate, state); end - # source://racc//lib/racc/parser.rb#606 + # source://racc//lib/racc/parser.rb#602 def racc_print_stacks(t, v); end - # source://racc//lib/racc/parser.rb#615 + # source://racc//lib/racc/parser.rb#611 def racc_print_states(s); end # For debugging output # - # source://racc//lib/racc/parser.rb#562 + # source://racc//lib/racc/parser.rb#558 def racc_read_token(t, tok, val); end - # source://racc//lib/racc/parser.rb#575 + # source://racc//lib/racc/parser.rb#571 def racc_reduce(toks, sim, tstack, vstack); end - # source://racc//lib/racc/parser.rb#569 + # source://racc//lib/racc/parser.rb#565 def racc_shift(tok, tstack, vstack); end - # source://racc//lib/racc/parser.rb#622 + # source://racc//lib/racc/parser.rb#618 def racc_token2str(tok); end # Convert internal ID of token symbol to the string. # - # source://racc//lib/racc/parser.rb#628 + # source://racc//lib/racc/parser.rb#624 def token_to_str(t); end # Exit parser. # Return value is +Symbol_Value_Stack[0]+. # - # source://racc//lib/racc/parser.rb#552 + # source://racc//lib/racc/parser.rb#548 def yyaccept; end # Leave error recovering mode. # - # source://racc//lib/racc/parser.rb#557 + # source://racc//lib/racc/parser.rb#553 def yyerrok; end # Enter error recovering mode. # This method does not call #on_error. # - # source://racc//lib/racc/parser.rb#546 + # source://racc//lib/racc/parser.rb#542 def yyerror; end - # source://racc//lib/racc/parser.rb#328 + # source://racc//lib/racc/parser.rb#324 def yyparse(recv, mid); end class << self - # source://racc//lib/racc/parser.rb#220 + # source://racc//lib/racc/parser.rb#216 def racc_runtime_type; end end end -# source://racc//lib/racc/parser.rb#209 +# source://racc//lib/racc/parser.rb#205 Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) -# source://racc//lib/racc/parser.rb#211 +Racc::Parser::Racc_Runtime_Core_Id_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#207 Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#191 +Racc::Parser::Racc_Runtime_Core_Version_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#187 Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#212 +# source://racc//lib/racc/parser.rb#208 Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#190 +# source://racc//lib/racc/parser.rb#186 Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#210 +# source://racc//lib/racc/parser.rb#206 Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) -# source://racc//lib/racc/parser.rb#185 +# source://racc//lib/racc/parser.rb#181 Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) # source://racc//lib/racc/info.rb#15 diff --git a/sorbet/rbi/gems/rainbow@3.1.1.rbi b/sorbet/rbi/gems/rainbow@3.1.1.rbi index 87f4c33..d02bc04 100644 --- a/sorbet/rbi/gems/rainbow@3.1.1.rbi +++ b/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rainbow` gem. # Please instead update this file by running `bin/tapioca gem rainbow`. + class Object < ::BasicObject include ::Kernel include ::PP::ObjectMixin diff --git a/sorbet/rbi/gems/rake@13.1.0.rbi b/sorbet/rbi/gems/rake@13.2.1.rbi similarity index 97% rename from sorbet/rbi/gems/rake@13.1.0.rbi rename to sorbet/rbi/gems/rake@13.2.1.rbi index f128671..755e993 100644 --- a/sorbet/rbi/gems/rake@13.1.0.rbi +++ b/sorbet/rbi/gems/rake@13.2.1.rbi @@ -4,11 +4,12 @@ # This is an autogenerated file for types exported from the `rake` gem. # Please instead update this file by running `bin/tapioca gem rake`. + # :stopdoc: # # Some top level Constants. # -# source://rake//lib/rake.rb#70 +# source://rake//lib/rake.rb#69 FileList = Rake::FileList # -- @@ -195,7 +196,7 @@ class Rake::Application # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#801 + # source://rake//lib/rake/application.rb#807 def add_import(fn); end # Add a loader to handle imported files ending in the extension @@ -213,13 +214,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # source://rake//lib/rake/application.rb#782 + # source://rake//lib/rake/application.rb#788 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#796 + # source://rake//lib/rake/application.rb#802 def default_task_name; end # Warn about deprecated usage. @@ -227,75 +228,75 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # source://rake//lib/rake/application.rb#282 + # source://rake//lib/rake/application.rb#288 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#244 + # source://rake//lib/rake/application.rb#250 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#228 + # source://rake//lib/rake/application.rb#234 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#269 + # source://rake//lib/rake/application.rb#275 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#236 + # source://rake//lib/rake/application.rb#242 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#251 + # source://rake//lib/rake/application.rb#257 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#259 + # source://rake//lib/rake/application.rb#265 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#405 + # source://rake//lib/rake/application.rb#411 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#322 + # source://rake//lib/rake/application.rb#328 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#373 + # source://rake//lib/rake/application.rb#379 def dynamic_width; end - # source://rake//lib/rake/application.rb#377 + # source://rake//lib/rake/application.rb#383 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#381 + # source://rake//lib/rake/application.rb#387 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#223 + # source://rake//lib/rake/application.rb#229 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#702 + # source://rake//lib/rake/application.rb#708 def find_rakefile_location; end # Read and handle the command line options. Returns the command line # arguments that we didn't understand, which should (in theory) be just # task names and env vars. # - # source://rake//lib/rake/application.rb#668 + # source://rake//lib/rake/application.rb#674 def handle_options(argv); end # @return [Boolean] # - # source://rake//lib/rake/application.rb#255 + # source://rake//lib/rake/application.rb#261 def has_cause?(ex); end # True if one of the files in RAKEFILES is in the current directory. # If a match is found, it is copied into @rakefile. # - # source://rake//lib/rake/application.rb#298 + # source://rake//lib/rake/application.rb#304 def have_rakefile; end # Initialize the command line parameters and app name. @@ -305,12 +306,12 @@ class Rake::Application # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#179 + # source://rake//lib/rake/application.rb#185 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#806 + # source://rake//lib/rake/application.rb#812 def load_imports; end # Find the rakefile and then load it and any pending imports. @@ -333,16 +334,16 @@ class Rake::Application # source://rake//lib/rake/application.rb#27 def original_dir; end - # source://rake//lib/rake/application.rb#185 + # source://rake//lib/rake/application.rb#191 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#714 + # source://rake//lib/rake/application.rb#720 def print_rakefile_directory(location); end # Similar to the regular Ruby +require+ command, but will check # for *.rake files in addition to *.rb files. # - # source://rake//lib/rake/application.rb#688 + # source://rake//lib/rake/application.rb#694 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. @@ -350,10 +351,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#30 def rakefile; end - # source://rake//lib/rake/application.rb#822 + # source://rake//lib/rake/application.rb#828 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#719 + # source://rake//lib/rake/application.rb#725 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -375,23 +376,23 @@ class Rake::Application # source://rake//lib/rake/application.rb#144 def run_with_threads; end - # source://rake//lib/rake/application.rb#831 + # source://rake//lib/rake/application.rb#837 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#207 + # source://rake//lib/rake/application.rb#213 def standard_exception_handling; end # A list of all the standard options used in rake, suitable for # passing to OptionParser. # - # source://rake//lib/rake/application.rb#426 + # source://rake//lib/rake/application.rb#432 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#751 + # source://rake//lib/rake/application.rb#757 def system_dir; end # Number of columns on the terminal @@ -404,12 +405,12 @@ class Rake::Application # source://rake//lib/rake/application.rb#33 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#361 + # source://rake//lib/rake/application.rb#367 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#172 + # source://rake//lib/rake/application.rb#178 def thread_pool; end # Run the top level tasks of a Rake application. @@ -422,10 +423,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#36 def top_level_tasks; end - # source://rake//lib/rake/application.rb#412 + # source://rake//lib/rake/application.rb#418 def trace(*strings); end - # source://rake//lib/rake/application.rb#394 + # source://rake//lib/rake/application.rb#400 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been @@ -433,7 +434,7 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#317 + # source://rake//lib/rake/application.rb#323 def truncate_output?; end # Override the detected TTY output state (mostly for testing) @@ -445,44 +446,44 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#311 + # source://rake//lib/rake/application.rb#317 def tty_output?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#385 + # source://rake//lib/rake/application.rb#391 def unix?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#390 + # source://rake//lib/rake/application.rb#396 def windows?; end private - # source://rake//lib/rake/application.rb#745 + # source://rake//lib/rake/application.rb#751 def glob(path, &block); end # Does the exception have a task invocation chain? # # @return [Boolean] # - # source://rake//lib/rake/application.rb#291 + # source://rake//lib/rake/application.rb#297 def has_chain?(exception); end # source://rake//lib/rake/application.rb#102 def load_debug_at_stop_feature; end - # source://rake//lib/rake/application.rb#644 + # source://rake//lib/rake/application.rb#650 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#651 + # source://rake//lib/rake/application.rb#657 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#417 + # source://rake//lib/rake/application.rb#423 def sort_options(options); end - # source://rake//lib/rake/application.rb#768 + # source://rake//lib/rake/application.rb#774 def standard_system_dir; end end @@ -492,7 +493,7 @@ Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) # source://rake//lib/rake/backtrace.rb#3 module Rake::Backtrace class << self - # source://rake//lib/rake/backtrace.rb#18 + # source://rake//lib/rake/backtrace.rb#19 def collapse(backtrace); end end end @@ -503,7 +504,7 @@ Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) # source://rake//lib/rake/backtrace.rb#12 Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/backtrace.rb#16 +# source://rake//lib/rake/backtrace.rb#17 Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rake//lib/rake/backtrace.rb#4 @@ -598,7 +599,7 @@ module Rake::DSL # # ... run tests # end # - # source://rake//lib/rake/dsl_definition.rb#165 + # source://rake//lib/rake/dsl_definition.rb#166 def desc(description); end # Declare a set of files tasks to create the given directories on @@ -646,7 +647,7 @@ module Rake::DSL # Example: # import ".depend", "my_rules" # - # source://rake//lib/rake/dsl_definition.rb#183 + # source://rake//lib/rake/dsl_definition.rb#184 def import(*fns); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -690,7 +691,7 @@ module Rake::DSL # Example: # multitask deploy: %w[deploy_gem deploy_rdoc] # - # source://rake//lib/rake/dsl_definition.rb#112 + # source://rake//lib/rake/dsl_definition.rb#113 def multitask(*args, &block); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -715,7 +716,7 @@ module Rake::DSL # # ... # end # - # source://rake//lib/rake/dsl_definition.rb#135 + # source://rake//lib/rake/dsl_definition.rb#136 def namespace(name = T.unsafe(nil), &block); end # source://rake//lib/rake/file_utils_ext.rb#77 @@ -755,10 +756,10 @@ module Rake::DSL # # Example: # rule '.o' => '.c' do |t| - # sh 'cc', '-o', t.name, t.source + # sh 'cc', '-c', '-o', t.name, t.source # end # - # source://rake//lib/rake/dsl_definition.rb#151 + # source://rake//lib/rake/dsl_definition.rb#152 def rule(*args, &block); end # source://rake//lib/rake/file_utils.rb#110 @@ -3001,7 +3002,7 @@ end # source://rake//lib/rake/win32.rb#11 class Rake::Win32::Win32HomeError < ::RuntimeError; end -# source://rake//lib/rake.rb#71 +# source://rake//lib/rake.rb#70 RakeFileUtils = Rake::FileUtilsExt # source://rake//lib/rake/ext/string.rb#4 diff --git a/sorbet/rbi/gems/rbi@0.1.9.rbi b/sorbet/rbi/gems/rbi@0.1.9.rbi deleted file mode 100644 index 2dc7699..0000000 --- a/sorbet/rbi/gems/rbi@0.1.9.rbi +++ /dev/null @@ -1,3006 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rbi` gem. -# Please instead update this file by running `bin/tapioca gem rbi`. - -# source://rbi//lib/rbi/loc.rb#4 -module RBI; end - -# source://rbi//lib/rbi/model.rb#968 -class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#980 - sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#986 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#613 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#991 - sig { returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#972 - sig { returns(::String) } - def value; end -end - -# Attributes -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#349 -class RBI::Attr < ::RBI::NodeWithComments - include ::RBI::Indexable - - abstract! - - # source://rbi//lib/rbi/model.rb#374 - sig do - params( - name: ::Symbol, - names: T::Array[::Symbol], - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#348 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#382 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#113 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#356 - sig { returns(T::Array[::Symbol]) } - def names; end - - # source://rbi//lib/rbi/printer.rb#375 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#362 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # source://rbi//lib/rbi/model.rb#359 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#359 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#385 -class RBI::AttrAccessor < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#399 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#452 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#405 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#411 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#417 -class RBI::AttrReader < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#431 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#434 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#437 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#443 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#449 -class RBI::AttrWriter < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#463 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#443 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#469 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#475 - sig { override.returns(::String) } - def to_s; end -end - -# An arbitrary blank line that can be added both in trees and comments -# -# source://rbi//lib/rbi/model.rb#74 -class RBI::BlankLine < ::RBI::Comment - # source://rbi//lib/rbi/model.rb#78 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#217 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end -end - -# source://rbi//lib/rbi/model.rb#741 -class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#752 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#763 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#543 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#548 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#758 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#218 -class RBI::Class < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#236 - sig do - params( - name: ::String, - superclass_name: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Class).void) - ).void - end - def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#376 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#244 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#222 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#222 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#284 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end - - # source://rbi//lib/rbi/model.rb#225 - sig { returns(T.nilable(::String)) } - def superclass_name; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#225 - def superclass_name=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#53 -class RBI::Comment < ::RBI::Node - # source://rbi//lib/rbi/model.rb#60 - sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(text, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#66 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#197 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#57 - sig { returns(::String) } - def text; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#57 - def text=(_arg0); end -end - -# A tree showing incompatibles nodes -# -# Is rendered as a merge conflict between `left` and` right`: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# def m2(a); end -# ======= -# def m1(a); end -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 -class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 - sig { params(left_name: ::String, right_name: ::String).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#607 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 - sig { returns(::RBI::Tree) } - def left; end - - # @return [Tree] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 - def right; end -end - -# Consts -# -# source://rbi//lib/rbi/model.rb#312 -class RBI::Const < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#327 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Const).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#335 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#335 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#103 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#316 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#342 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#316 - def value; end -end - -# source://rbi//lib/rbi/model.rb#816 -class RBI::Extend < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#828 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Extend).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#502 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#143 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#834 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#137 -class RBI::File - # source://rbi//lib/rbi/model.rb#156 - sig do - params( - strictness: T.nilable(::String), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(file: ::RBI::File).void) - ).void - end - def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#164 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/printer.rb#105 - sig { params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#147 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#147 - def comments=(_arg0); end - - # source://rbi//lib/rbi/model.rb#169 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/printer.rb#129 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#141 - sig { returns(::RBI::Tree) } - def root; end - - # @return [Tree] - # - # source://rbi//lib/rbi/model.rb#141 - def root=(_arg0); end - - # source://rbi//lib/rbi/model.rb#144 - sig { returns(T.nilable(::String)) } - def strictness; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#144 - def strictness=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#135 - sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/formatter.rb#5 -class RBI::Formatter - # source://rbi//lib/rbi/formatter.rb#36 - sig do - params( - add_sig_templates: T::Boolean, - group_nodes: T::Boolean, - max_line_length: T.nilable(::Integer), - nest_singleton_methods: T::Boolean, - nest_non_public_methods: T::Boolean, - sort_nodes: T::Boolean - ).void - end - def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - - # source://rbi//lib/rbi/formatter.rb#15 - sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) } - def add_sig_templates=(add_sig_templates); end - - # source://rbi//lib/rbi/formatter.rb#59 - sig { params(file: ::RBI::File).void } - def format_file(file); end - - # source://rbi//lib/rbi/formatter.rb#64 - sig { params(tree: ::RBI::Tree).void } - def format_tree(tree); end - - # source://rbi//lib/rbi/formatter.rb#18 - sig { params(group_nodes: T::Boolean).returns(T::Boolean) } - def group_nodes=(group_nodes); end - - # source://rbi//lib/rbi/formatter.rb#24 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/formatter.rb#24 - def max_line_length=(_arg0); end - - # source://rbi//lib/rbi/formatter.rb#21 - sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } - def nest_non_public_methods=(nest_non_public_methods); end - - # source://rbi//lib/rbi/formatter.rb#12 - sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } - def nest_singleton_methods=(nest_singleton_methods); end - - # source://rbi//lib/rbi/formatter.rb#53 - sig { params(file: ::RBI::File).returns(::String) } - def print_file(file); end - - # source://rbi//lib/rbi/formatter.rb#9 - sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } - def sort_nodes=(sort_nodes); end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#88 -class RBI::Group < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 - sig { params(kind: ::RBI::Group::Kind).void } - def initialize(kind); end - - # source://rbi//lib/rbi/printer.rb#838 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#92 - sig { returns(::RBI::Group::Kind) } - def kind; end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 -class RBI::Group::Kind < ::T::Enum - enums do - Mixins = new - RequiredAncestors = new - Helpers = new - TypeMembers = new - MixesInClassMethods = new - Sends = new - Attrs = new - TStructFields = new - TEnums = new - Inits = new - Methods = new - SingletonClasses = new - Consts = new - end -end - -# Sorbet's misc. -# -# source://rbi//lib/rbi/model.rb#1294 -class RBI::Helper < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1308 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Helper).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#825 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#520 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#173 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1298 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1315 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#793 -class RBI::Include < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#805 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Include).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#493 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#133 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#811 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/index.rb#5 -class RBI::Index < ::RBI::Visitor - # source://rbi//lib/rbi/index.rb#21 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/index.rb#32 - sig { params(id: ::String).returns(T::Array[::RBI::Node]) } - def [](id); end - - # source://rbi//lib/rbi/index.rb#37 - sig { params(nodes: ::RBI::Node).void } - def index(*nodes); end - - # source://rbi//lib/rbi/index.rb#27 - sig { returns(T::Array[::String]) } - def keys; end - - # source://rbi//lib/rbi/index.rb#42 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/index.rb#59 - sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } - def index_node(node); end - - class << self - # source://rbi//lib/rbi/index.rb#13 - sig { params(node: ::RBI::Node).returns(::RBI::Index) } - def index(*node); end - end -end - -# A Node that can be refered to by a unique ID inside an index -# -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/index.rb#74 -module RBI::Indexable - interface! - - # Unique IDs that refer to this node. - # - # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the - # getter and the setter. - # - # @abstract - # - # source://rbi//lib/rbi/index.rb#85 - sig { abstract.returns(T::Array[::String]) } - def index_ids; end -end - -# source://rbi//lib/rbi/model.rb#996 -class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1009 - sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(keyword, value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#1015 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#622 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1000 - sig { returns(::String) } - def keyword; end - - # source://rbi//lib/rbi/model.rb#1020 - sig { returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#682 -class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#697 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#709 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#513 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#518 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#704 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#686 - sig { returns(::String) } - def value; end -end - -# source://rbi//lib/rbi/model.rb#655 -class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#666 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#677 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#498 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#503 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#672 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#714 -class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#725 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#736 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#528 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#533 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#731 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/loc.rb#5 -class RBI::Loc - # source://rbi//lib/rbi/loc.rb#38 - sig do - params( - file: T.nilable(::String), - begin_line: T.nilable(::Integer), - end_line: T.nilable(::Integer), - begin_column: T.nilable(::Integer), - end_column: T.nilable(::Integer) - ).void - end - def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def begin_column; end - - # source://rbi//lib/rbi/loc.rb#27 - sig { returns(T.nilable(::Integer)) } - def begin_line; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def end_column; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def end_line; end - - # source://rbi//lib/rbi/loc.rb#24 - sig { returns(T.nilable(::String)) } - def file; end - - # source://rbi//lib/rbi/loc.rb#56 - sig { returns(T.nilable(::String)) } - def source; end - - # source://rbi//lib/rbi/loc.rb#47 - sig { returns(::String) } - def to_s; end - - class << self - # source://rbi//lib/rbi/loc.rb#12 - sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } - def from_prism(file, prism_location); end - end -end - -# A tree that _might_ contain conflicts -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 -class RBI::MergeTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end -end - -# Methods and args -# -# source://rbi//lib/rbi/model.rb#483 -class RBI::Method < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#513 - sig do - params( - name: ::String, - params: T::Array[::RBI::Param], - is_singleton: T::Boolean, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Method).void) - ).void - end - def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#533 - sig { params(param: ::RBI::Param).void } - def <<(param); end - - # source://rbi//lib/rbi/printer.rb#384 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#538 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#123 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/printer.rb#437 - sig { returns(T::Boolean) } - def inline_params?; end - - # source://rbi//lib/rbi/model.rb#493 - sig { returns(T::Boolean) } - def is_singleton; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#493 - def is_singleton=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#487 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#487 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#432 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#490 - sig { returns(T::Array[::RBI::Param]) } - def params; end - - # source://rbi//lib/rbi/model.rb#499 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#499 - def sigs=(_arg0); end - - # source://rbi//lib/rbi/model.rb#547 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#496 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#496 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1355 -class RBI::MixesInClassMethods < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1367 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#153 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1373 - sig { override.returns(::String) } - def to_s; end -end - -# Mixins -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#770 -class RBI::Mixin < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#787 - sig do - params( - name: ::String, - names: T::Array[::String], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#558 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#484 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#777 - sig { returns(T::Array[::String]) } - def names; end -end - -# source://rbi//lib/rbi/model.rb#190 -class RBI::Module < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#204 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Module).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#385 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#211 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#194 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#194 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#270 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#5 -class RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#18 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # @abstract - # - # source://rbi//lib/rbi/printer.rb#146 - sig { abstract.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # Can `self` and `_other` be merged into a single definition? - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 - sig { params(_other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(_other); end - - # source://rbi//lib/rbi/model.rb#24 - sig { void } - def detach; end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#48 - sig { returns(::RBI::Group::Kind) } - def group_kind; end - - # source://rbi//lib/rbi/model.rb#15 - sig { returns(T.nilable(::RBI::Loc)) } - def loc; end - - # @return [Loc, nil] - # - # source://rbi//lib/rbi/model.rb#15 - def loc=(_arg0); end - - # Merge `self` and `other` into a single definition - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 - sig { params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/printer.rb#179 - sig { returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 - sig { returns(T.nilable(::RBI::ConflictTree)) } - def parent_conflict_tree; end - - # source://rbi//lib/rbi/model.rb#46 - sig { returns(T.nilable(::RBI::Scope)) } - def parent_scope; end - - # source://rbi//lib/rbi/model.rb#12 - sig { returns(T.nilable(::RBI::Tree)) } - def parent_tree; end - - # @return [Tree, nil] - # - # source://rbi//lib/rbi/model.rb#12 - def parent_tree=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#156 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#169 - sig { params(v: ::RBI::Printer).void } - def print_blank_line_before(v); end - - # source://rbi//lib/rbi/model.rb#33 - sig { params(node: ::RBI::Node).void } - def replace(node); end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#94 - sig { params(version: ::Gem::Version).returns(T::Boolean) } - def satisfies_version?(version); end - - # source://rbi//lib/rbi/printer.rb#162 - sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#83 -class RBI::NodeWithComments < ::RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#93 - sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#99 - sig { returns(T::Array[::String]) } - def annotations; end - - # source://rbi//lib/rbi/model.rb#90 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#90 - def comments=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/printer.rb#188 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 - sig { returns(T::Array[::Gem::Requirement]) } - def version_requirements; end -end - -# source://rbi//lib/rbi/model.rb#601 -class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#616 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#623 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#468 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#473 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#605 - sig { returns(::String) } - def value; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#552 -class RBI::Param < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#568 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#446 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#459 - sig { returns(T::Array[::String]) } - def comments_lines; end - - # source://rbi//lib/rbi/model.rb#559 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/printer.rb#451 - sig { params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#574 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/parser.rb#7 -class RBI::ParseError < ::StandardError - # source://rbi//lib/rbi/parser.rb#14 - sig { params(message: ::String, location: ::RBI::Loc).void } - def initialize(message, location); end - - # source://rbi//lib/rbi/parser.rb#11 - sig { returns(::RBI::Loc) } - def location; end -end - -# source://rbi//lib/rbi/parser.rb#53 -class RBI::Parser - # source://rbi//lib/rbi/parser.rb#88 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # source://rbi//lib/rbi/parser.rb#83 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - private - - # source://rbi//lib/rbi/parser.rb#95 - sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } - def parse(source, file:); end - - class << self - # source://rbi//lib/rbi/parser.rb#65 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # source://rbi//lib/rbi/parser.rb#70 - sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_files(paths); end - - # source://rbi//lib/rbi/parser.rb#60 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - # source://rbi//lib/rbi/parser.rb#76 - sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_strings(strings); end - end -end - -# source://rbi//lib/rbi/parser.rb#791 -class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#798 - sig { params(content: ::String, file: ::String).void } - def initialize(content, file:); end - - # source://rbi//lib/rbi/parser.rb#795 - sig { returns(::RBI::Sig) } - def current; end - - # source://rbi//lib/rbi/parser.rb#850 - sig { override.params(node: ::Prism::AssocNode).void } - def visit_assoc_node(node); end - - # source://rbi//lib/rbi/parser.rb#805 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end -end - -# source://rbi//lib/rbi/parser.rb#153 -class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#163 - sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } - def initialize(source, comments:, file:); end - - # source://rbi//lib/rbi/parser.rb#160 - sig { returns(T.nilable(::Prism::Node)) } - def last_node; end - - # source://rbi//lib/rbi/parser.rb#157 - sig { returns(::RBI::Tree) } - def tree; end - - # source://rbi//lib/rbi/parser.rb#299 - sig { params(node: ::Prism::CallNode).void } - def visit_call_node(node); end - - # source://rbi//lib/rbi/parser.rb#176 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # source://rbi//lib/rbi/parser.rb#208 - sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } - def visit_constant_assign(node); end - - # source://rbi//lib/rbi/parser.rb#201 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # source://rbi//lib/rbi/parser.rb#194 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # source://rbi//lib/rbi/parser.rb#241 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end - - # source://rbi//lib/rbi/parser.rb#255 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # source://rbi//lib/rbi/parser.rb#272 - sig { override.params(node: ::Prism::ProgramNode).void } - def visit_program_node(node); end - - # source://rbi//lib/rbi/parser.rb#283 - sig { override.params(node: ::Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end - - private - - # Collect all the remaining comments within a node - # - # source://rbi//lib/rbi/parser.rb#467 - sig { params(node: ::Prism::Node).void } - def collect_dangling_comments(node); end - - # Collect all the remaining comments after visiting the tree - # - # source://rbi//lib/rbi/parser.rb#485 - sig { void } - def collect_orphan_comments; end - - # source://rbi//lib/rbi/parser.rb#508 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/parser.rb#513 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # source://rbi//lib/rbi/parser.rb#520 - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end - - # source://rbi//lib/rbi/parser.rb#527 - sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # source://rbi//lib/rbi/parser.rb#545 - sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } - def parse_comment(node); end - - # source://rbi//lib/rbi/parser.rb#574 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } - def parse_params(node); end - - # source://rbi//lib/rbi/parser.rb#550 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # source://rbi//lib/rbi/parser.rb#648 - sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } - def parse_sig(node); end - - # source://rbi//lib/rbi/parser.rb#658 - sig do - params( - node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) - ).returns(T.nilable(::RBI::Struct)) - end - def parse_struct(node); end - - # source://rbi//lib/rbi/parser.rb#708 - sig { params(send: ::Prism::CallNode).void } - def parse_tstruct_field(send); end - - # source://rbi//lib/rbi/parser.rb#745 - sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } - def parse_visibility(name, node); end - - # source://rbi//lib/rbi/parser.rb#759 - sig { void } - def separate_header_comments; end - - # source://rbi//lib/rbi/parser.rb#769 - sig { void } - def set_root_tree_loc; end - - # source://rbi//lib/rbi/parser.rb#783 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def type_variable_definition?(node); end -end - -# source://rbi//lib/rbi/parser.rb#122 -class RBI::Parser::Visitor < ::Prism::Visitor - # source://rbi//lib/rbi/parser.rb#126 - sig { params(source: ::String, file: ::String).void } - def initialize(source, file:); end - - private - - # source://rbi//lib/rbi/parser.rb#136 - sig { params(node: ::Prism::Node).returns(::RBI::Loc) } - def node_loc(node); end - - # source://rbi//lib/rbi/parser.rb#141 - sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } - def node_string(node); end - - # source://rbi//lib/rbi/parser.rb#148 - sig { params(node: ::Prism::Node).returns(::String) } - def node_string!(node); end -end - -# source://rbi//lib/rbi/printer.rb#5 -class RBI::Printer < ::RBI::Visitor - # source://rbi//lib/rbi/printer.rb#28 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#15 - sig { returns(::Integer) } - def current_indent; end - - # source://rbi//lib/rbi/printer.rb#46 - sig { void } - def dedent; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def in_visibility_group; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def in_visibility_group=(_arg0); end - - # Printing - # - # source://rbi//lib/rbi/printer.rb#41 - sig { void } - def indent; end - - # source://rbi//lib/rbi/printer.rb#18 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # source://rbi//lib/rbi/printer.rb#12 - sig { returns(T.nilable(::RBI::Node)) } - def previous_node; end - - # Print a string without indentation nor `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#52 - sig { params(string: ::String).void } - def print(string); end - - # source://rbi//lib/rbi/printer.rb#9 - sig { returns(T::Boolean) } - def print_locs; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def print_locs=(_arg0); end - - # Print a string with indentation and `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#72 - sig { params(string: ::String).void } - def printl(string); end - - # Print a string without indentation but with a `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#58 - sig { params(string: T.nilable(::String)).void } - def printn(string = T.unsafe(nil)); end - - # Print a string with indentation but without a `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#65 - sig { params(string: T.nilable(::String)).void } - def printt(string = T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#83 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/printer.rb#90 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # source://rbi//lib/rbi/printer.rb#78 - sig { params(file: ::RBI::File).void } - def visit_file(file); end -end - -# source://rbi//lib/rbi/model.rb#909 -class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#919 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Private).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#893 -class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#903 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Protected).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#877 -class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#887 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Public).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#579 -class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#590 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#596 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end -end - -# source://rbi//lib/rbi/model.rb#1378 -class RBI::RequiresAncestor < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1391 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#870 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/index.rb#163 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1382 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1397 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#628 -class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#639 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#650 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#483 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#488 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#645 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 -module RBI::Rewriters; end - -# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 -class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 - sig { params(with_todo_comment: T::Boolean).void } - def initialize(with_todo_comment: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 - sig { params(attr: ::RBI::Attr).void } - def add_attr_sig(attr); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 - sig { params(method: ::RBI::Method).void } - def add_method_sig(method); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 - sig { params(node: ::RBI::NodeWithComments).void } - def add_todo_comment(node); end -end - -# source://rbi//lib/rbi/rewriters/annotate.rb#6 -class RBI::Rewriters::Annotate < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/annotate.rb#10 - sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } - def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#18 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/annotate.rb#31 - sig { params(node: ::RBI::NodeWithComments).void } - def annotate_node(node); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#38 - sig { params(node: ::RBI::Node).returns(T::Boolean) } - def root?(node); end -end - -# source://rbi//lib/rbi/rewriters/deannotate.rb#6 -class RBI::Rewriters::Deannotate < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/deannotate.rb#10 - sig { params(annotation: ::String).void } - def initialize(annotation); end - - # source://rbi//lib/rbi/rewriters/deannotate.rb#16 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/deannotate.rb#27 - sig { params(node: ::RBI::NodeWithComments).void } - def deannotate_node(node); end -end - -# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations -# in comments. As an example: -# -# ~~~rb -# tree = Parser.parse_string(<<~RBI) -# class Foo -# # @version > 0.3.0 -# def bar -# end -# -# # @version <= 0.3.0 -# def bar(arg1) -# end -# end -# RBI -# -# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) -# -# assert_equal(<<~RBI, tree.string) -# class Foo -# # @version > 0.3.0 -# def bar -# end -# end -# RBI -# ~~~ -# -# Supported operators: -# - equals `=` -# - not equals `!=` -# - greater than `>` -# - greater than or equal to `>=` -# - less than `<` -# - less than or equal to `<=` -# - pessimistic or twiddle-wakka`~>` -# -# And/or logic: -# - "And" logic: put multiple versions on the same line -# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 -# - "Or" logic: put multiple versions on subsequent lines -# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 -# ``` -# # @version < 0.3.0 -# # @version > 1.0.0 -# ``` -# Prerelease versions: -# - Prerelease versions are considered less than their non-prerelease counterparts -# - e.g. `0.4.0-prerelease` is less than `0.4.0` -# -# RBI with no versions: -# - RBI with no version annotations are automatically counted towards ALL versions -# -# source://rbi//lib/rbi/rewriters/filter_versions.rb#57 -class RBI::Rewriters::FilterVersions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/filter_versions.rb#73 - sig { params(version: ::Gem::Version).void } - def initialize(version); end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#79 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - class << self - # source://rbi//lib/rbi/rewriters/filter_versions.rb#66 - sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } - def filter(tree, version); end - end -end - -# source://rbi//lib/rbi/rewriters/filter_versions.rb#60 -RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 -class RBI::Rewriters::GroupNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Merge two RBI trees together -# -# Be this `Tree`: -# ~~~rb -# class Foo -# attr_accessor :a -# def m; end -# C = 10 -# end -# ~~~ -# -# Merged with this one: -# ~~~rb -# class Foo -# attr_reader :a -# def m(x); end -# C = 10 -# end -# ~~~ -# -# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: -# ~~~rb -# class Foo -# <<<<<<< left -# attr_accessor :a -# def m; end -# ======= -# attr_reader :a -# def m(x); end -# >>>>>>> right -# C = 10 -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 -class RBI::Rewriters::Merge - # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 - sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 - sig { params(tree: ::RBI::Tree).void } - def merge(tree); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 - sig { returns(::RBI::MergeTree) } - def tree; end - - class << self - # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 - sig do - params( - left: ::RBI::Tree, - right: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).returns(::RBI::MergeTree) - end - def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - end -end - -# Used for logging / error displaying purpose -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 -class RBI::Rewriters::Merge::Conflict < ::T::Struct - const :left, ::RBI::Node - const :right, ::RBI::Node - const :left_name, ::String - const :right_name, ::String - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# Merge adjacent conflict trees -# -# Transform this: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# ======= -# def m1(a); end -# >>>>>>> right -# <<<<<<< left -# def m2(a); end -# ======= -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# Into this: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# def m2(a); end -# ======= -# def m1(a); end -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 -class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 - sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } - def merge_conflict_trees(left, right); end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 -class RBI::Rewriters::Merge::Keep < ::T::Enum - enums do - NONE = new - LEFT = new - RIGHT = new - end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 -class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 - sig do - params( - output: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).void - end - def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } - def make_conflict_scope(left, right); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 - sig { params(left: ::RBI::Node, right: ::RBI::Node).void } - def make_conflict_tree(left, right); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 - sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } - def previous_definition(node); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } - def replace_scope_header(left, right); end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 -class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 -class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Remove all definitions existing in the index from the current tree -# -# Let's create an `Index` from two different `Tree`s: -# ~~~rb -# tree1 = Parse.parse_string(<<~RBI) -# class Foo -# def foo; end -# end -# RBI -# -# tree2 = Parse.parse_string(<<~RBI) -# FOO = 10 -# RBI -# -# index = Index.index(tree1, tree2) -# ~~~ -# -# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: -# ~~~rb -# tree_to_clean = Parser.parse_string(<<~RBI) -# class Foo -# def foo; end -# def bar; end -# end -# FOO = 10 -# BAR = 42 -# RBI -# -# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) -# -# assert_equal(<<~RBI, cleaned_tree) -# class Foo -# def bar; end -# end -# BAR = 42 -# RBI -# -# assert_equal(<<~OPERATIONS, operations.join("\n")) -# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) -# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) -# OPERATIONS -# ~~~ -# -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 -class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 - sig { params(index: ::RBI::Index).void } - def initialize(index); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 - sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } - def operations; end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } - def can_delete_node?(node, previous); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } - def delete_node(node, previous); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 - sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } - def previous_definition_for(node); end - - class << self - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 - sig do - params( - tree: ::RBI::Tree, - index: ::RBI::Index - ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) - end - def remove(tree, index); end - end -end - -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134 -class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct - const :deleted_node, ::RBI::Node - const :duplicate_of, ::RBI::Node - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 -class RBI::Rewriters::SortNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 - sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } - def group_rank(kind); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 - sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } - def node_name(node); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 - sig { params(node: ::RBI::Node).returns(::Integer) } - def node_rank(node); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 - sig { params(node: ::RBI::Node).void } - def sort_node_names!(node); end -end - -# Scopes -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#176 -class RBI::Scope < ::RBI::Tree - include ::RBI::Indexable - - abstract! - - # source://rbi//lib/rbi/printer.rb#242 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # Duplicate `self` scope without its body - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 - sig { returns(T.self_type) } - def dup_empty; end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#182 - sig { abstract.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#93 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/printer.rb#256 - sig { params(v: ::RBI::Printer).void } - def print_body(v); end - - # @abstract - # - # source://rbi//lib/rbi/printer.rb#253 - sig { abstract.params(v: ::RBI::Printer).void } - def print_header(v); end - - # source://rbi//lib/rbi/model.rb#185 - sig { override.returns(::String) } - def to_s; end -end - -# A conflict between two scope headers -# -# Is rendered as a merge conflict between `left` and` right` for scope definitions: -# ~~~rb -# <<<<<<< left -# class Foo -# ======= -# module Foo -# >>>>>>> right -# def m1; end -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 -class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } - def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#651 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 - sig { returns(::RBI::Scope) } - def left; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 - sig { override.returns(T::Boolean) } - def oneline?; end - - # @return [Scope] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 - def right; end -end - -# Sends -# -# source://rbi//lib/rbi/model.rb#927 -class RBI::Send < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#945 - sig do - params( - method: ::String, - args: T::Array[::RBI::Arg], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Send).void) - ).void - end - def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#953 - sig { params(arg: ::RBI::Arg).void } - def <<(arg); end - - # source://rbi//lib/rbi/model.rb#958 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#592 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#934 - sig { returns(T::Array[::RBI::Arg]) } - def args; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#193 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#931 - sig { returns(::String) } - def method; end - - # source://rbi//lib/rbi/model.rb#963 - sig { returns(::String) } - def to_s; end -end - -# Sorbet's sigs -# -# source://rbi//lib/rbi/model.rb#1027 -class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1059 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), - is_abstract: T::Boolean, - is_override: T::Boolean, - is_overridable: T::Boolean, - is_final: T::Boolean, - type_params: T::Array[::String], - checked: T.nilable(::Symbol), - loc: T.nilable(::RBI::Loc), - block: T.nilable(T.proc.params(node: ::RBI::Sig).void) - ).void - end - def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1084 - sig { params(param: ::RBI::SigParam).void } - def <<(param); end - - # source://rbi//lib/rbi/model.rb#1089 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#633 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1043 - sig { returns(T.nilable(::Symbol)) } - def checked; end - - # @return [Symbol, nil] - # - # source://rbi//lib/rbi/model.rb#1043 - def checked=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#656 - sig { returns(T::Boolean) } - def inline_params?; end - - # source://rbi//lib/rbi/model.rb#1037 - sig { returns(T::Boolean) } - def is_abstract; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1037 - def is_abstract=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1037 - def is_final; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1037 - def is_final=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1037 - def is_overridable; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1037 - def is_overridable=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1037 - def is_override; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1037 - def is_override=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#651 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#1031 - sig { returns(T::Array[::RBI::SigParam]) } - def params; end - - # source://rbi//lib/rbi/model.rb#1034 - sig { returns(T.nilable(::String)) } - def return_type; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1034 - def return_type=(_arg0); end - - # source://rbi//lib/rbi/model.rb#1040 - sig { returns(T::Array[::String]) } - def type_params; end - - private - - # source://rbi//lib/rbi/printer.rb#698 - sig { params(v: ::RBI::Printer).void } - def print_as_block(v); end - - # source://rbi//lib/rbi/printer.rb#674 - sig { params(v: ::RBI::Printer).void } - def print_as_line(v); end - - # source://rbi//lib/rbi/printer.rb#663 - sig { returns(T::Array[::String]) } - def sig_modifiers; end -end - -# source://rbi//lib/rbi/model.rb#1098 -class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1113 - sig do - params( - name: ::String, - type: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) - ).void - end - def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1121 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#751 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#764 - sig { returns(T::Array[::String]) } - def comments_lines; end - - # source://rbi//lib/rbi/model.rb#1102 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/printer.rb#756 - sig { params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1102 - def type; end -end - -# source://rbi//lib/rbi/model.rb#251 -class RBI::SingletonClass < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#261 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#267 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/printer.rb#321 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# source://rbi//lib/rbi/model.rb#272 -class RBI::Struct < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#294 - sig do - params( - name: ::String, - members: T::Array[::Symbol], - keyword_init: T::Boolean, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) - ).void - end - def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#303 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#282 - sig { returns(T::Boolean) } - def keyword_init; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#282 - def keyword_init=(_arg0); end - - # source://rbi//lib/rbi/model.rb#279 - sig { returns(T::Array[::Symbol]) } - def members; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#279 - def members=(_arg0); end - - # source://rbi//lib/rbi/model.rb#276 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#276 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#300 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# Sorbet's T::Enum -# -# source://rbi//lib/rbi/model.rb#1239 -class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1250 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#1256 -class RBI::TEnumBlock < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1270 - sig do - params( - names: T::Array[::String], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) - ).void - end - def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1282 - sig { params(name: ::String).void } - def <<(name); end - - # source://rbi//lib/rbi/printer.rb#795 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1277 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/index.rb#223 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#1260 - sig { returns(T::Array[::String]) } - def names; end - - # source://rbi//lib/rbi/model.rb#1287 - sig { override.returns(::String) } - def to_s; end -end - -# Sorbet's T::Struct -# -# source://rbi//lib/rbi/model.rb#1128 -class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1139 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#1177 -class RBI::TStructConst < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1190 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#547 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1196 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#203 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1202 - sig { override.returns(::String) } - def to_s; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#1145 -class RBI::TStructField < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#1166 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#773 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#538 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1155 - sig { returns(T.nilable(::String)) } - def default; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1155 - def default=(_arg0); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#1174 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#1152 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1152 - def name=(_arg0); end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1152 - def type; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1152 - def type=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1207 -class RBI::TStructProp < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1220 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#570 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1226 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#213 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1232 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#106 -class RBI::Tree < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#119 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#126 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/printer.rb#226 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 - sig { params(with_todo_comment: T::Boolean).void } - def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#49 - sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } - def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#38 - sig do - params( - name: ::String, - superclass_name: T.nilable(::String), - block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) - ).returns(::RBI::Scope) - end - def create_class(name, superclass_name: T.unsafe(nil), &block); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#45 - sig { params(name: ::String, value: ::String).void } - def create_constant(name, value:); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#55 - sig { params(name: ::String).void } - def create_extend(name); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#50 - sig { params(name: ::String).void } - def create_include(name); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#89 - sig do - params( - name: ::String, - parameters: T::Array[::RBI::TypedParam], - return_type: ::String, - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment] - ).void - end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#60 - sig { params(name: ::String).void } - def create_mixes_in_class_methods(name); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#25 - sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } - def create_module(name, &block); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#9 - sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } - def create_path(constant, &block); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#74 - sig do - params( - name: ::String, - type: ::String, - variance: ::Symbol, - fixed: T.nilable(::String), - upper: T.nilable(::String), - lower: T.nilable(::String) - ).void - end - def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/deannotate.rb#41 - sig { params(annotation: ::String).void } - def deannotate!(annotation); end - - # source://rbi//lib/rbi/model.rb#132 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#118 - sig { params(version: ::Gem::Version).void } - def filter_versions!(version); end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 - sig { void } - def group_nodes!; end - - # source://rbi//lib/rbi/index.rb#68 - sig { returns(::RBI::Index) } - def index; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 - sig do - params( - other: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).returns(::RBI::MergeTree) - end - def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46 - sig { void } - def nest_non_public_methods!; end - - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 - sig { void } - def nest_singleton_methods!; end - - # source://rbi//lib/rbi/model.rb#110 - sig { returns(T::Array[::RBI::Node]) } - def nodes; end - - # source://rbi//lib/rbi/printer.rb#233 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 - sig { void } - def sort_nodes!; end - - private - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#116 - sig { params(node: ::RBI::Node).returns(::RBI::Node) } - def create_node(node); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#111 - sig { returns(T::Hash[::String, ::RBI::Node]) } - def nodes_cache; end -end - -# source://rbi//lib/rbi/model.rb#1320 -class RBI::TypeMember < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1335 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#812 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1343 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#183 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1324 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1350 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1324 - def value; end -end - -# source://rbi//lib/rbi/parser.rb#20 -class RBI::UnexpectedParserError < ::StandardError - # source://rbi//lib/rbi/parser.rb#27 - sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } - def initialize(parent_exception, last_location); end - - # source://rbi//lib/rbi/parser.rb#24 - sig { returns(::RBI::Loc) } - def last_location; end - - # source://rbi//lib/rbi/parser.rb#34 - sig { params(io: T.any(::IO, ::StringIO)).void } - def print_debug(io: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/version.rb#5 -RBI::VERSION = T.let(T.unsafe(nil), String) - -# Visibility -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#841 -class RBI::Visibility < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#851 - sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#857 - sig { params(other: ::RBI::Visibility).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#579 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#872 - sig { returns(T::Boolean) } - def private?; end - - # source://rbi//lib/rbi/model.rb#867 - sig { returns(T::Boolean) } - def protected?; end - - # source://rbi//lib/rbi/model.rb#862 - sig { returns(T::Boolean) } - def public?; end - - # source://rbi//lib/rbi/model.rb#848 - sig { returns(::Symbol) } - def visibility; end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 -class RBI::VisibilityGroup < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 - sig { params(visibility: ::RBI::Visibility).void } - def initialize(visibility); end - - # source://rbi//lib/rbi/printer.rb#848 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#861 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 - sig { returns(::RBI::Visibility) } - def visibility; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/visitor.rb#5 -class RBI::Visitor - abstract! - - # @abstract - # - # source://rbi//lib/rbi/visitor.rb#12 - sig { abstract.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/visitor.rb#15 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end -end diff --git a/sorbet/rbi/gems/rbi@0.2.1.rbi b/sorbet/rbi/gems/rbi@0.2.1.rbi new file mode 100644 index 0000000..58ea2b3 --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.2.1.rbi @@ -0,0 +1,4535 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bin/tapioca gem rbi`. + + +# source://rbi//lib/rbi.rb#7 +module RBI; end + +# source://rbi//lib/rbi/model.rb#1045 +class RBI::Arg < ::RBI::Node + # source://rbi//lib/rbi/model.rb#1057 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#1063 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1068 + sig { returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#1049 + sig { returns(::String) } + def value; end +end + +# Attributes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#351 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # source://rbi//lib/rbi/model.rb#376 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @abstract + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#61 + sig { abstract.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#384 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#113 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#428 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#358 + sig { returns(T::Array[::Symbol]) } + def names; end + + # source://rbi//lib/rbi/model.rb#364 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # source://rbi//lib/rbi/model.rb#361 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#361 + def visibility=(_arg0); end + + private + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#89 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_getter_method(name, sig, visibility, loc, comments); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#110 + sig do + params( + name: ::String, + sig: T.nilable(::RBI::Sig), + attribute_type: T.nilable(T.any(::RBI::Type, ::String)), + visibility: ::RBI::Visibility, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).returns(::RBI::Method) + end + def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end + + # @raise [UnexpectedMultipleSigsError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#66 + sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } + def parse_sig; end +end + +# source://rbi//lib/rbi/model.rb#387 +class RBI::AttrAccessor < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#401 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#460 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#140 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#407 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#413 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#419 +class RBI::AttrReader < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#433 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#442 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#154 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#439 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#445 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#451 +class RBI::AttrWriter < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#465 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#451 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#163 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#471 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#477 + sig { override.returns(::String) } + def to_s; end +end + +# An arbitrary blank line that can be added both in trees and comments +# +# source://rbi//lib/rbi/model.rb#76 +class RBI::BlankLine < ::RBI::Comment + # source://rbi//lib/rbi/model.rb#80 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/model.rb#816 +class RBI::BlockParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#827 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#838 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#833 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#220 +class RBI::Class < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#238 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Class).void) + ).void + end + def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#384 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#246 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#224 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#224 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#227 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#227 + def superclass_name=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#55 +class RBI::Comment < ::RBI::Node + # source://rbi//lib/rbi/model.rb#62 + sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(text, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#68 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#59 + sig { returns(::String) } + def text; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#59 + def text=(_arg0); end +end + +# A tree showing incompatibles nodes +# +# Is rendered as a merge conflict between `left` and` right`: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#583 +class RBI::ConflictTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 + sig { params(left_name: ::String, right_name: ::String).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#587 + sig { returns(::RBI::Tree) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#590 + sig { returns(::String) } + def left_name; end + + # @return [Tree] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#587 + def right; end + + # @return [String] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#590 + def right_name; end +end + +# Consts +# +# source://rbi//lib/rbi/model.rb#314 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#329 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Const).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#411 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#337 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#103 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#318 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#344 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#318 + def value; end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#351 +class RBI::DuplicateNodeError < ::RBI::Error; end + +# source://rbi//lib/rbi.rb#8 +class RBI::Error < ::StandardError; end + +# source://rbi//lib/rbi/model.rb#891 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#903 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Extend).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#510 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#143 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#909 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#139 +class RBI::File + # source://rbi//lib/rbi/model.rb#158 + sig do + params( + strictness: T.nilable(::String), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(file: ::RBI::File).void) + ).void + end + def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#166 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/model.rb#149 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#149 + def comments=(_arg0); end + + # source://rbi//lib/rbi/model.rb#171 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/printer.rb#743 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#996 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1002 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#143 + sig { returns(::RBI::Tree) } + def root; end + + # @return [Tree] + # + # source://rbi//lib/rbi/model.rb#143 + def root=(_arg0); end + + # source://rbi//lib/rbi/model.rb#146 + sig { returns(T.nilable(::String)) } + def strictness; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#146 + def strictness=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#749 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/formatter.rb#5 +class RBI::Formatter + # source://rbi//lib/rbi/formatter.rb#24 + sig do + params( + add_sig_templates: T::Boolean, + group_nodes: T::Boolean, + max_line_length: T.nilable(::Integer), + nest_singleton_methods: T::Boolean, + nest_non_public_members: T::Boolean, + sort_nodes: T::Boolean + ).void + end + def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end + + # source://rbi//lib/rbi/formatter.rb#47 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # source://rbi//lib/rbi/formatter.rb#52 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); end + + # source://rbi//lib/rbi/formatter.rb#12 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/formatter.rb#12 + def max_line_length=(_arg0); end + + # source://rbi//lib/rbi/formatter.rb#41 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end + + # source://rbi//lib/rbi/formatter.rb#9 + sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } + def sort_nodes=(sort_nodes); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#87 +class RBI::Group < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/group_nodes.rb#94 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#91 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#99 +class RBI::Group::Kind < ::T::Enum + enums do + Attrs = new + Consts = new + Helpers = new + Inits = new + Methods = new + MixesInClassMethods = new + Mixins = new + RequiredAncestors = new + Sends = new + SingletonClasses = new + TEnums = new + TStructFields = new + TypeMembers = new + end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#5 +class RBI::GroupNodesError < ::RBI::Error; end + +# Sorbet's misc. +# +# source://rbi//lib/rbi/model.rb#1374 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1388 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Helper).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#528 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#173 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1378 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1395 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#868 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#880 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Include).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#501 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#133 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#886 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/index.rb#5 +class RBI::Index < ::RBI::Visitor + # source://rbi//lib/rbi/index.rb#21 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/index.rb#32 + sig { params(id: ::String).returns(T::Array[::RBI::Node]) } + def [](id); end + + # source://rbi//lib/rbi/index.rb#37 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # source://rbi//lib/rbi/index.rb#27 + sig { returns(T::Array[::String]) } + def keys; end + + # source://rbi//lib/rbi/index.rb#42 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/index.rb#59 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # source://rbi//lib/rbi/index.rb#13 + sig { params(node: ::RBI::Node).returns(::RBI::Index) } + def index(*node); end + end +end + +# A Node that can be referred to by a unique ID inside an index +# +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/index.rb#74 +module RBI::Indexable + interface! + + # Unique IDs that refer to this node. + # + # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the + # getter and the setter. + # + # @abstract + # + # source://rbi//lib/rbi/index.rb#85 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# source://rbi//lib/rbi/model.rb#1073 +class RBI::KwArg < ::RBI::Arg + # source://rbi//lib/rbi/model.rb#1086 + sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(keyword, value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#1092 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1077 + sig { returns(::String) } + def keyword; end + + # source://rbi//lib/rbi/model.rb#1097 + sig { returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#757 +class RBI::KwOptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#772 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#784 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#779 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#761 + sig { returns(::String) } + def value; end +end + +# source://rbi//lib/rbi/model.rb#730 +class RBI::KwParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#741 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#752 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#747 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#789 +class RBI::KwRestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#800 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#811 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#806 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/loc.rb#5 +class RBI::Loc + # source://rbi//lib/rbi/loc.rb#38 + sig do + params( + file: T.nilable(::String), + begin_line: T.nilable(::Integer), + end_line: T.nilable(::Integer), + begin_column: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def begin_column; end + + # source://rbi//lib/rbi/loc.rb#27 + sig { returns(T.nilable(::Integer)) } + def begin_line; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def end_column; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def end_line; end + + # source://rbi//lib/rbi/loc.rb#24 + sig { returns(T.nilable(::String)) } + def file; end + + # source://rbi//lib/rbi/loc.rb#56 + sig { returns(T.nilable(::String)) } + def source; end + + # source://rbi//lib/rbi/loc.rb#47 + sig { returns(::String) } + def to_s; end + + class << self + # source://rbi//lib/rbi/loc.rb#12 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end + end +end + +# A tree that _might_ contain conflicts +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 +class RBI::MergeTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# source://rbi//lib/rbi/model.rb#485 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#515 + sig do + params( + name: ::String, + params: T::Array[::RBI::Param], + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).void + end + def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#535 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#570 + sig { params(name: ::String).void } + def add_block_param(name); end + + # source://rbi//lib/rbi/model.rb#560 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#555 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # source://rbi//lib/rbi/model.rb#565 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#545 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#540 + sig { params(name: ::String).void } + def add_param(name); end + + # source://rbi//lib/rbi/model.rb#550 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#587 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.any(::RBI::Type, ::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + block: T.proc.params(node: ::RBI::Sig).void + ).void + end + def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#469 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#613 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#123 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#495 + sig { returns(T::Boolean) } + def is_singleton; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#495 + def is_singleton=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#478 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#489 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#489 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#492 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # source://rbi//lib/rbi/model.rb#501 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#501 + def sigs=(_arg0); end + + # source://rbi//lib/rbi/model.rb#622 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#498 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#498 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1435 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1447 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#519 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#153 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1453 + sig { override.returns(::String) } + def to_s; end +end + +# Mixins +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#845 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#862 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#492 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#852 + sig { returns(T::Array[::String]) } + def names; end +end + +# source://rbi//lib/rbi/model.rb#192 +class RBI::Module < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#206 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Module).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#393 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#213 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#196 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#196 + def name=(_arg0); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#7 +class RBI::Node + abstract! + + # source://rbi//lib/rbi/model.rb#20 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # Can `self` and `_other` be merged into a single definition? + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 + sig { params(_other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(_other); end + + # source://rbi//lib/rbi/model.rb#26 + sig { void } + def detach; end + + # source://rbi//lib/rbi/model.rb#17 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # @return [Loc, nil] + # + # source://rbi//lib/rbi/model.rb#17 + def loc=(_arg0); end + + # Merge `self` and `other` into a single definition + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 + sig { params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 + sig { returns(T.nilable(::RBI::ConflictTree)) } + def parent_conflict_tree; end + + # source://rbi//lib/rbi/model.rb#48 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # source://rbi//lib/rbi/model.rb#14 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # @return [Tree, nil] + # + # source://rbi//lib/rbi/model.rb#14 + def parent_tree=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#767 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1013 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1019 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # @raise [ReplaceNodeError] + # + # source://rbi//lib/rbi/model.rb#35 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#94 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + + # source://rbi//lib/rbi/printer.rb#773 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#85 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # source://rbi//lib/rbi/model.rb#95 + sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#101 + sig { returns(T::Array[::String]) } + def annotations; end + + # source://rbi//lib/rbi/model.rb#92 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#92 + def comments=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end +end + +# source://rbi//lib/rbi/model.rb#676 +class RBI::OptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#691 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#698 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#680 + sig { returns(::String) } + def value; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#627 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#643 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#634 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#649 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/parser.rb#7 +class RBI::ParseError < ::RBI::Error + # source://rbi//lib/rbi/parser.rb#14 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # source://rbi//lib/rbi/parser.rb#11 + sig { returns(::RBI::Loc) } + def location; end +end + +# source://rbi//lib/rbi/parser.rb#53 +class RBI::Parser + # source://rbi//lib/rbi/parser.rb#88 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#83 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # source://rbi//lib/rbi/parser.rb#95 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end + + class << self + # source://rbi//lib/rbi/parser.rb#65 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#70 + sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_files(paths); end + + # source://rbi//lib/rbi/parser.rb#60 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # source://rbi//lib/rbi/parser.rb#76 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# source://rbi//lib/rbi/parser.rb#828 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#835 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # source://rbi//lib/rbi/parser.rb#832 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#887 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://rbi//lib/rbi/parser.rb#842 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#153 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#163 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # source://rbi//lib/rbi/parser.rb#160 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # source://rbi//lib/rbi/parser.rb#157 + sig { returns(::RBI::Tree) } + def tree; end + + # source://rbi//lib/rbi/parser.rb#324 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://rbi//lib/rbi/parser.rb#175 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://rbi//lib/rbi/parser.rb#224 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # source://rbi//lib/rbi/parser.rb#217 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#210 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#257 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://rbi//lib/rbi/parser.rb#278 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://rbi//lib/rbi/parser.rb#296 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://rbi//lib/rbi/parser.rb#307 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # source://rbi//lib/rbi/parser.rb#503 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # source://rbi//lib/rbi/parser.rb#521 + sig { void } + def collect_orphan_comments; end + + # source://rbi//lib/rbi/parser.rb#544 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/parser.rb#549 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # source://rbi//lib/rbi/parser.rb#556 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def detach_comments_from_sigs(sigs); end + + # source://rbi//lib/rbi/parser.rb#568 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # source://rbi//lib/rbi/parser.rb#586 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # source://rbi//lib/rbi/parser.rb#615 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # source://rbi//lib/rbi/parser.rb#591 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # source://rbi//lib/rbi/parser.rb#689 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#698 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # source://rbi//lib/rbi/parser.rb#748 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # source://rbi//lib/rbi/parser.rb#785 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # source://rbi//lib/rbi/parser.rb#799 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#809 + sig { void } + def set_root_tree_loc; end + + # source://rbi//lib/rbi/parser.rb#823 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# source://rbi//lib/rbi/parser.rb#122 +class RBI::Parser::Visitor < ::Prism::Visitor + # source://rbi//lib/rbi/parser.rb#126 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # source://rbi//lib/rbi/parser.rb#136 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # source://rbi//lib/rbi/parser.rb#141 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # source://rbi//lib/rbi/parser.rb#148 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end +end + +# source://rbi//lib/rbi/printer.rb#7 +class RBI::Printer < ::RBI::Visitor + # source://rbi//lib/rbi/printer.rb#30 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#17 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/printer.rb#48 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#11 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#11 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/printer.rb#43 + sig { void } + def indent; end + + # source://rbi//lib/rbi/printer.rb#20 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # source://rbi//lib/rbi/printer.rb#14 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#54 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/printer.rb#11 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#11 + def print_locs=(_arg0); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#74 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#60 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#67 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#80 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/printer.rb#91 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # source://rbi//lib/rbi/printer.rb#618 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # source://rbi//lib/rbi/printer.rb#576 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/printer.rb#586 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/printer.rb#592 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/printer.rb#665 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_block(node); end + + # source://rbi//lib/rbi/printer.rb#640 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_line(node); end + + # source://rbi//lib/rbi/printer.rb#610 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/printer.rb#721 + sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } + def sig_modifiers(node); end + + # source://rbi//lib/rbi/printer.rb#417 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/printer.rb#237 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/printer.rb#222 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/printer.rb#227 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/printer.rb#232 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/printer.rb#126 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/printer.rb#344 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/printer.rb#143 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/printer.rb#110 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/printer.rb#553 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/printer.rb#213 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/printer.rb#354 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/printer.rb#525 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/printer.rb#511 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/printer.rb#349 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/printer.rb#422 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/printer.rb#334 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/printer.rb#329 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/printer.rb#339 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/printer.rb#265 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/printer.rb#520 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/printer.rb#359 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/printer.rb#138 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/printer.rb#319 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/printer.rb#386 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/printer.rb#381 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/printer.rb#376 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/printer.rb#314 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/printer.rb#544 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/printer.rb#324 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/printer.rb#158 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/printer.rb#203 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/printer.rb#562 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/printer.rb#168 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/printer.rb#400 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/printer.rb#427 + sig { override.params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/printer.rb#447 + sig { override.params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/printer.rb#153 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/printer.rb#148 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/printer.rb#467 + sig { params(node: ::RBI::TStructField).void } + def visit_t_struct_field(node); end + + # source://rbi//lib/rbi/printer.rb#485 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/printer.rb#490 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/printer.rb#131 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/printer.rb#452 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/printer.rb#457 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/printer.rb#462 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/printer.rb#502 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/printer.rb#391 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/printer.rb#531 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# source://rbi//lib/rbi/printer.rb#5 +class RBI::PrinterError < ::RBI::Error; end + +# source://rbi//lib/rbi/model.rb#986 +class RBI::Private < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#996 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Private).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#970 +class RBI::Protected < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#980 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Protected).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#954 +class RBI::Public < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#964 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Public).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/rbs_printer.rb#5 +class RBI::RBSPrinter < ::RBI::Visitor + # source://rbi//lib/rbi/rbs_printer.rb#18 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#35 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/rbs_printer.rb#30 + sig { void } + def indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#41 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/rbs_printer.rb#275 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # source://rbi//lib/rbi/rbs_printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def print_locs=(_arg0); end + + # source://rbi//lib/rbi/rbs_printer.rb#350 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#61 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#47 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#54 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#67 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/rbs_printer.rb#505 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#243 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#228 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#233 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#238 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#106 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#444 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#123 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#90 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#625 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#213 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#454 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#78 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # source://rbi//lib/rbi/rbs_printer.rb#601 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#591 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#449 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#510 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#434 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#429 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#439 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#292 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#596 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#459 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#118 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#419 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#486 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#481 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#476 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#414 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#620 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#424 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#138 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#201 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#634 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#148 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#500 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#133 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#128 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#563 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#568 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#111 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#515 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#549 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#556 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#586 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#491 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#607 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#782 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_nilable_proc?(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#777 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_proc?(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#725 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # Parse a string containing a `T.let(x, X)` and extract the type + # + # Returns `nil` is the string is not a `T.let`. + # + # source://rbi//lib/rbi/rbs_printer.rb#759 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # source://rbi//lib/rbi/rbs_printer.rb#747 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#650 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#669 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#699 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/rbs_printer.rb#675 + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + # source://rbi//lib/rbi/rbs_printer.rb#717 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +# source://rbi//lib/rbi/rbs_printer.rb#6 +class RBI::RBSPrinter::Error < ::RBI::Error; end + +# source://rbi//lib/rbi/model.rb#5 +class RBI::ReplaceNodeError < ::RBI::Error; end + +# source://rbi//lib/rbi/model.rb#654 +class RBI::ReqParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#665 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#671 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end +end + +# source://rbi//lib/rbi/model.rb#1458 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1471 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/index.rb#163 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1462 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1477 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#703 +class RBI::RestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#714 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#725 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#720 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 +module RBI::Rewriters; end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# source://rbi//lib/rbi/rewriters/annotate.rb#6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/annotate.rb#10 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#18 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/annotate.rb#31 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#38 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def root?(node); end +end + +# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#22 +class RBI::Rewriters::AttrToMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#26 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # @raise [ReplaceNodeError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#39 + sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void } + def replace(node, with:); end +end + +# source://rbi//lib/rbi/rewriters/deannotate.rb#6 +class RBI::Rewriters::Deannotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/deannotate.rb#10 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/deannotate.rb#27 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations +# in comments. As an example: +# +# ~~~rb +# tree = Parser.parse_string(<<~RBI) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# +# # @version <= 0.3.0 +# def bar(arg1) +# end +# end +# RBI +# +# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) +# +# assert_equal(<<~RBI, tree.string) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# end +# RBI +# ~~~ +# +# Supported operators: +# - equals `=` +# - not equals `!=` +# - greater than `>` +# - greater than or equal to `>=` +# - less than `<` +# - less than or equal to `<=` +# - pessimistic or twiddle-wakka`~>` +# +# And/or logic: +# - "And" logic: put multiple versions on the same line +# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 +# - "Or" logic: put multiple versions on subsequent lines +# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 +# ``` +# # @version < 0.3.0 +# # @version > 1.0.0 +# ``` +# Prerelease versions: +# - Prerelease versions are considered less than their non-prerelease counterparts +# - e.g. `0.4.0-prerelease` is less than `0.4.0` +# +# RBI with no versions: +# - RBI with no version annotations are automatically counted towards ALL versions +# +# source://rbi//lib/rbi/rewriters/filter_versions.rb#57 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/filter_versions.rb#73 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#79 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # source://rbi//lib/rbi/rewriters/filter_versions.rb#66 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# source://rbi//lib/rbi/rewriters/filter_versions.rb#60 +RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# Rewrite non-singleton methods inside singleton classes to singleton methods +# +# Example: +# ~~~rb +# class << self +# def m1; end +# def self.m2; end +# +# class << self +# def m3; end +# end +# end +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# def self.m1; end +# +# class << self +# def self.m2; end +# def self.m3; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#30 +class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#34 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Flattens visibility nodes into method nodes +# +# Example: +# ~~~rb +# class A +# def m1; end +# private +# def m2; end +# def m3; end +# end +# ~~~ +# +# will be transformed into: +# +# ~~~rb +# class A +# def m1; end +# private def m2; end +# private def m3; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#27 +class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#31 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#38 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#8 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/group_nodes.rb#12 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#36 + sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } + def group_kind(node); end +end + +# Merge two RBI trees together +# +# Be this `Tree`: +# ~~~rb +# class Foo +# attr_accessor :a +# def m; end +# C = 10 +# end +# ~~~ +# +# Merged with this one: +# ~~~rb +# class Foo +# attr_reader :a +# def m(x); end +# C = 10 +# end +# ~~~ +# +# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: +# ~~~rb +# class Foo +# <<<<<<< left +# attr_accessor :a +# def m; end +# ======= +# attr_reader :a +# def m(x); end +# >>>>>>> right +# C = 10 +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 +class RBI::Rewriters::Merge + # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 + sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 + sig { returns(::RBI::MergeTree) } + def tree; end + + class << self + # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 + sig do + params( + left: ::RBI::Tree, + right: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + end +end + +# Used for logging / error displaying purpose +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 +class RBI::Rewriters::Merge::Conflict < ::T::Struct + const :left, ::RBI::Node + const :right, ::RBI::Node + const :left_name, ::String + const :right_name, ::String + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# Merge adjacent conflict trees +# +# Transform this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# ======= +# def m1(a); end +# >>>>>>> right +# <<<<<<< left +# def m2(a); end +# ======= +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# Into this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 + sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } + def merge_conflict_trees(left, right); end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 +class RBI::Rewriters::Merge::Keep < ::T::Enum + enums do + LEFT = new + NONE = new + RIGHT = new + end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 + sig do + params( + output: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).void + end + def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } + def make_conflict_scope(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 + sig { params(left: ::RBI::Node, right: ::RBI::Node).void } + def make_conflict_tree(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } + def replace_scope_header(left, right); end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#6 +class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# This rewriter moves top-level members into a top-level Object class +# +# Example: +# ~~~rb +# def foo; end +# attr_reader :bar +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# class Object +# def foo; end +# attr_reader :bar +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#22 +class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#26 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#33 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 +class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 + sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } + def operations; end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } + def can_delete_node?(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } + def delete_node(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 + sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } + def previous_definition_for(node); end + + class << self + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 + sig do + params( + tree: ::RBI::Tree, + index: ::RBI::Index + ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) + end + def remove(tree, index); end + end +end + +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#134 +class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct + const :deleted_node, ::RBI::Node + const :duplicate_of, ::RBI::Node + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 + sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } + def group_rank(kind); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 + sig { params(node: ::RBI::Node).returns(::Integer) } + def node_rank(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Scopes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#178 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # Duplicate `self` scope without its body + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#358 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#184 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#93 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#187 + sig { override.returns(::String) } + def to_s; end +end + +# A conflict between two scope headers +# +# Is rendered as a merge conflict between `left` and` right` for scope definitions: +# ~~~rb +# <<<<<<< left +# class Foo +# ======= +# module Foo +# >>>>>>> right +# def m1; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#616 +class RBI::ScopeConflict < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#633 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#620 + sig { returns(::RBI::Scope) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#623 + sig { returns(::String) } + def left_name; end + + # @return [Scope] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#620 + def right; end + + # @return [String] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#623 + def right_name; end +end + +# Sends +# +# source://rbi//lib/rbi/model.rb#1004 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1022 + sig do + params( + method: ::String, + args: T::Array[::RBI::Arg], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Send).void) + ).void + end + def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1030 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # source://rbi//lib/rbi/model.rb#1035 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1011 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#537 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#193 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1008 + sig { returns(::String) } + def method; end + + # source://rbi//lib/rbi/model.rb#1040 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# source://rbi//lib/rbi/model.rb#1104 +class RBI::Sig < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1137 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.any(::RBI::Type, ::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1163 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#1173 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1168 + sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } + def add_param(name, type); end + + # source://rbi//lib/rbi/model.rb#1120 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # @return [Symbol, nil] + # + # source://rbi//lib/rbi/model.rb#1120 + def checked=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1114 + sig { returns(T::Boolean) } + def is_abstract; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_abstract=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_final; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_final=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_overridable; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_overridable=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_override; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_override=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1108 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # source://rbi//lib/rbi/model.rb#1111 + sig { returns(T.any(::RBI::Type, ::String)) } + def return_type; end + + # @return [Type, String] + # + # source://rbi//lib/rbi/model.rb#1111 + def return_type=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1117 + sig { returns(T::Array[::String]) } + def type_params; end +end + +# source://rbi//lib/rbi/model.rb#1182 +class RBI::SigParam < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1200 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) + ).void + end + def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1208 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1186 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1189 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end +end + +# source://rbi//lib/rbi/model.rb#253 +class RBI::SingletonClass < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#263 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#269 + sig { override.returns(::String) } + def fully_qualified_name; end +end + +# source://rbi//lib/rbi/model.rb#274 +class RBI::Struct < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#296 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) + ).void + end + def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#402 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#305 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#284 + sig { returns(T::Boolean) } + def keyword_init; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#284 + def keyword_init=(_arg0); end + + # source://rbi//lib/rbi/model.rb#281 + sig { returns(T::Array[::Symbol]) } + def members; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#281 + def members=(_arg0); end + + # source://rbi//lib/rbi/model.rb#278 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#278 + def name=(_arg0); end +end + +# Sorbet's T::Enum +# +# source://rbi//lib/rbi/model.rb#1329 +class RBI::TEnum < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1340 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#1346 +class RBI::TEnumBlock < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#1356 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1362 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#223 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1367 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# source://rbi//lib/rbi/model.rb#1215 +class RBI::TStruct < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1226 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#1267 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1280 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#555 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1286 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#203 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1292 + sig { override.returns(::String) } + def to_s; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#1232 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#1256 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#546 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1245 + sig { returns(T.nilable(::String)) } + def default; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1245 + def default=(_arg0); end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#1264 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#1239 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1239 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1242 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end + + # @return [Type, String] + # + # source://rbi//lib/rbi/model.rb#1242 + def type=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1297 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1310 + sig do + params( + name: ::String, + type: T.any(::RBI::Type, ::String), + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#564 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1316 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#213 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1322 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#108 +class RBI::Tree < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#121 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#128 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#49 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#38 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end + def create_class(name, superclass_name: T.unsafe(nil), &block); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#90 + sig do + params( + name: ::String, + parameters: T::Array[::RBI::TypedParam], + return_type: T.nilable(::String), + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).void + end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#60 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#25 + sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_module(name, &block); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#9 + sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } + def create_path(constant, &block); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#74 + sig do + params( + name: ::String, + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).void + end + def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi//lib/rbi/model.rb#134 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#118 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#60 + sig { void } + def flatten_singleton_methods!; end + + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#60 + sig { void } + def flatten_visibilities!; end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#81 + sig { void } + def group_nodes!; end + + # source://rbi//lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#46 + sig { void } + def nest_non_public_members!; end + + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#63 + sig { void } + def nest_top_level_members!; end + + # source://rbi//lib/rbi/model.rb#112 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#53 + sig { void } + def replace_attributes_with_methods!; end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 + sig { void } + def sort_nodes!; end + + private + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#123 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#118 + sig { returns(T::Hash[::String, ::RBI::Node]) } + def nodes_cache; end +end + +# The base class for all RBI types. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/type.rb#6 +class RBI::Type + abstract! + + # source://rbi//lib/rbi/type.rb#699 + sig { void } + def initialize; end + + # @abstract + # + # source://rbi//lib/rbi/type.rb#745 + sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#748 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def eql?(other); end + + # source://rbi//lib/rbi/type.rb#753 + sig { override.returns(::Integer) } + def hash; end + + # Returns a new type that is `nilable` if it is not already. + # + # If the type is already nilable, it returns itself. + # ```ruby + # type = RBI::Type.simple("String") + # type.to_rbi # => "String" + # type.nilable.to_rbi # => "T.nilable(String)" + # type.nilable.nilable.to_rbi # => "T.nilable(String)" + # ``` + # + # source://rbi//lib/rbi/type.rb#713 + sig { returns(::RBI::Type) } + def nilable; end + + # Returns whether the type is nilable. + # + # source://rbi//lib/rbi/type.rb#740 + sig { returns(T::Boolean) } + def nilable?; end + + # Returns the non-nilable version of the type. + # If the type is already non-nilable, it returns itself. + # If the type is nilable, it returns the inner type. + # + # ```ruby + # type = RBI::Type.nilable(RBI::Type.simple("String")) + # type.to_rbi # => "T.nilable(String)" + # type.non_nilable.to_rbi # => "String" + # type.non_nilable.non_nilable.to_rbi # => "String" + # ``` + # + # source://rbi//lib/rbi/type.rb#728 + sig { returns(::RBI::Type) } + def non_nilable; end + + # source://rbi//lib/rbi/rbs_printer.rb#1030 + sig { returns(::String) } + def rbs_string; end + + # @abstract + # + # source://rbi//lib/rbi/type.rb#758 + sig { abstract.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#761 + sig { override.returns(::String) } + def to_s; end + + class << self + # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. + # + # Note that this method transforms types such as `T.all(String, String)` into `String`, so + # it may return something other than a `All`. + # + # source://rbi//lib/rbi/type.rb#563 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def all(type1, type2, *types); end + + # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. + # + # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so + # it may return something other than a `Any`. + # + # source://rbi//lib/rbi/type.rb#590 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def any(type1, type2, *types); end + + # Builds a type that represents `T.anything`. + # + # source://rbi//lib/rbi/type.rb#488 + sig { returns(::RBI::Type::Anything) } + def anything; end + + # Builds a type that represents `T.attached_class`. + # + # source://rbi//lib/rbi/type.rb#494 + sig { returns(::RBI::Type::AttachedClass) } + def attached_class; end + + # Builds a type that represents `T::Boolean`. + # + # source://rbi//lib/rbi/type.rb#500 + sig { returns(::RBI::Type::Boolean) } + def boolean; end + + # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. + # + # source://rbi//lib/rbi/type.rb#538 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } + def class_of(type, type_parameter = T.unsafe(nil)); end + + # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. + # + # source://rbi//lib/rbi/type.rb#655 + sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } + def generic(name, *params); end + + # Builds a type that represents a nilable of another type like `T.nilable(String)`. + # + # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so + # it may return something other than a `RBI::Type::Nilable`. + # + # source://rbi//lib/rbi/type.rb#547 + sig { params(type: ::RBI::Type).returns(::RBI::Type) } + def nilable(type); end + + # Builds a type that represents `T.noreturn`. + # + # source://rbi//lib/rbi/type.rb#506 + sig { returns(::RBI::Type::NoReturn) } + def noreturn; end + + # source://rbi//lib/rbi/type_parser.rb#26 + sig { params(node: ::Prism::Node).returns(::RBI::Type) } + def parse_node(node); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#10 + sig { params(string: ::String).returns(::RBI::Type) } + def parse_string(string); end + + # Builds a type that represents a proc type like `T.proc.void`. + # + # source://rbi//lib/rbi/type.rb#683 + sig { returns(::RBI::Type::Proc) } + def proc; end + + # Builds a type that represents `T.self_type`. + # + # source://rbi//lib/rbi/type.rb#512 + sig { returns(::RBI::Type::SelfType) } + def self_type; end + + # Builds a type that represents a shape type like `{name: String, age: Integer}`. + # + # source://rbi//lib/rbi/type.rb#675 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } + def shape(types = T.unsafe(nil)); end + + # Builds a simple type like `String` or `::Foo::Bar`. + # + # It raises a `NameError` if the name is not a valid Ruby class identifier. + # + # @raise [NameError] + # + # source://rbi//lib/rbi/type.rb#477 + sig { params(name: ::String).returns(::RBI::Type::Simple) } + def simple(name); end + + # Builds a type that represents the class of another type like `T::Class[Foo]`. + # + # source://rbi//lib/rbi/type.rb#532 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } + def t_class(type); end + + # Builds a type that represents a tuple type like `[String, Integer]`. + # + # source://rbi//lib/rbi/type.rb#669 + sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } + def tuple(*types); end + + # Builds a type that represents a type parameter like `T.type_parameter(:U)`. + # + # source://rbi//lib/rbi/type.rb#661 + sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } + def type_parameter(name); end + + # Builds a type that represents `T.untyped`. + # + # source://rbi//lib/rbi/type.rb#518 + sig { returns(::RBI::Type::Untyped) } + def untyped; end + + # Builds a type that represents `void`. + # + # source://rbi//lib/rbi/type.rb#524 + sig { returns(::RBI::Type::Void) } + def void; end + + private + + # source://rbi//lib/rbi/type_parser.rb#263 + sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } + def call_chain(node); end + + # source://rbi//lib/rbi/type_parser.rb#250 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_at_least!(node, count); end + + # source://rbi//lib/rbi/type_parser.rb#235 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_exactly!(node, count); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#69 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_call(node); end + + # source://rbi//lib/rbi/type_parser.rb#52 + sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } + def parse_constant(node); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#195 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_proc(node); end + + # source://rbi//lib/rbi/type_parser.rb#176 + sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } + def parse_shape(node); end + + # source://rbi//lib/rbi/type_parser.rb#171 + sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } + def parse_tuple(node); end + + # source://rbi//lib/rbi/type_parser.rb#276 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # source://rbi//lib/rbi/type_parser.rb#288 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_boolean?(node); end + + # source://rbi//lib/rbi/type_parser.rb#295 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_class?(node); end + + # source://rbi//lib/rbi/type_parser.rb#300 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_class_of?(node); end + + # source://rbi//lib/rbi/type_parser.rb#307 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_proc?(node); end + + # source://rbi//lib/rbi/type.rb#693 + sig { params(name: ::String).returns(T::Boolean) } + def valid_identifier?(name); end + end +end + +# A type that is intersection of multiple types like `T.all(String, Integer)`. +# +# source://rbi//lib/rbi/type.rb#252 +class RBI::Type::All < ::RBI::Type::Composite + # source://rbi//lib/rbi/type.rb#256 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type that is union of multiple types like `T.any(String, Integer)`. +# +# source://rbi//lib/rbi/type.rb#262 +class RBI::Type::Any < ::RBI::Type::Composite + # source://rbi//lib/rbi/type.rb#271 + sig { returns(T::Boolean) } + def nilable?; end + + # source://rbi//lib/rbi/type.rb#266 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.anything`. +# +# source://rbi//lib/rbi/type.rb#43 +class RBI::Type::Anything < ::RBI::Type + # source://rbi//lib/rbi/type.rb#47 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#52 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.attached_class`. +# +# source://rbi//lib/rbi/type.rb#58 +class RBI::Type::AttachedClass < ::RBI::Type + # source://rbi//lib/rbi/type.rb#62 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#67 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T::Boolean`. +# +# source://rbi//lib/rbi/type.rb#73 +class RBI::Type::Boolean < ::RBI::Type + # source://rbi//lib/rbi/type.rb#77 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#82 + sig { override.returns(::String) } + def to_rbi; end +end + +# The class of another type like `T::Class[Foo]`. +# +# source://rbi//lib/rbi/type.rb#150 +class RBI::Type::Class < ::RBI::Type + # source://rbi//lib/rbi/type.rb#157 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#163 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#168 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#154 + sig { returns(::RBI::Type) } + def type; end +end + +# The singleton class of another type like `T.class_of(Foo)`. +# +# source://rbi//lib/rbi/type.rb#174 +class RBI::Type::ClassOf < ::RBI::Type + # source://rbi//lib/rbi/type.rb#184 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } + def initialize(type, type_parameter = T.unsafe(nil)); end + + # source://rbi//lib/rbi/type.rb#191 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#196 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#178 + sig { returns(::RBI::Type::Simple) } + def type; end + + # source://rbi//lib/rbi/type.rb#181 + sig { returns(T.nilable(::RBI::Type)) } + def type_parameter; end +end + +# A type that is composed of multiple types like `T.all(String, Integer)`. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/type.rb#230 +class RBI::Type::Composite < ::RBI::Type + abstract! + + # source://rbi//lib/rbi/type.rb#240 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#246 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#237 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# source://rbi//lib/rbi/type_parser.rb#6 +class RBI::Type::Error < ::RBI::Error; end + +# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. +# +# source://rbi//lib/rbi/type.rb#279 +class RBI::Type::Generic < ::RBI::Type + # source://rbi//lib/rbi/type.rb#289 + sig { params(name: ::String, params: ::RBI::Type).void } + def initialize(name, *params); end + + # source://rbi//lib/rbi/type.rb#296 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#283 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/type.rb#286 + sig { returns(T::Array[::RBI::Type]) } + def params; end + + # source://rbi//lib/rbi/type.rb#301 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type that can be `nil` like `T.nilable(String)`. +# +# source://rbi//lib/rbi/type.rb#206 +class RBI::Type::Nilable < ::RBI::Type + # source://rbi//lib/rbi/type.rb#213 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#219 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#224 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#210 + sig { returns(::RBI::Type) } + def type; end +end + +# `T.noreturn`. +# +# source://rbi//lib/rbi/type.rb#88 +class RBI::Type::NoReturn < ::RBI::Type + # source://rbi//lib/rbi/type.rb#92 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#97 + sig { override.returns(::String) } + def to_rbi; end +end + +# A proc type like `T.proc.void`. +# +# source://rbi//lib/rbi/type.rb#387 +class RBI::Type::Proc < ::RBI::Type + # source://rbi//lib/rbi/type.rb#400 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/type.rb#408 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#436 + sig { params(type: T.untyped).returns(T.self_type) } + def bind(type); end + + # source://rbi//lib/rbi/type.rb#418 + sig { params(params: ::RBI::Type).returns(T.self_type) } + def params(**params); end + + # source://rbi//lib/rbi/type.rb#397 + sig { returns(T.nilable(::RBI::Type)) } + def proc_bind; end + + # source://rbi//lib/rbi/type.rb#391 + sig { returns(T::Hash[::Symbol, ::RBI::Type]) } + def proc_params; end + + # source://rbi//lib/rbi/type.rb#394 + sig { returns(::RBI::Type) } + def proc_returns; end + + # source://rbi//lib/rbi/type.rb#424 + sig { params(type: T.untyped).returns(T.self_type) } + def returns(type); end + + # source://rbi//lib/rbi/type.rb#442 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#430 + sig { returns(T.self_type) } + def void; end +end + +# `T.self_type`. +# +# source://rbi//lib/rbi/type.rb#103 +class RBI::Type::SelfType < ::RBI::Type + # source://rbi//lib/rbi/type.rb#107 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#112 + sig { override.returns(::String) } + def to_rbi; end +end + +# A shape type like `{name: String, age: Integer}`. +# +# source://rbi//lib/rbi/type.rb#357 +class RBI::Type::Shape < ::RBI::Type + # source://rbi//lib/rbi/type.rb#364 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#370 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#375 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#361 + sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } + def types; end +end + +# A type that represents a simple class name like `String` or `Foo`. +# +# It can also be a qualified name like `::Foo` or `Foo::Bar`. +# +# source://rbi//lib/rbi/type.rb#17 +class RBI::Type::Simple < ::RBI::Type + # source://rbi//lib/rbi/type.rb#24 + sig { params(name: ::String).void } + def initialize(name); end + + # source://rbi//lib/rbi/type.rb#30 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#21 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/type.rb#35 + sig { override.returns(::String) } + def to_rbi; end +end + +# A tuple type like `[String, Integer]`. +# +# source://rbi//lib/rbi/type.rb#333 +class RBI::Type::Tuple < ::RBI::Type + # source://rbi//lib/rbi/type.rb#340 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#346 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#351 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#337 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# A type parameter like `T.type_parameter(:U)`. +# +# source://rbi//lib/rbi/type.rb#307 +class RBI::Type::TypeParameter < ::RBI::Type + # source://rbi//lib/rbi/type.rb#314 + sig { params(name: ::Symbol).void } + def initialize(name); end + + # source://rbi//lib/rbi/type.rb#320 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#311 + sig { returns(::Symbol) } + def name; end + + # source://rbi//lib/rbi/type.rb#325 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.untyped`. +# +# source://rbi//lib/rbi/type.rb#118 +class RBI::Type::Untyped < ::RBI::Type + # source://rbi//lib/rbi/type.rb#122 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#127 + sig { override.returns(::String) } + def to_rbi; end +end + +# source://rbi//lib/rbi/type_visitor.rb#6 +class RBI::Type::Visitor + # source://rbi//lib/rbi/type_visitor.rb#12 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/type_visitor.rb#58 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/type_visitor.rb#61 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/type_visitor.rb#64 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/type_visitor.rb#67 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/type_visitor.rb#70 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/type_visitor.rb#73 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/type_visitor.rb#76 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/type_visitor.rb#79 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/type_visitor.rb#82 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/type_visitor.rb#88 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/type_visitor.rb#91 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/type_visitor.rb#94 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/type_visitor.rb#100 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/type_visitor.rb#85 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/type_visitor.rb#103 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/type_visitor.rb#106 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/type_visitor.rb#109 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/type_visitor.rb#97 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end +end + +# source://rbi//lib/rbi/type_visitor.rb#9 +class RBI::Type::Visitor::Error < ::RBI::Error; end + +# `void`. +# +# source://rbi//lib/rbi/type.rb#133 +class RBI::Type::Void < ::RBI::Type + # source://rbi//lib/rbi/type.rb#137 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#142 + sig { override.returns(::String) } + def to_rbi; end +end + +# source://rbi//lib/rbi/model.rb#1400 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1415 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1423 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#183 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1404 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1430 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1404 + def value; end +end + +# source://rbi//lib/rbi/rbs_printer.rb#787 +class RBI::TypePrinter + # source://rbi//lib/rbi/rbs_printer.rb#794 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rbs_printer.rb#791 + sig { returns(::String) } + def string; end + + # source://rbi//lib/rbi/rbs_printer.rb#799 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#907 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#917 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#864 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#889 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#848 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#969 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#900 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#853 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#894 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#874 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#948 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#884 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#937 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#843 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#927 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#964 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#879 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#869 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#978 + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); end +end + +# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#5 +class RBI::UnexpectedMultipleSigsError < ::RBI::Error + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10 + sig { params(node: ::RBI::Node).void } + def initialize(node); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#7 + sig { returns(::RBI::Node) } + def node; end +end + +# source://rbi//lib/rbi/parser.rb#20 +class RBI::UnexpectedParserError < ::RBI::Error + # source://rbi//lib/rbi/parser.rb#27 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # source://rbi//lib/rbi/parser.rb#24 + sig { returns(::RBI::Loc) } + def last_location; end + + # source://rbi//lib/rbi/parser.rb#34 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/version.rb#5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# Visibility +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#916 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#926 + sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#932 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#949 + sig { returns(T::Boolean) } + def private?; end + + # source://rbi//lib/rbi/model.rb#944 + sig { returns(T::Boolean) } + def protected?; end + + # source://rbi//lib/rbi/model.rb#939 + sig { returns(T::Boolean) } + def public?; end + + # source://rbi//lib/rbi/model.rb#923 + sig { returns(::Symbol) } + def visibility; end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#52 +class RBI::VisibilityGroup < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#59 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#56 + sig { returns(::RBI::Visibility) } + def visibility; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/visitor.rb#7 +class RBI::Visitor + abstract! + + # source://rbi//lib/rbi/visitor.rb#14 + sig { params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/visitor.rb#108 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/visitor.rb#113 + sig { params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # source://rbi//lib/rbi/visitor.rb#195 + sig { params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/visitor.rb#144 + sig { params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/visitor.rb#147 + sig { params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/visitor.rb#150 + sig { params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/visitor.rb#123 + sig { params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/visitor.rb#174 + sig { params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/visitor.rb#129 + sig { params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/visitor.rb#120 + sig { params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/visitor.rb#240 + sig { params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/visitor.rb#141 + sig { params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/visitor.rb#180 + sig { params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/visitor.rb#234 + sig { params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/visitor.rb#222 + sig { params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/visitor.rb#177 + sig { params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/visitor.rb#198 + sig { params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/visitor.rb#168 + sig { params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/visitor.rb#165 + sig { params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/visitor.rb#171 + sig { params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/visitor.rb#153 + sig { params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/visitor.rb#228 + sig { params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/visitor.rb#126 + sig { params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/visitor.rb#159 + sig { params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/visitor.rb#189 + sig { params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/visitor.rb#186 + sig { params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/visitor.rb#183 + sig { params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/visitor.rb#156 + sig { params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/visitor.rb#231 + sig { params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/visitor.rb#162 + sig { params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/visitor.rb#243 + sig { params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/visitor.rb#192 + sig { params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/visitor.rb#201 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/visitor.rb#204 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/visitor.rb#132 + sig { params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/visitor.rb#135 + sig { params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/visitor.rb#216 + sig { params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/visitor.rb#219 + sig { params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/visitor.rb#138 + sig { params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/visitor.rb#207 + sig { params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/visitor.rb#210 + sig { params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/visitor.rb#213 + sig { params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/visitor.rb#225 + sig { params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/visitor.rb#237 + sig { params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end +end + +# source://rbi//lib/rbi/visitor.rb#5 +class RBI::VisitorError < ::RBI::Error; end diff --git a/sorbet/rbi/gems/regexp_parser@2.9.0.rbi b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi similarity index 99% rename from sorbet/rbi/gems/regexp_parser@2.9.0.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.2.rbi index 34ad4f2..584c455 100644 --- a/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `regexp_parser` gem. # Please instead update this file by running `bin/tapioca gem regexp_parser`. + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#1 module Regexp::Expression; end @@ -1132,7 +1133,7 @@ end # source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#2 module Regexp::Expression::Keep; end -# TOOD: in regexp_parser v3.0.0 this should possibly be a Subexpression +# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression # that contains all expressions to its left. # # source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#5 @@ -2368,7 +2369,7 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#262 def assign_effective_number(exp); end - # Assigns referenced expressions to refering expressions, e.g. if there is + # Assigns referenced expressions to referring expressions, e.g. if there is # an instance of Backreference::Number, its #referenced_expression is set to # the instance of Group::Capture that it refers to via its number. # diff --git a/sorbet/rbi/gems/reline@0.4.2.rbi b/sorbet/rbi/gems/reline@0.5.10.rbi similarity index 99% rename from sorbet/rbi/gems/reline@0.4.2.rbi rename to sorbet/rbi/gems/reline@0.5.10.rbi index b8c01d4..13fa313 100644 --- a/sorbet/rbi/gems/reline@0.4.2.rbi +++ b/sorbet/rbi/gems/reline@0.5.10.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `reline` gem. # Please instead update this file by running `bin/tapioca gem reline`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rexml@3.2.6.rbi b/sorbet/rbi/gems/rexml@3.2.6.rbi deleted file mode 100644 index c8d67b5..0000000 --- a/sorbet/rbi/gems/rexml@3.2.6.rbi +++ /dev/null @@ -1,4781 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rexml` gem. -# Please instead update this file by running `bin/tapioca gem rexml`. - -# This class needs: -# * Documentation -# * Work! Not all types of attlists are intelligently parsed, so we just -# spew back out what we get in. This works, but it would be better if -# we formatted the output ourselves. -# -# AttlistDecls provide *just* enough support to allow namespace -# declarations. If you need some sort of generalized support, or have an -# interesting idea about how to map the hideous, terrible design of DTD -# AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate -# for anything to make DTDs more palateable. -# -# source://rexml//lib/rexml/attlistdecl.rb#18 -class REXML::AttlistDecl < ::REXML::Child - include ::Enumerable - - # Create an AttlistDecl, pulling the information from a Source. Notice - # that this isn't very convenient; to create an AttlistDecl, you basically - # have to format it yourself, and then have the initializer parse it. - # Sorry, but for the foreseeable future, DTD support in REXML is pretty - # weak on convenience. Have I mentioned how much I hate DTDs? - # - # @return [AttlistDecl] a new instance of AttlistDecl - # - # source://rexml//lib/rexml/attlistdecl.rb#29 - def initialize(source); end - - # Access the attlist attribute/value pairs. - # value = attlist_decl[ attribute_name ] - # - # source://rexml//lib/rexml/attlistdecl.rb#38 - def [](key); end - - # Iterate over the key/value pairs: - # attlist_decl.each { |attribute_name, attribute_value| ... } - # - # source://rexml//lib/rexml/attlistdecl.rb#50 - def each(&block); end - - # What is this? Got me. - # - # source://rexml//lib/rexml/attlistdecl.rb#22 - def element_name; end - - # Whether an attlist declaration includes the given attribute definition - # if attlist_decl.include? "xmlns:foobar" - # - # @return [Boolean] - # - # source://rexml//lib/rexml/attlistdecl.rb#44 - def include?(key); end - - # source://rexml//lib/rexml/attlistdecl.rb#59 - def node_type; end - - # Write out exactly what we got in. - # - # source://rexml//lib/rexml/attlistdecl.rb#55 - def write(out, indent = T.unsafe(nil)); end -end - -# Defines an Element Attribute; IE, a attribute=value pair, as in: -# . Attributes can be in their own -# namespaces. General users of REXML will not interact with the -# Attribute class much. -# -# source://rexml//lib/rexml/attribute.rb#10 -class REXML::Attribute - include ::REXML::Node - include ::REXML::XMLTokens - include ::REXML::Namespace - - # Constructor. - # FIXME: The parser doesn't catch illegal characters in attributes - # - # first:: - # Either: an Attribute, which this new attribute will become a - # clone of; or a String, which is the name of this attribute - # second:: - # If +first+ is an Attribute, then this may be an Element, or nil. - # If nil, then the Element parent of this attribute is the parent - # of the +first+ Attribute. If the first argument is a String, - # then this must also be a String, and is the content of the attribute. - # If this is the content, it must be fully normalized (contain no - # illegal characters). - # parent:: - # Ignored unless +first+ is a String; otherwise, may be the Element - # parent of this attribute, or nil. - # - # - # Attribute.new( attribute_to_clone ) - # Attribute.new( attribute_to_clone, parent_element ) - # Attribute.new( "attr", "attr_value" ) - # Attribute.new( "attr", "attr_value", parent_element ) - # - # @return [Attribute] a new instance of Attribute - # - # source://rexml//lib/rexml/attribute.rb#42 - def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end - - # Returns true if other is an Attribute and has the same name and value, - # false otherwise. - # - # source://rexml//lib/rexml/attribute.rb#106 - def ==(other); end - - # Returns a copy of this attribute - # - # source://rexml//lib/rexml/attribute.rb#163 - def clone; end - - # source://rexml//lib/rexml/attribute.rb#132 - def doctype; end - - # The element to which this attribute belongs - # - # source://rexml//lib/rexml/attribute.rb#15 - def element; end - - # Sets the element of which this object is an attribute. Normally, this - # is not directly called. - # - # Returns this attribute - # - # source://rexml//lib/rexml/attribute.rb#171 - def element=(element); end - - # Creates (and returns) a hash from both the name and value - # - # source://rexml//lib/rexml/attribute.rb#111 - def hash; end - - # source://rexml//lib/rexml/attribute.rb#197 - def inspect; end - - # Returns the namespace URL, if defined, or nil otherwise - # - # e = Element.new("el") - # e.add_namespace("ns", "http://url") - # e.add_attribute("ns:a", "b") - # e.add_attribute("nsx:a", "c") - # e.attribute("ns:a").namespace # => "http://url" - # e.attribute("nsx:a").namespace # => nil - # - # This method always returns "" for no namespace attribute. Because - # the default namespace doesn't apply to attribute names. - # - # From https://www.w3.org/TR/xml-names/#uniqAttrs - # - # > the default namespace does not apply to attribute names - # - # e = REXML::Element.new("el") - # e.add_namespace("", "http://example.com/") - # e.namespace # => "http://example.com/" - # e.add_attribute("a", "b") - # e.attribute("a").namespace # => "" - # - # source://rexml//lib/rexml/attribute.rb#95 - def namespace(arg = T.unsafe(nil)); end - - # source://rexml//lib/rexml/attribute.rb#193 - def node_type; end - - # The normalized value of this attribute. That is, the attribute with - # entities intact. - # - # source://rexml//lib/rexml/attribute.rb#157 - def normalized=(new_normalized); end - - # Returns the namespace of the attribute. - # - # e = Element.new( "elns:myelement" ) - # e.add_attribute( "nsa:a", "aval" ) - # e.add_attribute( "b", "bval" ) - # e.attributes.get_attribute( "a" ).prefix # -> "nsa" - # e.attributes.get_attribute( "b" ).prefix # -> "" - # a = Attribute.new( "x", "y" ) - # a.prefix # -> "" - # - # source://rexml//lib/rexml/attribute.rb#70 - def prefix; end - - # Removes this Attribute from the tree, and returns true if successful - # - # This method is usually not called directly. - # - # source://rexml//lib/rexml/attribute.rb#184 - def remove; end - - # Returns the attribute value, with entities replaced - # - # source://rexml//lib/rexml/attribute.rb#140 - def to_s; end - - # Returns this attribute out as XML source, expanding the name - # - # a = Attribute.new( "x", "y" ) - # a.to_string # -> "x='y'" - # b = Attribute.new( "ns:x", "y" ) - # b.to_string # -> "ns:x='y'" - # - # source://rexml//lib/rexml/attribute.rb#121 - def to_string; end - - # Returns the UNNORMALIZED value of this attribute. That is, entities - # have been expanded to their values - # - # source://rexml//lib/rexml/attribute.rb#149 - def value; end - - # Writes this attribute (EG, puts 'key="value"' to the output) - # - # source://rexml//lib/rexml/attribute.rb#189 - def write(output, indent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/attribute.rb#203 - def xpath; end -end - -# A class that defines the set of Attributes of an Element and provides -# operations for accessing elements in that set. -# -# source://rexml//lib/rexml/element.rb#2141 -class REXML::Attributes < ::Hash - # :call-seq: - # new(element) - # - # Creates and returns a new \REXML::Attributes object. - # The element given by argument +element+ is stored, - # but its own attributes are not modified: - # - # ele = REXML::Element.new('foo') - # attrs = REXML::Attributes.new(ele) - # attrs.object_id == ele.attributes.object_id # => false - # - # Other instance methods in class \REXML::Attributes may refer to: - # - # - +element.document+. - # - +element.prefix+. - # - +element.expanded_name+. - # - # @return [Attributes] a new instance of Attributes - # - # source://rexml//lib/rexml/element.rb#2160 - def initialize(element); end - - # :call-seq: - # add(attribute) -> attribute - # - # Adds attribute +attribute+, replacing the previous - # attribute of the same name if it exists; - # returns +attribute+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} - # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' - # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' - # attrs.include?('baz') # => true - # - # source://rexml//lib/rexml/element.rb#2537 - def <<(attribute); end - - # :call-seq: - # [name] -> attribute_value or nil - # - # Returns the value for the attribute given by +name+, - # if it exists; otherwise +nil+. - # The value returned is the unnormalized attribute value, - # with entities expanded: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.elements['//ele'] # => - # ele.attributes['att'] # => "<" - # ele.attributes['bar:att'] # => "2" - # ele.attributes['nosuch'] # => nil - # - # Related: get_attribute (returns an \Attribute object). - # - # source://rexml//lib/rexml/element.rb#2185 - def [](name); end - - # :call-seq: - # [name] = value -> value - # - # When +value+ is non-+nil+, - # assigns that to the attribute for the given +name+, - # overwriting the previous value if it exists: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs['foo:att'] = '2' # => "2" - # attrs['baz:att'] = '3' # => "3" - # - # When +value+ is +nil+, deletes the attribute if it exists: - # - # attrs['baz:att'] = nil - # attrs.include?('baz:att') # => false - # - # source://rexml//lib/rexml/element.rb#2369 - def []=(name, value); end - - # :call-seq: - # add(attribute) -> attribute - # - # Adds attribute +attribute+, replacing the previous - # attribute of the same name if it exists; - # returns +attribute+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} - # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' - # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' - # attrs.include?('baz') # => true - # - # source://rexml//lib/rexml/element.rb#2537 - def add(attribute); end - - # :call-seq: - # delete(name) -> element - # delete(attribute) -> element - # - # Removes a specified attribute if it exists; - # returns the attributes' element. - # - # When string argument +name+ is given, - # removes the attribute of that name if it exists: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.delete('foo:att') # => - # attrs.delete('foo:att') # => - # - # When attribute argument +attribute+ is given, - # removes that attribute if it exists: - # - # attr = REXML::Attribute.new('bar:att', '2') - # attrs.delete(attr) # => # => - # attrs.delete(attr) # => # => - # - # source://rexml//lib/rexml/element.rb#2490 - def delete(attribute); end - - # :call-seq: - # delete_all(name) -> array_of_removed_attributes - # - # Removes all attributes matching the given +name+; - # returns an array of the removed attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.delete_all('att') # => [att='<'] - # - # source://rexml//lib/rexml/element.rb#2559 - def delete_all(name); end - - # :call-seq: - # each {|expanded_name, value| ... } - # - # Calls the given block with each expanded-name/value pair: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.each do |expanded_name, value| - # p [expanded_name, value] - # end - # - # Output: - # - # ["foo:att", "1"] - # ["bar:att", "2"] - # ["att", "<"] - # - # source://rexml//lib/rexml/element.rb#2287 - def each; end - - # :call-seq: - # each_attribute {|attr| ... } - # - # Calls the given block with each \REXML::Attribute object: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.each_attribute do |attr| - # p [attr.class, attr] - # end - # - # Output: - # - # [REXML::Attribute, foo:att='1'] - # [REXML::Attribute, bar:att='2'] - # [REXML::Attribute, att='<'] - # - # source://rexml//lib/rexml/element.rb#2254 - def each_attribute; end - - # :call-seq: - # get_attribute(name) -> attribute_object or nil - # - # Returns the \REXML::Attribute object for the given +name+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.get_attribute('foo:att') # => foo:att='1' - # attrs.get_attribute('foo:att').class # => REXML::Attribute - # attrs.get_attribute('bar:att') # => bar:att='2' - # attrs.get_attribute('att') # => att='<' - # attrs.get_attribute('nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#2313 - def get_attribute(name); end - - # :call-seq: - # get_attribute_ns(namespace, name) - # - # Returns the \REXML::Attribute object among the attributes - # that matches the given +namespace+ and +name+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1' - # attrs.get_attribute_ns('http://foo', 'nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#2585 - def get_attribute_ns(namespace, name); end - - # :call-seq: - # length - # - # Returns the count of attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.length # => 3 - # - # source://rexml//lib/rexml/element.rb#2225 - def length; end - - # :call-seq: - # namespaces - # - # Returns a hash of name/value pairs for the namespaces: - # - # xml_string = '' - # d = REXML::Document.new(xml_string) - # d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"} - # - # source://rexml//lib/rexml/element.rb#2446 - def namespaces; end - - # :call-seq: - # prefixes -> array_of_prefix_strings - # - # Returns an array of prefix strings in the attributes. - # The array does not include the default - # namespace declaration, if one exists. - # - # xml_string = '' - # d = REXML::Document.new(xml_string) - # d.root.attributes.prefixes # => ["x", "y"] - # - # source://rexml//lib/rexml/element.rb#2421 - def prefixes; end - - # :call-seq: - # length - # - # Returns the count of attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.length # => 3 - # - # source://rexml//lib/rexml/element.rb#2225 - def size; end - - # :call-seq: - # to_a -> array_of_attribute_objects - # - # Returns an array of \REXML::Attribute objects representing - # the attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<'] - # attrs.first.class # => REXML::Attribute - # - # source://rexml//lib/rexml/element.rb#2207 - def to_a; end -end - -# source://rexml//lib/rexml/cdata.rb#5 -class REXML::CData < ::REXML::Text - # Constructor. CData is data between - # - # _Examples_ - # CData.new( source ) - # CData.new( "Here is some CDATA" ) - # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) - # - # @return [CData] a new instance of CData - # - # source://rexml//lib/rexml/cdata.rb#16 - def initialize(first, whitespace = T.unsafe(nil), parent = T.unsafe(nil)); end - - # Make a copy of this object - # - # _Examples_ - # c = CData.new( "Some text" ) - # d = c.clone - # d.to_s # -> "Some text" - # - # source://rexml//lib/rexml/cdata.rb#26 - def clone; end - - # Returns the content of this CData object - # - # _Examples_ - # c = CData.new( "Some text" ) - # c.to_s # -> "Some text" - # - # source://rexml//lib/rexml/cdata.rb#35 - def to_s; end - - # source://rexml//lib/rexml/cdata.rb#39 - def value; end - - # == DEPRECATED - # See the rexml/formatters package - # - # Generates XML output of this object - # - # output:: - # Where to write the string. Defaults to $stdout - # indent:: - # The amount to indent this node by - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # _Examples_ - # c = CData.new( " Some text " ) - # c.write( $stdout ) #-> - # - # source://rexml//lib/rexml/cdata.rb#60 - def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# A Child object is something contained by a parent, and this class -# contains methods to support that. Most user code will not use this -# class directly. -# -# source://rexml//lib/rexml/child.rb#9 -class REXML::Child - include ::REXML::Node - - # Constructor. Any inheritors of this class should call super to make - # sure this method is called. - # parent:: - # if supplied, the parent of this child will be set to the - # supplied value, and self will be added to the parent - # - # @return [Child] a new instance of Child - # - # source://rexml//lib/rexml/child.rb#18 - def initialize(parent = T.unsafe(nil)); end - - # This doesn't yet handle encodings - # - # source://rexml//lib/rexml/child.rb#91 - def bytes; end - - # Returns:: the document this child belongs to, or nil if this child - # belongs to no document - # - # source://rexml//lib/rexml/child.rb#85 - def document; end - - # source://rexml//lib/rexml/node.rb#11 - def next_sibling; end - - # Sets the next sibling of this child. This can be used to insert a child - # after some other child. - # a = Element.new("a") - # b = a.add_element("b") - # c = Element.new("c") - # b.next_sibling = c - # # => - # - # source://rexml//lib/rexml/child.rb#68 - def next_sibling=(other); end - - # The Parent of this object - # - # source://rexml//lib/rexml/child.rb#11 - def parent; end - - # Sets the parent of this child to the supplied argument. - # - # other:: - # Must be a Parent object. If this object is the same object as the - # existing parent of this child, no action is taken. Otherwise, this - # child is removed from the current parent (if one exists), and is added - # to the new parent. - # Returns:: The parent added - # - # source://rexml//lib/rexml/child.rb#52 - def parent=(other); end - - # source://rexml//lib/rexml/node.rb#17 - def previous_sibling; end - - # Sets the previous sibling of this child. This can be used to insert a - # child before some other child. - # a = Element.new("a") - # b = a.add_element("b") - # c = Element.new("c") - # b.previous_sibling = c - # # => - # - # source://rexml//lib/rexml/child.rb#79 - def previous_sibling=(other); end - - # Removes this child from the parent. - # - # Returns:: self - # - # source://rexml//lib/rexml/child.rb#37 - def remove; end - - # Replaces this object with another object. Basically, calls - # Parent.replace_child - # - # Returns:: self - # - # source://rexml//lib/rexml/child.rb#29 - def replace_with(child); end -end - -# Represents an XML comment; that is, text between \ -# -# source://rexml//lib/rexml/comment.rb#7 -class REXML::Comment < ::REXML::Child - include ::Comparable - - # Constructor. The first argument can be one of three types: - # argument. If Comment, the argument is duplicated. If - # Source, the argument is scanned for a comment. - # should be nil, not supplied, or a Parent to be set as the parent - # of this object - # - # @param first If String, the contents of this comment are set to the - # @param second If the first argument is a Source, this argument - # @return [Comment] a new instance of Comment - # - # source://rexml//lib/rexml/comment.rb#24 - def initialize(first, second = T.unsafe(nil)); end - - # Compares this Comment to another; the contents of the comment are used - # in the comparison. - # - # source://rexml//lib/rexml/comment.rb#63 - def <=>(other); end - - # Compares this Comment to another; the contents of the comment are used - # in the comparison. - # - # source://rexml//lib/rexml/comment.rb#70 - def ==(other); end - - # source://rexml//lib/rexml/comment.rb#33 - def clone; end - - # source://rexml//lib/rexml/comment.rb#75 - def node_type; end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def string; end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def string=(_arg0); end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def to_s; end - - # == DEPRECATED - # See REXML::Formatters - # - # output:: - # Where to write the string - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. - # transitive:: - # Ignored by this class. The contents of comments are never modified. - # ie_hack:: - # Needed for conformity to the child API, but not used by this class. - # - # source://rexml//lib/rexml/comment.rb#50 - def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/xpath_parser.rb#11 -module REXML::DClonable; end - -# This is an abstract class. You never use this directly; it serves as a -# parent class for the specific declarations. -# -# source://rexml//lib/rexml/doctype.rb#242 -class REXML::Declaration < ::REXML::Child - # @return [Declaration] a new instance of Declaration - # - # source://rexml//lib/rexml/doctype.rb#243 - def initialize(src); end - - # source://rexml//lib/rexml/doctype.rb#248 - def to_s; end - - # == DEPRECATED - # See REXML::Formatters - # - # source://rexml//lib/rexml/doctype.rb#255 - def write(output, indent); end -end - -# Represents an XML DOCTYPE declaration; that is, the contents of . DOCTYPES can be used to declare the DTD of a document, as well as -# being used to declare entities used in the document. -# -# source://rexml//lib/rexml/doctype.rb#51 -class REXML::DocType < ::REXML::Parent - include ::REXML::XMLTokens - - # Constructor - # - # dt = DocType.new( 'foo', '-//I/Hate/External/IDs' ) - # # - # dt = DocType.new( doctype_to_clone ) - # # Incomplete. Shallow clone of doctype - # - # +Note+ that the constructor: - # - # Doctype.new( Source.new( "" ) ) - # - # is _deprecated_. Do not use it. It will probably disappear. - # - # @return [DocType] a new instance of DocType - # - # source://rexml//lib/rexml/doctype.rb#80 - def initialize(first, parent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/doctype.rb#185 - def add(child); end - - # source://rexml//lib/rexml/doctype.rb#125 - def attribute_of(element, attribute); end - - # source://rexml//lib/rexml/doctype.rb#115 - def attributes_of(element); end - - # source://rexml//lib/rexml/doctype.rb#135 - def clone; end - - # source://rexml//lib/rexml/doctype.rb#173 - def context; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def entities; end - - # source://rexml//lib/rexml/doctype.rb#181 - def entity(name); end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def external_id; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def name; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def namespaces; end - - # source://rexml//lib/rexml/doctype.rb#111 - def node_type; end - - # Retrieves a named notation. Only notations declared in the internal - # DTD subset can be retrieved. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#229 - def notation(name); end - - # This method returns a list of notations that have been declared in the - # _internal_ DTD subset. Notations in the external DTD subset are not - # listed. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#221 - def notations; end - - # This method retrieves the public identifier identifying the document's - # DTD. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#195 - def public; end - - # This method retrieves the system identifier identifying the document's DTD - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#207 - def system; end - - # output:: - # Where to write the string - # indent:: - # An integer. If -1, no indentation will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # source://rexml//lib/rexml/doctype.rb#149 - def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# Represents an XML document. -# -# A document may have: -# -# - A single child that may be accessed via method #root. -# - An XML declaration. -# - A document type. -# - Processing instructions. -# -# == In a Hurry? -# -# If you're somewhat familiar with XML -# and have a particular task in mind, -# you may want to see the -# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], -# and in particular, the -# {tasks page for documents}[../doc/rexml/tasks/tocs/document_toc_rdoc.html]. -# -# source://rexml//lib/rexml/document.rb#35 -class REXML::Document < ::REXML::Element - # :call-seq: - # new(string = nil, context = {}) -> new_document - # new(io_stream = nil, context = {}) -> new_document - # new(document = nil, context = {}) -> new_document - # - # Returns a new \REXML::Document object. - # - # When no arguments are given, - # returns an empty document: - # - # d = REXML::Document.new - # d.to_s # => "" - # - # When argument +string+ is given, it must be a string - # containing a valid XML document: - # - # xml_string = 'FooBar' - # d = REXML::Document.new(xml_string) - # d.to_s # => "FooBar" - # - # When argument +io_stream+ is given, it must be an \IO object - # that is opened for reading, and when read must return a valid XML document: - # - # File.write('t.xml', xml_string) - # d = File.open('t.xml', 'r') do |io| - # REXML::Document.new(io) - # end - # d.to_s # => "FooBar" - # - # When argument +document+ is given, it must be an existing - # document object, whose context and attributes (but not children) - # are cloned into the new document: - # - # d = REXML::Document.new(xml_string) - # d.children # => [ ... ] - # d.context = {raw: :all, compress_whitespace: :all} - # d.add_attributes({'bar' => 0, 'baz' => 1}) - # d1 = REXML::Document.new(d) - # d1.children # => [] - # d1.context # => {:raw=>:all, :compress_whitespace=>:all} - # d1.attributes # => {"bar"=>bar='0', "baz"=>baz='1'} - # - # When argument +context+ is given, it must be a hash - # containing context entries for the document; - # see {Element Context}[../doc/rexml/context_rdoc.html]: - # - # context = {raw: :all, compress_whitespace: :all} - # d = REXML::Document.new(xml_string, context) - # d.context # => {:raw=>:all, :compress_whitespace=>:all} - # - # @return [Document] a new instance of Document - # - # source://rexml//lib/rexml/document.rb#92 - def initialize(source = T.unsafe(nil), context = T.unsafe(nil)); end - - # :call-seq: - # add(xml_decl) -> self - # add(doc_type) -> self - # add(object) -> self - # - # Adds an object to the document; returns +self+. - # - # When argument +xml_decl+ is given, - # it must be an REXML::XMLDecl object, - # which becomes the XML declaration for the document, - # replacing the previous XML declaration if any: - # - # d = REXML::Document.new - # d.xml_decl.to_s # => "" - # d.add(REXML::XMLDecl.new('2.0')) - # d.xml_decl.to_s # => "" - # - # When argument +doc_type+ is given, - # it must be an REXML::DocType object, - # which becomes the document type for the document, - # replacing the previous document type, if any: - # - # d = REXML::Document.new - # d.doctype.to_s # => "" - # d.add(REXML::DocType.new('foo')) - # d.doctype.to_s # => "" - # - # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) - # is given it is added as the last child: - # - # d = REXML::Document.new - # d.add(REXML::Element.new('foo')) - # d.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#170 - def <<(child); end - - # :call-seq: - # add(xml_decl) -> self - # add(doc_type) -> self - # add(object) -> self - # - # Adds an object to the document; returns +self+. - # - # When argument +xml_decl+ is given, - # it must be an REXML::XMLDecl object, - # which becomes the XML declaration for the document, - # replacing the previous XML declaration if any: - # - # d = REXML::Document.new - # d.xml_decl.to_s # => "" - # d.add(REXML::XMLDecl.new('2.0')) - # d.xml_decl.to_s # => "" - # - # When argument +doc_type+ is given, - # it must be an REXML::DocType object, - # which becomes the document type for the document, - # replacing the previous document type, if any: - # - # d = REXML::Document.new - # d.doctype.to_s # => "" - # d.add(REXML::DocType.new('foo')) - # d.doctype.to_s # => "" - # - # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) - # is given it is added as the last child: - # - # d = REXML::Document.new - # d.add(REXML::Element.new('foo')) - # d.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#170 - def add(child); end - - # :call-seq: - # add_element(name_or_element = nil, attributes = nil) -> new_element - # - # Adds an element to the document by calling REXML::Element.add_element: - # - # REXML::Element.add_element(name_or_element, attributes) - # - # source://rexml//lib/rexml/document.rb#209 - def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end - - # :call-seq: - # clone -> new_document - # - # Returns the new document resulting from executing - # Document.new(self). See Document.new. - # - # source://rexml//lib/rexml/document.rb#120 - def clone; end - - # :call-seq: - # doctype -> doc_type or nil - # - # Returns the DocType object for the document, if it exists, otherwise +nil+: - # - # d = REXML::Document.new('') - # d.doctype.class # => REXML::DocType - # d = REXML::Document.new('') - # d.doctype.class # => nil - # - # source://rexml//lib/rexml/document.rb#241 - def doctype; end - - # source://rexml//lib/rexml/document.rb#442 - def document; end - - # :call-seq: - # encoding -> encoding_string - # - # Returns the XMLDecl encoding of the document, - # - # d = REXML::Document.new('') - # d.encoding # => "UTF-16" - # d = REXML::Document.new('') - # d.encoding # => "UTF-8" - # - # source://rexml//lib/rexml/document.rb#290 - def encoding; end - - # Returns the value of attribute entity_expansion_count. - # - # source://rexml//lib/rexml/document.rb#433 - def entity_expansion_count; end - - # :call-seq: - # expanded_name -> empty_string - # - # Returns an empty string. - # - # source://rexml//lib/rexml/document.rb#129 - def expanded_name; end - - # :call-seq: - # expanded_name -> empty_string - # - # Returns an empty string. - # d = doc_type - # d ? d.name : "UNDEFINED" - # - # source://rexml//lib/rexml/document.rb#129 - def name; end - - # :call-seq: - # node_type -> :document - # - # Returns the symbol +:document+. - # - # source://rexml//lib/rexml/document.rb#110 - def node_type; end - - # source://rexml//lib/rexml/document.rb#435 - def record_entity_expansion; end - - # :call-seq: - # root -> root_element or nil - # - # Returns the root element of the document, if it exists, otherwise +nil+: - # - # d = REXML::Document.new('') - # d.root # => - # d = REXML::Document.new('') - # d.root # => nil - # - # source://rexml//lib/rexml/document.rb#225 - def root; end - - # :call-seq: - # stand_alone? - # - # Returns the XMLDecl standalone value of the document as a string, - # if it has been set, otherwise the default standalone value: - # - # d = REXML::Document.new('') - # d.stand_alone? # => "yes" - # d = REXML::Document.new('') - # d.stand_alone? # => nil - # - # @return [Boolean] - # - # source://rexml//lib/rexml/document.rb#305 - def stand_alone?; end - - # :call-seq: - # version -> version_string - # - # Returns the XMLDecl version of this document as a string, - # if it has been set, otherwise the default version: - # - # d = REXML::Document.new('') - # d.version # => "2.0" - # d = REXML::Document.new('') - # d.version # => "1.0" - # - # source://rexml//lib/rexml/document.rb#275 - def version; end - - # :call-seq: - # doc.write(output=$stdout, indent=-1, transtive=false, ie_hack=false, encoding=nil) - # doc.write(options={:output => $stdout, :indent => -1, :transtive => false, :ie_hack => false, :encoding => nil}) - # - # Write the XML tree out, optionally with indent. This writes out the - # entire XML document, including XML declarations, doctype declarations, - # and processing instructions (if any are given). - # - # A controversial point is whether Document should always write the XML - # declaration () whether or not one is given by the - # user (or source document). REXML does not write one if one was not - # specified, because it adds unnecessary bandwidth to applications such - # as XML-RPC. - # - # Accept Nth argument style and options Hash style as argument. - # The recommended style is options Hash style for one or more - # arguments case. - # - # _Examples_ - # Document.new("").write - # - # output = "" - # Document.new("").write(output) - # - # output = "" - # Document.new("").write(:output => output, :indent => 2) - # - # See also the classes in the rexml/formatters package for the proper way - # to change the default formatting of XML output. - # - # _Examples_ - # - # output = "" - # tr = Transitive.new - # tr.write(Document.new(""), output) - # - # output:: - # output an object which supports '<< string'; this is where the - # document will be written. - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be twice this number of spaces, and children will be - # indented an additional amount. For a value of 3, every item will be - # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 - # transitive:: - # If transitive is true and indent is >= 0, then the output will be - # pretty-printed in such a way that the added whitespace does not affect - # the absolute *value* of the document -- that is, it leaves the value - # and number of Text nodes in the document unchanged. - # ie_hack:: - # This hack inserts a space before the /> on empty tags to address - # a limitation of Internet Explorer. Defaults to false - # Encoding name as String. Change output encoding to specified encoding - # instead of encoding in XML declaration. - # Defaults to nil. It means encoding in XML declaration is used. - # - # source://rexml//lib/rexml/document.rb#365 - def write(*arguments); end - - # :call-seq: - # xml_decl -> xml_decl - # - # Returns the XMLDecl object for the document, if it exists, - # otherwise the default XMLDecl object: - # - # d = REXML::Document.new('') - # d.xml_decl.class # => REXML::XMLDecl - # d.xml_decl.to_s # => "" - # d = REXML::Document.new('') - # d.xml_decl.class # => REXML::XMLDecl - # d.xml_decl.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#258 - def xml_decl; end - - private - - # source://rexml//lib/rexml/document.rb#447 - def build(source); end - - class << self - # Get the entity expansion limit. By default the limit is set to 10000. - # - # Deprecated. Use REXML::Security.entity_expansion_limit= instead. - # - # source://rexml//lib/rexml/document.rb#415 - def entity_expansion_limit; end - - # Set the entity expansion limit. By default the limit is set to 10000. - # - # Deprecated. Use REXML::Security.entity_expansion_limit= instead. - # - # source://rexml//lib/rexml/document.rb#408 - def entity_expansion_limit=(val); end - - # Get the entity expansion limit. By default the limit is set to 10240. - # - # Deprecated. Use REXML::Security.entity_expansion_text_limit instead. - # - # source://rexml//lib/rexml/document.rb#429 - def entity_expansion_text_limit; end - - # Set the entity expansion limit. By default the limit is set to 10240. - # - # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead. - # - # source://rexml//lib/rexml/document.rb#422 - def entity_expansion_text_limit=(val); end - - # source://rexml//lib/rexml/document.rb#401 - def parse_stream(source, listener); end - end -end - -# An \REXML::Element object represents an XML element. -# -# An element: -# -# - Has a name (string). -# - May have a parent (another element). -# - Has zero or more children -# (other elements, text, CDATA, processing instructions, and comments). -# - Has zero or more siblings -# (other elements, text, CDATA, processing instructions, and comments). -# - Has zero or more named attributes. -# -# == In a Hurry? -# -# If you're somewhat familiar with XML -# and have a particular task in mind, -# you may want to see the -# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], -# and in particular, the -# {tasks page for elements}[../doc/rexml/tasks/tocs/element_toc_rdoc.html]. -# -# === Name -# -# An element has a name, which is initially set when the element is created: -# -# e = REXML::Element.new('foo') -# e.name # => "foo" -# -# The name may be changed: -# -# e.name = 'bar' -# e.name # => "bar" -# -# -# === \Parent -# -# An element may have a parent. -# -# Its parent may be assigned explicitly when the element is created: -# -# e0 = REXML::Element.new('foo') -# e1 = REXML::Element.new('bar', e0) -# e1.parent # => ... -# -# Note: the representation of an element always shows the element's name. -# If the element has children, the representation indicates that -# by including an ellipsis (...). -# -# The parent may be assigned explicitly at any time: -# -# e2 = REXML::Element.new('baz') -# e1.parent = e2 -# e1.parent # => -# -# When an element is added as a child, its parent is set automatically: -# -# e1.add_element(e0) -# e0.parent # => ... -# -# For an element that has no parent, method +parent+ returns +nil+. -# -# === Children -# -# An element has zero or more children. -# The children are an ordered collection -# of all objects whose parent is the element itself. -# -# The children may include any combination of elements, text, comments, -# processing instructions, and CDATA. -# (This example keeps things clean by controlling whitespace -# via a +context+ setting.) -# -# xml_string = <<-EOT -# -# -# text 0 -# -# -# -# -# text 1 -# -# -# -# -# EOT -# context = {ignore_whitespace_nodes: :all, compress_whitespace: :all} -# d = REXML::Document.new(xml_string, context) -# root = d.root -# root.children.size # => 10 -# root.each {|child| p "#{child.class}: #{child}" } -# -# Output: -# -# "REXML::Element: " -# "REXML::Text: \n text 0\n " -# "REXML::Comment: comment 0" -# "REXML::Instruction: " -# "REXML::CData: cdata 0" -# "REXML::Element: " -# "REXML::Text: \n text 1\n " -# "REXML::Comment: comment 1" -# "REXML::Instruction: " -# "REXML::CData: cdata 1" -# -# A child may be added using inherited methods -# Parent#insert_before or Parent#insert_after: -# -# xml_string = '' -# d = REXML::Document.new(xml_string) -# root = d.root -# c = d.root[1] # => -# root.insert_before(c, REXML::Element.new('b')) -# root.to_a # => [, , , ] -# -# A child may be replaced using Parent#replace_child: -# -# root.replace_child(c, REXML::Element.new('x')) -# root.to_a # => [, , , ] -# -# A child may be removed using Parent#delete: -# -# x = root[2] # => -# root.delete(x) -# root.to_a # => [, , ] -# -# === Siblings -# -# An element has zero or more siblings, -# which are the other children of the element's parent. -# -# In the example above, element +ele_1+ is between a CDATA sibling -# and a text sibling: -# -# ele_1 = root[5] # => -# ele_1.previous_sibling # => "cdata 0" -# ele_1.next_sibling # => "\n text 1\n " -# -# === \Attributes -# -# An element has zero or more named attributes. -# -# A new element has no attributes: -# -# e = REXML::Element.new('foo') -# e.attributes # => {} -# -# Attributes may be added: -# -# e.add_attribute('bar', 'baz') -# e.add_attribute('bat', 'bam') -# e.attributes.size # => 2 -# e['bar'] # => "baz" -# e['bat'] # => "bam" -# -# An existing attribute may be modified: -# -# e.add_attribute('bar', 'bad') -# e.attributes.size # => 2 -# e['bar'] # => "bad" -# -# An existing attribute may be deleted: -# -# e.delete_attribute('bar') -# e.attributes.size # => 1 -# e['bar'] # => nil -# -# == What's Here -# -# To begin with, what's elsewhere? -# -# \Class \REXML::Element inherits from its ancestor classes: -# -# - REXML::Child -# - REXML::Parent -# -# \REXML::Element itself and its ancestors also include modules: -# -# - {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html] -# - REXML::Namespace -# - REXML::Node -# - REXML::XMLTokens -# -# === Methods for Creating an \Element -# -# ::new:: Returns a new empty element. -# #clone:: Returns a clone of another element. -# -# === Methods for Attributes -# -# {[attribute_name]}[#method-i-5B-5D]:: Returns an attribute value. -# #add_attribute:: Adds a new attribute. -# #add_attributes:: Adds multiple new attributes. -# #attribute:: Returns the attribute value for a given name and optional namespace. -# #delete_attribute:: Removes an attribute. -# -# === Methods for Children -# -# {[index]}[#method-i-5B-5D]:: Returns the child at the given offset. -# #add_element:: Adds an element as the last child. -# #delete_element:: Deletes a child element. -# #each_element:: Calls the given block with each child element. -# #each_element_with_attribute:: Calls the given block with each child element -# that meets given criteria, -# which can include the attribute name. -# #each_element_with_text:: Calls the given block with each child element -# that meets given criteria, -# which can include text. -# #get_elements:: Returns an array of element children that match a given xpath. -# -# === Methods for \Text Children -# -# #add_text:: Adds a text node to the element. -# #get_text:: Returns a text node that meets specified criteria. -# #text:: Returns the text string from the first node that meets specified criteria. -# #texts:: Returns an array of the text children of the element. -# #text=:: Adds, removes, or replaces the first text child of the element -# -# === Methods for Other Children -# -# #cdatas:: Returns an array of the cdata children of the element. -# #comments:: Returns an array of the comment children of the element. -# #instructions:: Returns an array of the instruction children of the element. -# -# === Methods for Namespaces -# -# #add_namespace:: Adds a namespace to the element. -# #delete_namespace:: Removes a namespace from the element. -# #namespace:: Returns the string namespace URI for the element. -# #namespaces:: Returns a hash of all defined namespaces in the element. -# #prefixes:: Returns an array of the string prefixes (names) -# of all defined namespaces in the element -# -# === Methods for Querying -# -# #document:: Returns the document, if any, that the element belongs to. -# #root:: Returns the most distant element (not document) ancestor of the element. -# #root_node:: Returns the most distant ancestor of the element. -# #xpath:: Returns the string xpath to the element -# relative to the most distant parent -# #has_attributes?:: Returns whether the element has attributes. -# #has_elements?:: Returns whether the element has elements. -# #has_text?:: Returns whether the element has text. -# #next_element:: Returns the next sibling that is an element. -# #previous_element:: Returns the previous sibling that is an element. -# #raw:: Returns whether raw mode is set for the element. -# #whitespace:: Returns whether whitespace is respected for the element. -# #ignore_whitespace_nodes:: Returns whether whitespace nodes -# are to be ignored for the element. -# #node_type:: Returns symbol :element. -# -# === One More Method -# -# #inspect:: Returns a string representation of the element. -# -# === Accessors -# -# #elements:: Returns the REXML::Elements object for the element. -# #attributes:: Returns the REXML::Attributes object for the element. -# #context:: Returns or sets the context hash for the element. -# -# source://rexml//lib/rexml/element.rb#279 -class REXML::Element < ::REXML::Parent - include ::REXML::XMLTokens - include ::REXML::Namespace - - # :call-seq: - # Element.new(name = 'UNDEFINED', parent = nil, context = nil) -> new_element - # Element.new(element, parent = nil, context = nil) -> new_element - # - # Returns a new \REXML::Element object. - # - # When no arguments are given, - # returns an element with name 'UNDEFINED': - # - # e = REXML::Element.new # => - # e.class # => REXML::Element - # e.name # => "UNDEFINED" - # - # When only argument +name+ is given, - # returns an element of the given name: - # - # REXML::Element.new('foo') # => - # - # When only argument +element+ is given, it must be an \REXML::Element object; - # returns a shallow copy of the given element: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new(e0) # => - # - # When argument +parent+ is also given, it must be an REXML::Parent object: - # - # e = REXML::Element.new('foo', REXML::Parent.new) - # e.parent # => #]> - # - # When argument +context+ is also given, it must be a hash - # representing the context for the element; - # see {Element Context}[../doc/rexml/context_rdoc.html]: - # - # e = REXML::Element.new('foo', nil, {raw: :all}) - # e.context # => {:raw=>:all} - # - # @return [Element] a new instance of Element - # - # source://rexml//lib/rexml/element.rb#327 - def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end - - # :call-seq: - # [index] -> object - # [attr_name] -> attr_value - # [attr_sym] -> attr_value - # - # With integer argument +index+ given, - # returns the child at offset +index+, or +nil+ if none: - # - # d = REXML::Document.new '>textmore' - # root = d.root - # (0..root.size).each do |index| - # node = root[index] - # p "#{index}: #{node} (#{node.class})" - # end - # - # Output: - # - # "0: (REXML::Element)" - # "1: text (REXML::Text)" - # "2: (REXML::Element)" - # "3: more (REXML::Text)" - # "4: (REXML::Element)" - # "5: (NilClass)" - # - # With string argument +attr_name+ given, - # returns the string value for the given attribute name if it exists, - # otherwise +nil+: - # - # d = REXML::Document.new('') - # root = d.root - # root['attr'] # => "value" - # root['nosuch'] # => nil - # - # With symbol argument +attr_sym+ given, - # returns [attr_sym.to_s]: - # - # root[:attr] # => "value" - # root[:nosuch] # => nil - # - # source://rexml//lib/rexml/element.rb#1245 - def [](name_or_index); end - - # :call-seq: - # add_attribute(name, value) -> value - # add_attribute(attribute) -> attribute - # - # Adds an attribute to this element, overwriting any existing attribute - # by the same name. - # - # With string argument +name+ and object +value+ are given, - # adds the attribute created with that name and value: - # - # e = REXML::Element.new - # e.add_attribute('attr', 'value') # => "value" - # e['attr'] # => "value" - # e.add_attribute('attr', 'VALUE') # => "VALUE" - # e['attr'] # => "VALUE" - # - # With only attribute object +attribute+ given, - # adds the given attribute: - # - # a = REXML::Attribute.new('attr', 'value') - # e.add_attribute(a) # => attr='value' - # e['attr'] # => "value" - # a = REXML::Attribute.new('attr', 'VALUE') - # e.add_attribute(a) # => attr='VALUE' - # e['attr'] # => "VALUE" - # - # source://rexml//lib/rexml/element.rb#1349 - def add_attribute(key, value = T.unsafe(nil)); end - - # :call-seq: - # add_attributes(hash) -> hash - # add_attributes(array) - # - # Adds zero or more attributes to the element; - # returns the argument. - # - # If hash argument +hash+ is given, - # each key must be a string; - # adds each attribute created with the key/value pair: - # - # e = REXML::Element.new - # h = {'foo' => 'bar', 'baz' => 'bat'} - # e.add_attributes(h) - # - # If argument +array+ is given, - # each array member must be a 2-element array [name, value]; - # each name must be a string: - # - # e = REXML::Element.new - # a = [['foo' => 'bar'], ['baz' => 'bat']] - # e.add_attributes(a) - # - # source://rexml//lib/rexml/element.rb#1380 - def add_attributes(hash); end - - # :call-seq: - # add_element(name, attributes = nil) -> new_element - # add_element(element, attributes = nil) -> element - # - # Adds a child element, optionally setting attributes - # on the added element; returns the added element. - # - # With string argument +name+, creates a new element with that name - # and adds the new element as a child: - # - # e0 = REXML::Element.new('foo') - # e0.add_element('bar') - # e0[0] # => - # - # - # With argument +name+ and hash argument +attributes+, - # sets attributes on the new element: - # - # e0.add_element('baz', {'bat' => '0', 'bam' => '1'}) - # e0[1] # => - # - # With element argument +element+, adds that element as a child: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar') - # e0.add_element(e1) - # e0[0] # => - # - # With argument +element+ and hash argument +attributes+, - # sets attributes on the added element: - # - # e0.add_element(e1, {'bat' => '0', 'bam' => '1'}) - # e0[1] # => - # - # source://rexml//lib/rexml/element.rb#731 - def add_element(element, attrs = T.unsafe(nil)); end - - # :call-seq: - # add_namespace(prefix, uri = nil) -> self - # - # Adds a namespace to the element; returns +self+. - # - # With the single argument +prefix+, - # adds a namespace using the given +prefix+ and the namespace URI: - # - # e = REXML::Element.new('foo') - # e.add_namespace('bar') - # e.namespaces # => {"xmlns"=>"bar"} - # - # With both arguments +prefix+ and +uri+ given, - # adds a namespace using both arguments: - # - # e.add_namespace('baz', 'bat') - # e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"} - # - # source://rexml//lib/rexml/element.rb#654 - def add_namespace(prefix, uri = T.unsafe(nil)); end - - # :call-seq: - # add_text(string) -> nil - # add_text(text_node) -> self - # - # Adds text to the element. - # - # When string argument +string+ is given, returns +nil+. - # - # If the element has no child text node, - # creates a \REXML::Text object using the string, - # honoring the current settings for whitespace and raw, - # then adds that node to the element: - # - # d = REXML::Document.new('') - # a = d.root - # a.add_text('foo') - # a.to_a # => [, "foo"] - # - # If the element has child text nodes, - # appends the string to the _last_ text node: - # - # d = REXML::Document.new('foobar') - # a = d.root - # a.add_text('baz') - # a.to_a # => ["foo", , "barbaz"] - # a.add_text('baz') - # a.to_a # => ["foo", , "barbazbaz"] - # - # When text node argument +text_node+ is given, - # appends the node as the last text node in the element; - # returns +self+: - # - # d = REXML::Document.new('foobar') - # a = d.root - # a.add_text(REXML::Text.new('baz')) - # a.to_a # => ["foo", , "bar", "baz"] - # a.add_text(REXML::Text.new('baz')) - # a.to_a # => ["foo", , "bar", "baz", "baz"] - # - # source://rexml//lib/rexml/element.rb#1146 - def add_text(text); end - - # :call-seq: - # attribute(name, namespace = nil) - # - # Returns the string value for the given attribute name. - # - # With only argument +name+ given, - # returns the value of the named attribute if it exists, otherwise +nil+: - # - # xml_string = <<-EOT - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # root = d.root - # a = root[1] # => - # a.attribute('attr') # => attr='value' - # a.attribute('nope') # => nil - # - # With arguments +name+ and +namespace+ given, - # returns the value of the named attribute if it exists, otherwise +nil+: - # - # xml_string = "" - # document = REXML::Document.new(xml_string) - # document.root.attribute("x") # => x='x' - # document.root.attribute("x", "a") # => a:x='a:x' - # - # source://rexml//lib/rexml/element.rb#1286 - def attribute(name, namespace = T.unsafe(nil)); end - - # Mechanisms for accessing attributes and child elements of this - # element. - # - # source://rexml//lib/rexml/element.rb#286 - def attributes; end - - # :call-seq: - # cdatas -> array_of_cdata_children - # - # Returns a frozen array of the REXML::CData children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # cds = d.root.cdatas # => ["foo", "bar"] - # cds.frozen? # => true - # cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData] - # - # source://rexml//lib/rexml/element.rb#1424 - def cdatas; end - - # :call-seq: - # clone -> new_element - # - # Returns a shallow copy of the element, containing the name and attributes, - # but not the parent or children: - # - # e = REXML::Element.new('foo') - # e.add_attributes({'bar' => 0, 'baz' => 1}) - # e.clone # => - # - # source://rexml//lib/rexml/element.rb#391 - def clone; end - - # :call-seq: - # comments -> array_of_comment_children - # - # Returns a frozen array of the REXML::Comment children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # cs = d.root.comments - # cs.frozen? # => true - # cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment] - # cs.map {|c| c.to_s } # => ["foo", "bar"] - # - # source://rexml//lib/rexml/element.rb#1445 - def comments; end - - # The context holds information about the processing environment, such as - # whitespace handling. - # - # source://rexml//lib/rexml/element.rb#289 - def context; end - - # The context holds information about the processing environment, such as - # whitespace handling. - # - # source://rexml//lib/rexml/element.rb#289 - def context=(_arg0); end - - # :call-seq: - # delete_attribute(name) -> removed_attribute or nil - # - # Removes a named attribute if it exists; - # returns the removed attribute if found, otherwise +nil+: - # - # e = REXML::Element.new('foo') - # e.add_attribute('bar', 'baz') - # e.delete_attribute('bar') # => - # e.delete_attribute('bar') # => nil - # - # source://rexml//lib/rexml/element.rb#1399 - def delete_attribute(key); end - - # :call-seq: - # delete_element(index) -> removed_element or nil - # delete_element(element) -> removed_element or nil - # delete_element(xpath) -> removed_element or nil - # - # Deletes a child element. - # - # When 1-based integer argument +index+ is given, - # removes and returns the child element at that offset if it exists; - # indexing does not include text nodes; - # returns +nil+ if the element does not exist: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.delete_element(1) # => - # a.delete_element(1) # => - # a.delete_element(1) # => nil - # - # When element argument +element+ is given, - # removes and returns that child element if it exists, - # otherwise returns +nil+: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # c = a[2] # => - # a.delete_element(c) # => - # a.delete_element(c) # => nil - # - # When xpath argument +xpath+ is given, - # removes and returns the element at xpath if it exists, - # otherwise returns +nil+: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.delete_element('//c') # => - # a.delete_element('//c') # => nil - # - # source://rexml//lib/rexml/element.rb#777 - def delete_element(element); end - - # :call-seq: - # delete_namespace(namespace = 'xmlns') -> self - # - # Removes a namespace from the element. - # - # With no argument, removes the default namespace: - # - # d = REXML::Document.new "" - # d.to_s # => "" - # d.root.delete_namespace # => - # d.to_s # => "" - # - # With argument +namespace+, removes the specified namespace: - # - # d.root.delete_namespace('foo') - # d.to_s # => "" - # - # Does nothing if no such namespace is found: - # - # d.root.delete_namespace('nosuch') - # d.to_s # => "" - # - # source://rexml//lib/rexml/element.rb#686 - def delete_namespace(namespace = T.unsafe(nil)); end - - # :call-seq: - # document -> document or nil - # - # If the element is part of a document, returns that document: - # - # d = REXML::Document.new('') - # top_element = d.first - # child = top_element.first - # top_element.document == d # => true - # child.document == d # => true - # - # If the element is not part of a document, returns +nil+: - # - # REXML::Element.new.document # => nil - # - # For a document, returns +self+: - # - # d.document == d # => true - # - # Related: #root, #root_node. - # - # source://rexml//lib/rexml/element.rb#478 - def document; end - - # :call-seq: - # each_element {|e| ... } - # - # Calls the given block with each child element: - # - # d = REXML::Document.new 'bbd' - # a = d.root - # a.each_element {|e| p e } - # - # Output: - # - # ... - # ... - # ... - # - # - # source://rexml//lib/rexml/element.rb#929 - def each_element(xpath = T.unsafe(nil), &block); end - - # :call-seq: - # each_element_with_attribute(attr_name, value = nil, max = 0, xpath = nil) {|e| ... } - # - # Calls the given block with each child element that meets given criteria. - # - # When only string argument +attr_name+ is given, - # calls the block with each child element that has that attribute: - # - # d = REXML::Document.new '' - # a = d.root - # a.each_element_with_attribute('id') {|e| p e } - # - # Output: - # - # - # - # - # - # With argument +attr_name+ and string argument +value+ given, - # calls the block with each child element that has that attribute - # with that value: - # - # a.each_element_with_attribute('id', '1') {|e| p e } - # - # Output: - # - # - # - # - # With arguments +attr_name+, +value+, and integer argument +max+ given, - # calls the block with at most +max+ child elements: - # - # a.each_element_with_attribute('id', '1', 1) {|e| p e } - # - # Output: - # - # - # - # With all arguments given, including +xpath+, - # calls the block with only those child elements - # that meet the first three criteria, - # and also match the given +xpath+: - # - # a.each_element_with_attribute('id', '1', 2, '//d') {|e| p e } - # - # Output: - # - # - # - # source://rexml//lib/rexml/element.rb#846 - def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end - - # :call-seq: - # each_element_with_text(text = nil, max = 0, xpath = nil) {|e| ... } - # - # Calls the given block with each child element that meets given criteria. - # - # With no arguments, calls the block with each child element that has text: - # - # d = REXML::Document.new 'bbd' - # a = d.root - # a.each_element_with_text {|e| p e } - # - # Output: - # - # ... - # ... - # ... - # - # With the single string argument +text+, - # calls the block with each element that has exactly that text: - # - # a.each_element_with_text('b') {|e| p e } - # - # Output: - # - # ... - # ... - # - # With argument +text+ and integer argument +max+, - # calls the block with at most +max+ elements: - # - # a.each_element_with_text('b', 1) {|e| p e } - # - # Output: - # - # ... - # - # With all arguments given, including +xpath+, - # calls the block with only those child elements - # that meet the first two criteria, - # and also match the given +xpath+: - # - # a.each_element_with_text('b', 2, '//c') {|e| p e } - # - # Output: - # - # ... - # - # source://rexml//lib/rexml/element.rb#903 - def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end - - # Mechanisms for accessing attributes and child elements of this - # element. - # - # source://rexml//lib/rexml/element.rb#286 - def elements; end - - # :call-seq: - # get_elements(xpath) - # - # Returns an array of the elements that match the given +xpath+: - # - # xml_string = <<-EOT - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # d.root.get_elements('//a') # => [ ... , ] - # - # source://rexml//lib/rexml/element.rb#948 - def get_elements(xpath); end - - # :call-seq: - # get_text(xpath = nil) -> text_node or nil - # - # Returns the first text node child in a specified element, if it exists, - # +nil+ otherwise. - # - # With no argument, returns the first text node from +self+: - # - # d = REXML::Document.new "

some text this is bold! more text

" - # d.root.get_text.class # => REXML::Text - # d.root.get_text # => "some text " - # - # With argument +xpath+, returns the first text node from the element - # that matches +xpath+: - # - # d.root.get_text(1) # => "this is bold!" - # - # source://rexml//lib/rexml/element.rb#1052 - def get_text(path = T.unsafe(nil)); end - - # :call-seq: - # has_attributes? -> true or false - # - # Returns +true+ if the element has attributes, +false+ otherwise: - # - # d = REXML::Document.new('
') - # a, b = *d.root - # a.has_attributes? # => true - # b.has_attributes? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1319 - def has_attributes?; end - - # :call-seq: - # has_elements? - # - # Returns +true+ if the element has one or more element children, - # +false+ otherwise: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.has_elements? # => true - # b = a[0] # => - # b.has_elements? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#793 - def has_elements?; end - - # :call-seq: - # has_text? -> true or false - # - # Returns +true+ if the element has one or more text noded, - # +false+ otherwise: - # - # d = REXML::Document.new 'text' - # a = d.root - # a.has_text? # => true - # b = a[0] - # b.has_text? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1001 - def has_text?; end - - # :call-seq: - # ignore_whitespace_nodes - # - # Returns +true+ if whitespace nodes are ignored for the element. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # source://rexml//lib/rexml/element.rb#516 - def ignore_whitespace_nodes; end - - # :call-seq: - # inspect -> string - # - # Returns a string representation of the element. - # - # For an element with no attributes and no children, shows the element name: - # - # REXML::Element.new.inspect # => "" - # - # Shows attributes, if any: - # - # e = REXML::Element.new('foo') - # e.add_attributes({'bar' => 0, 'baz' => 1}) - # e.inspect # => "" - # - # Shows an ellipsis (...), if there are child elements: - # - # e.add_element(REXML::Element.new('bar')) - # e.add_element(REXML::Element.new('baz')) - # e.inspect # => " ... " - # - # source://rexml//lib/rexml/element.rb#366 - def inspect; end - - # :call-seq: - # instructions -> array_of_instruction_children - # - # Returns a frozen array of the REXML::Instruction children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # is = d.root.instructions - # is.frozen? # => true - # is.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction] - # is.map {|i| i.to_s } # => ["", ""] - # - # source://rexml//lib/rexml/element.rb#1466 - def instructions; end - - # :call-seq: - # namespace(prefix = nil) -> string_uri or nil - # - # Returns the string namespace URI for the element, - # possibly deriving from one of its ancestors. - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # b = d.elements['//b'] - # b.namespace # => "1" - # b.namespace('y') # => "2" - # b.namespace('nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#621 - def namespace(prefix = T.unsafe(nil)); end - - # :call-seq: - # namespaces -> array_of_namespace_names - # - # Returns a hash of all defined namespaces - # in the element and its ancestors: - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # d.elements['//a'].namespaces # => {"x"=>"1", "y"=>"2"} - # d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"} - # d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"} - # - # source://rexml//lib/rexml/element.rb#594 - def namespaces; end - - # :call-seq: - # next_element - # - # Returns the next sibling that is an element if it exists, - # +niL+ otherwise: - # - # d = REXML::Document.new 'text' - # d.root.elements['b'].next_element #-> - # d.root.elements['c'].next_element #-> nil - # - # source://rexml//lib/rexml/element.rb#962 - def next_element; end - - # :call-seq: - # node_type -> :element - # - # Returns symbol :element: - # - # d = REXML::Document.new('') - # a = d.root # => - # a.node_type # => :element - # - # source://rexml//lib/rexml/element.rb#1167 - def node_type; end - - # :call-seq: - # prefixes -> array_of_namespace_prefixes - # - # Returns an array of the string prefixes (names) of all defined namespaces - # in the element and its ancestors: - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string, {compress_whitespace: :all}) - # d.elements['//a'].prefixes # => ["x", "y"] - # d.elements['//b'].prefixes # => ["x", "y"] - # d.elements['//c'].prefixes # => ["x", "y", "z"] - # - # source://rexml//lib/rexml/element.rb#568 - def prefixes; end - - # :call-seq: - # previous_element - # - # Returns the previous sibling that is an element if it exists, - # +niL+ otherwise: - # - # d = REXML::Document.new 'text' - # d.root.elements['c'].previous_element #-> - # d.root.elements['b'].previous_element #-> nil - # - # source://rexml//lib/rexml/element.rb#978 - def previous_element; end - - # :call-seq: - # raw - # - # Returns +true+ if raw mode is set for the element. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # The evaluation is tested against +expanded_name+, and so is namespace - # sensitive. - # - # source://rexml//lib/rexml/element.rb#536 - def raw; end - - # :call-seq: - # root -> element - # - # Returns the most distant _element_ (not document) ancestor of the element: - # - # d = REXML::Document.new('') - # top_element = d.first - # child = top_element.first - # top_element.root == top_element # => true - # child.root == top_element # => true - # - # For a document, returns the topmost element: - # - # d.root == top_element # => true - # - # Related: #root_node, #document. - # - # source://rexml//lib/rexml/element.rb#451 - def root; end - - # :call-seq: - # root_node -> document or element - # - # Returns the most distant ancestor of +self+. - # - # When the element is part of a document, - # returns the root node of the document. - # Note that the root node is different from the document element; - # in this example +a+ is document element and the root node is its parent: - # - # d = REXML::Document.new('') - # top_element = d.first # => ... - # child = top_element.first # => ... - # d.root_node == d # => true - # top_element.root_node == d # => true - # child.root_node == d # => true - # - # When the element is not part of a document, but does have ancestor elements, - # returns the most distant ancestor element: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar') - # e1.parent = e0 - # e2 = REXML::Element.new('baz') - # e2.parent = e1 - # e2.root_node == e0 # => true - # - # When the element has no ancestor elements, - # returns +self+: - # - # e = REXML::Element.new('foo') - # e.root_node == e # => true - # - # Related: #root, #document. - # - # source://rexml//lib/rexml/element.rb#430 - def root_node; end - - # :call-seq: - # text(xpath = nil) -> text_string or nil - # - # Returns the text string from the first text node child - # in a specified element, if it exists, +nil+ otherwise. - # - # With no argument, returns the text from the first text node in +self+: - # - # d = REXML::Document.new "

some text this is bold! more text

" - # d.root.text.class # => String - # d.root.text # => "some text " - # - # With argument +xpath+, returns text from the first text node - # in the element that matches +xpath+: - # - # d.root.text(1) # => "this is bold!" - # - # Note that an element may have multiple text nodes, - # possibly separated by other non-text children, as above. - # Even so, the returned value is the string text from the first such node. - # - # Note also that the text note is retrieved by method get_text, - # and so is always normalized text. - # - # source://rexml//lib/rexml/element.rb#1029 - def text(path = T.unsafe(nil)); end - - # :call-seq: - # text = string -> string - # text = nil -> nil - # - # Adds, replaces, or removes the first text node child in the element. - # - # With string argument +string+, - # creates a new \REXML::Text node containing that string, - # honoring the current settings for whitespace and row, - # then places the node as the first text child in the element; - # returns +string+. - # - # If the element has no text child, the text node is added: - # - # d = REXML::Document.new '
' - # d.root.text = 'foo' #-> 'foo' - # - # If the element has a text child, it is replaced: - # - # d.root.text = 'bar' #-> 'bar' - # - # With argument +nil+, removes the first text child: - # - # d.root.text = nil #-> '' - # - # source://rexml//lib/rexml/element.rb#1088 - def text=(text); end - - # :call-seq: - # texts -> array_of_text_children - # - # Returns a frozen array of the REXML::Text children of the element: - # - # xml_string = 'textmore' - # d = REXML::Document.new(xml_string) - # ts = d.root.texts - # ts.frozen? # => true - # ts.map {|t| t.class } # => [REXML::Text, REXML::Text] - # ts.map {|t| t.to_s } # => ["text", "more"] - # - # source://rexml//lib/rexml/element.rb#1482 - def texts; end - - # :call-seq: - # whitespace - # - # Returns +true+ if whitespace is respected for this element, - # +false+ otherwise. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # The evaluation is tested against the element's +expanded_name+, - # and so is namespace-sensitive. - # - # source://rexml//lib/rexml/element.rb#493 - def whitespace; end - - # == DEPRECATED - # See REXML::Formatters - # - # Writes out this element, and recursively, all children. - # output:: - # output an object which supports '<< string'; this is where the - # document will be written. - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. Defaults to -1 - # transitive:: - # If transitive is true and indent is >= 0, then the output will be - # pretty-printed in such a way that the added whitespace does not affect - # the parse tree of the document - # ie_hack:: - # This hack inserts a space before the /> on empty tags to address - # a limitation of Internet Explorer. Defaults to false - # - # out = '' - # doc.write( out ) #-> doc is written to the string 'out' - # doc.write( $stdout ) #-> doc written to the console - # - # source://rexml//lib/rexml/element.rb#1508 - def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # :call-seq: - # xpath -> string_xpath - # - # Returns the string xpath to the element - # relative to the most distant parent: - # - # d = REXML::Document.new('') - # a = d.root # => ... - # b = a[0] # => ... - # c = b[0] # => - # d.xpath # => "" - # a.xpath # => "/a" - # b.xpath # => "/a/b" - # c.xpath # => "/a/b/c" - # - # If there is no parent, returns the expanded name of the element: - # - # e = REXML::Element.new('foo') - # e.xpath # => "foo" - # - # source://rexml//lib/rexml/element.rb#1191 - def xpath; end - - private - - # source://rexml//lib/rexml/element.rb#1525 - def __to_xpath_helper(node); end - - # A private helper method - # - # source://rexml//lib/rexml/element.rb#1540 - def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/doctype.rb#261 -class REXML::ElementDecl < ::REXML::Declaration - # @return [ElementDecl] a new instance of ElementDecl - # - # source://rexml//lib/rexml/doctype.rb#262 - def initialize(src); end -end - -# A class which provides filtering of children for Elements, and -# XPath search support. You are expected to only encounter this class as -# the element.elements object. Therefore, you are -# _not_ expected to instantiate this yourself. -# -# xml_string = <<-EOT -# -# -# -# Everyday Italian -# Giada De Laurentiis -# 2005 -# 30.00 -# -# -# Harry Potter -# J K. Rowling -# 2005 -# 29.99 -# -# -# XQuery Kick Start -# James McGovern -# Per Bothner -# Kurt Cagle -# James Linn -# Vaidyanathan Nagarajan -# 2003 -# 49.99 -# -# -# Learning XML -# Erik T. Ray -# 2003 -# 39.95 -# -# -# EOT -# d = REXML::Document.new(xml_string) -# elements = d.root.elements -# elements # => # ... > -# -# source://rexml//lib/rexml/element.rb#1595 -class REXML::Elements - include ::Enumerable - - # :call-seq: - # new(parent) -> new_elements_object - # - # Returns a new \Elements object with the given +parent+. - # Does _not_ assign parent.elements = self: - # - # d = REXML::Document.new(xml_string) - # eles = REXML::Elements.new(d.root) - # eles # => # ... > - # eles == d.root.elements # => false - # - # @return [Elements] a new instance of Elements - # - # source://rexml//lib/rexml/element.rb#1608 - def initialize(parent); end - - # :call-seq: - # add -> new_element - # add(name) -> new_element - # add(element) -> element - # - # Adds an element; returns the element added. - # - # With no argument, creates and adds a new element. - # The new element has: - # - # - No name. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => ... - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add # => - # elements.size # => 5 - # new_element.name # => nil - # new_element.parent # => ... - # new_element.context # => {:raw=>:all} - # - # With string argument +name+, creates and adds a new element. - # The new element has: - # - # - Name +name+. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => ... - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add('foo') # => - # elements.size # => 5 - # new_element.name # => "foo" - # new_element.parent # => ... - # new_element.context # => {:raw=>:all} - # - # With argument +element+, - # creates and adds a clone of the given +element+. - # The new element has name, parent, and context from the given +element+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar', e0, {raw: :all}) - # element = elements.add(e1) # => - # elements.size # => 5 - # element.name # => "bar" - # element.parent # => ... - # element.context # => {:raw=>:all} - # - # source://rexml//lib/rexml/element.rb#1925 - def <<(element = T.unsafe(nil)); end - - # :call-seq: - # elements[index] -> element or nil - # elements[xpath] -> element or nil - # elements[n, name] -> element or nil - # - # Returns the first \Element object selected by the arguments, - # if any found, or +nil+ if none found. - # - # Notes: - # - The +index+ is 1-based, not 0-based, so that: - # - The first element has index 1 - # - The _nth_ element has index +n+. - # - The selection ignores non-\Element nodes. - # - # When the single argument +index+ is given, - # returns the element given by the index, if any; otherwise, +nil+: - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements - # eles # => # ... > - # eles[1] # => ... - # eles.size # => 4 - # eles[4] # => ... - # eles[5] # => nil - # - # The node at this index is not an \Element, and so is not returned: - # - # eles = d.root.first.first # => ... </> - # eles.to_a # => ["Everyday Italian"] - # eles[1] # => nil - # - # When the single argument +xpath+ is given, - # returns the first element found via that +xpath+, if any; otherwise, +nil+: - # - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles['/bookstore'] # => <bookstore> ... </> - # eles['//book'] # => <book category='cooking'> ... </> - # eles['//book [@category="children"]'] # => <book category='children'> ... </> - # eles['/nosuch'] # => nil - # eles['//nosuch'] # => nil - # eles['//book [@category="nosuch"]'] # => nil - # eles['.'] # => <bookstore> ... </> - # eles['..'].class # => REXML::Document - # - # With arguments +n+ and +name+ given, - # returns the _nth_ found element that has the given +name+, - # or +nil+ if there is no such _nth_ element: - # - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles[1, 'book'] # => <book category='cooking'> ... </> - # eles[4, 'book'] # => <book category='web' cover='paperback'> ... </> - # eles[5, 'book'] # => nil - # - # source://rexml//lib/rexml/element.rb#1680 - def [](index, name = T.unsafe(nil)); end - - # :call-seq: - # elements[] = index, replacement_element -> replacement_element or nil - # - # Replaces or adds an element. - # - # When <tt>eles[index]</tt> exists, replaces it with +replacement_element+ - # and returns +replacement_element+: - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles[1] # => <book category='cooking'> ... </> - # eles[1] = REXML::Element.new('foo') - # eles[1] # => <foo/> - # - # Does nothing (or raises an exception) - # if +replacement_element+ is not an \Element: - # eles[2] # => <book category='web' cover='paperback'> ... </> - # eles[2] = REXML::Text.new('bar') - # eles[2] # => <book category='web' cover='paperback'> ... </> - # - # When <tt>eles[index]</tt> does not exist, - # adds +replacement_element+ to the element and returns - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles.size # => 4 - # eles[50] = REXML::Element.new('foo') # => <foo/> - # eles.size # => 5 - # eles[5] # => <foo/> - # - # Does nothing (or raises an exception) - # if +replacement_element+ is not an \Element: - # - # eles[50] = REXML::Text.new('bar') # => "bar" - # eles.size # => 5 - # - # source://rexml//lib/rexml/element.rb#1735 - def []=(index, element); end - - # :call-seq: - # add -> new_element - # add(name) -> new_element - # add(element) -> element - # - # Adds an element; returns the element added. - # - # With no argument, creates and adds a new element. - # The new element has: - # - # - No name. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => <bookstore> ... </> - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add # => </> - # elements.size # => 5 - # new_element.name # => nil - # new_element.parent # => <bookstore> ... </> - # new_element.context # => {:raw=>:all} - # - # With string argument +name+, creates and adds a new element. - # The new element has: - # - # - Name +name+. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => <bookstore> ... </> - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add('foo') # => <foo/> - # elements.size # => 5 - # new_element.name # => "foo" - # new_element.parent # => <bookstore> ... </> - # new_element.context # => {:raw=>:all} - # - # With argument +element+, - # creates and adds a clone of the given +element+. - # The new element has name, parent, and context from the given +element+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar', e0, {raw: :all}) - # element = elements.add(e1) # => <bar/> - # elements.size # => 5 - # element.name # => "bar" - # element.parent # => <bookstore> ... </> - # element.context # => {:raw=>:all} - # - # source://rexml//lib/rexml/element.rb#1925 - def add(element = T.unsafe(nil)); end - - # :call-seq: - # collect(xpath = nil) {|element| ... } -> array - # - # Iterates over the elements; returns the array of block return values. - # - # With no argument, iterates over all elements: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.collect {|element| element.size } # => [9, 9, 17, 9] - # - # With argument +xpath+, iterates over elements that match - # the given +xpath+: - # - # xpath = '//book [@category="web"]' - # elements.collect(xpath) {|element| element.size } # => [17, 9] - # - # source://rexml//lib/rexml/element.rb#1988 - def collect(xpath = T.unsafe(nil)); end - - # :call-seq: - # delete(index) -> removed_element or nil - # delete(element) -> removed_element or nil - # delete(xpath) -> removed_element or nil - # - # Removes an element; returns the removed element, or +nil+ if none removed. - # - # With integer argument +index+ given, - # removes the child element at that offset: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # elements[2] # => <book category='children'> ... </> - # elements.delete(2) # => <book category='children'> ... </> - # elements.size # => 3 - # elements[2] # => <book category='web'> ... </> - # elements.delete(50) # => nil - # - # With element argument +element+ given, - # removes that child element: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # ele_1, ele_2, ele_3, ele_4 = *elements - # elements.size # => 4 - # elements[2] # => <book category='children'> ... </> - # elements.delete(ele_2) # => <book category='children'> ... </> - # elements.size # => 3 - # elements[2] # => <book category='web'> ... </> - # elements.delete(ele_2) # => nil - # - # With string argument +xpath+ given, - # removes the first element found via that xpath: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.delete('//book') # => <book category='cooking'> ... </> - # elements.delete('//book [@category="children"]') # => <book category='children'> ... </> - # elements.delete('//nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#1825 - def delete(element); end - - # :call-seq: - # delete_all(xpath) - # - # Removes all elements found via the given +xpath+; - # returns the array of removed elements, if any, else +nil+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # deleted_elements = elements.delete_all('//book [@category="web"]') - # deleted_elements.size # => 2 - # elements.size # => 2 - # deleted_elements = elements.delete_all('//book') - # deleted_elements.size # => 2 - # elements.size # => 0 - # elements.delete_all('//book') # => [] - # - # source://rexml//lib/rexml/element.rb#1851 - def delete_all(xpath); end - - # :call-seq: - # each(xpath = nil) {|element| ... } -> self - # - # Iterates over the elements. - # - # With no argument, calls the block with each element: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.each {|element| p element } - # - # Output: - # - # <book category='cooking'> ... </> - # <book category='children'> ... </> - # <book category='web'> ... </> - # <book category='web' cover='paperback'> ... </> - # - # With argument +xpath+, calls the block with each element - # that matches the given +xpath+: - # - # elements.each('//book [@category="web"]') {|element| p element } - # - # Output: - # - # <book category='web'> ... </> - # <book category='web' cover='paperback'> ... </> - # - # source://rexml//lib/rexml/element.rb#1967 - def each(xpath = T.unsafe(nil)); end - - # :call-seq: - # empty? -> true or false - # - # Returns +true+ if there are no children, +false+ otherwise. - # - # d = REXML::Document.new('') - # d.elements.empty? # => true - # d = REXML::Document.new(xml_string) - # d.elements.empty? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1755 - def empty?; end - - # :call-seq: - # index(element) - # - # Returns the 1-based index of the given +element+, if found; - # otherwise, returns -1: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # ele_1, ele_2, ele_3, ele_4 = *elements - # elements.index(ele_4) # => 4 - # elements.delete(ele_3) - # elements.index(ele_4) # => 3 - # elements.index(ele_3) # => -1 - # - # source://rexml//lib/rexml/element.rb#1773 - def index(element); end - - # :call-seq: - # inject(xpath = nil, initial = nil) -> object - # - # Calls the block with elements; returns the last block return value. - # - # With no argument, iterates over the elements, calling the block - # <tt>elements.size - 1</tt> times. - # - # - The first call passes the first and second elements. - # - The second call passes the first block return value and the third element. - # - The third call passes the second block return value and the fourth element. - # - And so on. - # - # In this example, the block returns the passed element, - # which is then the object argument to the next call: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.inject do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [1, 2] - # [2, 3] - # [3, 4] - # - # With the single argument +xpath+, calls the block only with - # elements matching that xpath: - # - # elements.inject('//book [@category="web"]') do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [3, 4] - # - # With argument +xpath+ given as +nil+ - # and argument +initial+ also given, - # calls the block once for each element. - # - # - The first call passes the +initial+ and the first element. - # - The second call passes the first block return value and the second element. - # - The third call passes the second block return value and the third element. - # - And so on. - # - # In this example, the first object index is <tt>-1</tt> - # - # elements.inject(nil, 'Initial') do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [-1, 1] - # [1, 2] - # [2, 3] - # [3, 4] - # - # In this form the passed object can be used as an accumulator: - # - # elements.inject(nil, 0) do |total, element| - # total += element.size - # end # => 44 - # - # With both arguments +xpath+ and +initial+ are given, - # calls the block only with elements matching that xpath: - # - # elements.inject('//book [@category="web"]', 0) do |total, element| - # total += element.size - # end # => 26 - # - # source://rexml//lib/rexml/element.rb#2073 - def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end - - # :call-seq: - # parent - # - # Returns the parent element cited in creating the \Elements object. - # This element is also the default starting point for searching - # in the \Elements object. - # - # d = REXML::Document.new(xml_string) - # elements = REXML::Elements.new(d.root) - # elements.parent == d.root # => true - # - # source://rexml//lib/rexml/element.rb#1623 - def parent; end - - # :call-seq: - # size -> integer - # - # Returns the count of \Element children: - # - # d = REXML::Document.new '<a>sean<b/>elliott<b/>russell<b/></a>' - # d.root.elements.size # => 3 # Three elements. - # d.root.size # => 6 # Three elements plus three text nodes.. - # - # source://rexml//lib/rexml/element.rb#2097 - def size; end - - # :call-seq: - # to_a(xpath = nil) -> array_of_elements - # - # Returns an array of element children (not including non-element children). - # - # With no argument, returns an array of all element children: - # - # d = REXML::Document.new '<a>sean<b/>elliott<c/></a>' - # elements = d.root.elements - # elements.to_a # => [<b/>, <c/>] # Omits non-element children. - # children = d.root.children - # children # => ["sean", <b/>, "elliott", <c/>] # Includes non-element children. - # - # With argument +xpath+, returns an array of element children - # that match the xpath: - # - # elements.to_a('//c') # => [<c/>] - # - # source://rexml//lib/rexml/element.rb#2121 - def to_a(xpath = T.unsafe(nil)); end - - private - - # Private helper class. Removes quotes from quoted strings - # - # source://rexml//lib/rexml/element.rb#2129 - def literalize(name); end -end - -# source://rexml//lib/rexml/encoding.rb#4 -module REXML::Encoding - # source://rexml//lib/rexml/encoding.rb#29 - def decode(string); end - - # source://rexml//lib/rexml/encoding.rb#25 - def encode(string); end - - # ID ---> Encoding name - # - # source://rexml//lib/rexml/encoding.rb#6 - def encoding; end - - # source://rexml//lib/rexml/encoding.rb#7 - def encoding=(encoding); end - - private - - # source://rexml//lib/rexml/encoding.rb#34 - def find_encoding(name); end -end - -# source://rexml//lib/rexml/entity.rb#7 -class REXML::Entity < ::REXML::Child - include ::REXML::XMLTokens - - # Create a new entity. Simple entities can be constructed by passing a - # name, value to the constructor; this creates a generic, plain entity - # reference. For anything more complicated, you have to pass a Source to - # the constructor with the entity definition, or use the accessor methods. - # +WARNING+: There is no validation of entity state except when the entity - # is read from a stream. If you start poking around with the accessors, - # you can easily create a non-conformant Entity. - # - # e = Entity.new( 'amp', '&' ) - # - # @return [Entity] a new instance of Entity - # - # source://rexml//lib/rexml/entity.rb#33 - def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end - - # Returns the value of attribute external. - # - # source://rexml//lib/rexml/entity.rb#22 - def external; end - - # Returns the value of attribute name. - # - # source://rexml//lib/rexml/entity.rb#22 - def name; end - - # Returns the value of attribute ndata. - # - # source://rexml//lib/rexml/entity.rb#22 - def ndata; end - - # Returns the value of this entity unprocessed -- raw. This is the - # normalized value; that is, with all %ent; and &ent; entities intact - # - # source://rexml//lib/rexml/entity.rb#85 - def normalized; end - - # source://rexml//lib/rexml/entity.rb#138 - def parent=(other); end - - # Returns the value of attribute pubid. - # - # source://rexml//lib/rexml/entity.rb#22 - def pubid; end - - # Returns the value of attribute ref. - # - # source://rexml//lib/rexml/entity.rb#22 - def ref; end - - # Returns this entity as a string. See write(). - # - # source://rexml//lib/rexml/entity.rb#119 - def to_s; end - - # Evaluates to the unnormalized value of this entity; that is, replacing - # all entities -- both %ent; and &ent; entities. This differs from - # +value()+ in that +value+ only replaces %ent; entities. - # - # source://rexml//lib/rexml/entity.rb#73 - def unnormalized; end - - # Returns the value of this entity. At the moment, only internal entities - # are processed. If the value contains internal references (IE, - # %blah;), those are replaced with their values. IE, if the doctype - # contains: - # <!ENTITY % foo "bar"> - # <!ENTITY yada "nanoo %foo; nanoo> - # then: - # doctype.entity('yada').value #-> "nanoo bar nanoo" - # - # source://rexml//lib/rexml/entity.rb#134 - def value; end - - # Write out a fully formed, correct entity definition (assuming the Entity - # object itself is valid.) - # - # out:: - # An object implementing <TT><<</TT> to which the entity will be - # output - # indent:: - # *DEPRECATED* and ignored - # - # source://rexml//lib/rexml/entity.rb#97 - def write(out, indent = T.unsafe(nil)); end - - private - - # source://rexml//lib/rexml/entity.rb#144 - def resolve_value; end - - class << self - # Evaluates whether the given string matches an entity definition, - # returning true if so, and false otherwise. - # - # @return [Boolean] - # - # source://rexml//lib/rexml/entity.rb#66 - def matches?(string); end - end -end - -# source://rexml//lib/rexml/doctype.rb#267 -class REXML::ExternalEntity < ::REXML::Child - # @return [ExternalEntity] a new instance of ExternalEntity - # - # source://rexml//lib/rexml/doctype.rb#268 - def initialize(src); end - - # source://rexml//lib/rexml/doctype.rb#272 - def to_s; end - - # source://rexml//lib/rexml/doctype.rb#275 - def write(output, indent); end -end - -# source://rexml//lib/rexml/formatters/default.rb#5 -class REXML::Formatters::Default - # Prints out the XML document with no formatting -- except if ie_hack is - # set. - # - # ie_hack:: - # If set to true, then inserts whitespace before the close of an empty - # tag, so that IE's bad XML parser doesn't choke. - # - # @return [Default] a new instance of Default - # - # source://rexml//lib/rexml/formatters/default.rb#12 - def initialize(ie_hack = T.unsafe(nil)); end - - # Writes the node to some output. - # - # node:: - # The node to write - # output:: - # A class implementing <TT><<</TT>. Pass in an Output object to - # change the output encoding. - # - # source://rexml//lib/rexml/formatters/default.rb#23 - def write(node, output); end - - protected - - # source://rexml//lib/rexml/formatters/default.rb#98 - def write_cdata(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#92 - def write_comment(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#61 - def write_document(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#65 - def write_element(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#104 - def write_instruction(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#88 - def write_text(node, output); end -end - -# Pretty-prints an XML document. This destroys whitespace in text nodes -# and will insert carriage returns and indentations. -# -# TODO: Add an option to print attributes on new lines -# -# source://rexml//lib/rexml/formatters/pretty.rb#10 -class REXML::Formatters::Pretty < ::REXML::Formatters::Default - # Create a new pretty printer. - # - # output:: - # An object implementing '<<(String)', to which the output will be written. - # indentation:: - # An integer greater than 0. The indentation of each level will be - # this number of spaces. If this is < 1, the behavior of this object - # is undefined. Defaults to 2. - # ie_hack:: - # If true, the printer will insert whitespace before closing empty - # tags, thereby allowing Internet Explorer's XML parser to - # function. Defaults to false. - # - # @return [Pretty] a new instance of Pretty - # - # source://rexml//lib/rexml/formatters/pretty.rb#30 - def initialize(indentation = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # If compact is set to true, then the formatter will attempt to use as - # little space as possible - # - # source://rexml//lib/rexml/formatters/pretty.rb#14 - def compact; end - - # If compact is set to true, then the formatter will attempt to use as - # little space as possible - # - # source://rexml//lib/rexml/formatters/pretty.rb#14 - def compact=(_arg0); end - - # The width of a page. Used for formatting text - # - # source://rexml//lib/rexml/formatters/pretty.rb#16 - def width; end - - # The width of a page. Used for formatting text - # - # source://rexml//lib/rexml/formatters/pretty.rb#16 - def width=(_arg0); end - - protected - - # source://rexml//lib/rexml/formatters/pretty.rb#102 - def write_cdata(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#97 - def write_comment(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#107 - def write_document(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#39 - def write_element(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#88 - def write_text(node, output); end - - private - - # source://rexml//lib/rexml/formatters/pretty.rb#124 - def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - - # source://rexml//lib/rexml/formatters/pretty.rb#129 - def wrap(string, width); end -end - -# A Source that wraps an IO. See the Source class for method -# documentation -# -# source://rexml//lib/rexml/source.rb#159 -class REXML::IOSource < ::REXML::Source - # block_size has been deprecated - # - # @return [IOSource] a new instance of IOSource - # - # source://rexml//lib/rexml/source.rb#163 - def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#215 - def consume(pattern); end - - # @return the current line in the source - # - # source://rexml//lib/rexml/source.rb#244 - def current_line; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/source.rb#235 - def empty?; end - - # source://rexml//lib/rexml/source.rb#219 - def match(pattern, cons = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#239 - def position; end - - # source://rexml//lib/rexml/source.rb#207 - def read; end - - # source://rexml//lib/rexml/source.rb#184 - def scan(pattern, cons = T.unsafe(nil)); end - - private - - # source://rexml//lib/rexml/source.rb#286 - def encoding_updated; end - - # source://rexml//lib/rexml/source.rb#266 - def readline; end -end - -# Represents an XML Instruction; IE, <? ... ?> -# TODO: Add parent arg (3rd arg) to constructor -# -# source://rexml//lib/rexml/instruction.rb#9 -class REXML::Instruction < ::REXML::Child - # Constructs a new Instruction - # the target of this instruction is set to this. If an Instruction, - # then the Instruction is shallowly cloned (target and content are - # copied). - # be a Parent if the target argument is a Source. Otherwise, this - # String is set as the content of this instruction. - # - # @param target can be one of a number of things. If String, then - # @param content Must be either a String, or a Parent. Can only - # @return [Instruction] a new instance of Instruction - # - # source://rexml//lib/rexml/instruction.rb#25 - def initialize(target, content = T.unsafe(nil)); end - - # of the other matches the target and content of this object. - # - # @return true if other is an Instruction, and the content and target - # - # source://rexml//lib/rexml/instruction.rb#65 - def ==(other); end - - # source://rexml//lib/rexml/instruction.rb#44 - def clone; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def content; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def content=(_arg0); end - - # source://rexml//lib/rexml/instruction.rb#75 - def inspect; end - - # source://rexml//lib/rexml/instruction.rb#71 - def node_type; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def target; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def target=(_arg0); end - - # == DEPRECATED - # See the rexml/formatters package - # - # source://rexml//lib/rexml/instruction.rb#51 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# Adds named attributes to an object. -# -# source://rexml//lib/rexml/namespace.rb#7 -module REXML::Namespace - include ::REXML::XMLTokens - - # The name of the object, valid if set - # - # source://rexml//lib/rexml/namespace.rb#9 - def expanded_name; end - - # Fully expand the name, even if the prefix wasn't specified in the - # source file. - # - # source://rexml//lib/rexml/namespace.rb#57 - def fully_expanded_name; end - - # Compares names optionally WITH namespaces - # - # @return [Boolean] - # - # source://rexml//lib/rexml/namespace.rb#43 - def has_name?(other, ns = T.unsafe(nil)); end - - # The name of the object, valid if set - # - # source://rexml//lib/rexml/namespace.rb#9 - def name; end - - # Sets the name and the expanded name - # - # source://rexml//lib/rexml/namespace.rb#17 - def name=(name); end - - # The expanded name of the object, valid if name is set - # - # source://rexml//lib/rexml/namespace.rb#11 - def prefix; end - - # The expanded name of the object, valid if name is set - # - # source://rexml//lib/rexml/namespace.rb#11 - def prefix=(_arg0); end -end - -# source://rexml//lib/rexml/namespace.rb#13 -REXML::Namespace::NAME_WITHOUT_NAMESPACE = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/doctype.rb#280 -class REXML::NotationDecl < ::REXML::Child - # @return [NotationDecl] a new instance of NotationDecl - # - # source://rexml//lib/rexml/doctype.rb#282 - def initialize(name, middle, pub, sys); end - - # This method retrieves the name of the notation. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#307 - def name; end - - # Returns the value of attribute public. - # - # source://rexml//lib/rexml/doctype.rb#281 - def public; end - - # Sets the attribute public - # - # @param value the value to set the attribute public to. - # - # source://rexml//lib/rexml/doctype.rb#281 - def public=(_arg0); end - - # Returns the value of attribute system. - # - # source://rexml//lib/rexml/doctype.rb#281 - def system; end - - # Sets the attribute system - # - # @param value the value to set the attribute system to. - # - # source://rexml//lib/rexml/doctype.rb#281 - def system=(_arg0); end - - # source://rexml//lib/rexml/doctype.rb#290 - def to_s; end - - # source://rexml//lib/rexml/doctype.rb#300 - def write(output, indent = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/output.rb#5 -class REXML::Output - include ::REXML::Encoding - - # @return [Output] a new instance of Output - # - # source://rexml//lib/rexml/output.rb#10 - def initialize(real_IO, encd = T.unsafe(nil)); end - - # source://rexml//lib/rexml/output.rb#22 - def <<(content); end - - # Returns the value of attribute encoding. - # - # source://rexml//lib/rexml/output.rb#8 - def encoding; end - - # source://rexml//lib/rexml/output.rb#26 - def to_s; end -end - -# A parent has children, and has methods for accessing them. The Parent -# class is never encountered except as the superclass for some other -# object. -# -# source://rexml//lib/rexml/parent.rb#8 -class REXML::Parent < ::REXML::Child - include ::Enumerable - - # Constructor - # - # @param parent if supplied, will be set as the parent of this object - # @return [Parent] a new instance of Parent - # - # source://rexml//lib/rexml/parent.rb#13 - def initialize(parent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parent.rb#18 - def <<(object); end - - # Fetches a child at a given index - # - # @param index the Integer index of the child to fetch - # - # source://rexml//lib/rexml/parent.rb#57 - def [](index); end - - # Set an index entry. See Array.[]= - # - # @param index the index of the element to set - # @param opt either the object to set, or an Integer length - # @param child if opt is an Integer, this is the child to set - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#70 - def []=(*args); end - - # source://rexml//lib/rexml/parent.rb#18 - def add(object); end - - # source://rexml//lib/rexml/parent.rb#115 - def children; end - - # Deeply clones this object. This creates a complete duplicate of this - # Parent, including all descendants. - # - # source://rexml//lib/rexml/parent.rb#148 - def deep_clone; end - - # source://rexml//lib/rexml/parent.rb#32 - def delete(object); end - - # source://rexml//lib/rexml/parent.rb#47 - def delete_at(index); end - - # source://rexml//lib/rexml/parent.rb#43 - def delete_if(&block); end - - # source://rexml//lib/rexml/parent.rb#39 - def each(&block); end - - # source://rexml//lib/rexml/parent.rb#39 - def each_child(&block); end - - # source://rexml//lib/rexml/parent.rb#51 - def each_index(&block); end - - # Fetches the index of a given child - # of this parent. - # - # @param child the child to get the index of - # @return the index of the child, or nil if the object is not a child - # - # source://rexml//lib/rexml/parent.rb#123 - def index(child); end - - # Inserts an child after another child - # child2 will be inserted after child1 in the child list of the parent. - # If an xpath, child2 will be inserted after the first child to match - # the xpath. - # - # @param child1 this is either an xpath or an Element. If an Element, - # @param child2 the child to insert - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#102 - def insert_after(child1, child2); end - - # Inserts an child before another child - # child2 will be inserted before child1 in the child list of the parent. - # If an xpath, child2 will be inserted before the first child to match - # the xpath. - # - # @param child1 this is either an xpath or an Element. If an Element, - # @param child2 the child to insert - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#82 - def insert_before(child1, child2); end - - # @return the number of children of this parent - # - # source://rexml//lib/rexml/parent.rb#130 - def length; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/parent.rb#162 - def parent?; end - - # source://rexml//lib/rexml/parent.rb#18 - def push(object); end - - # Replaces one child with another, making sure the nodelist is correct - # Child) - # - # @param to_replace the child to replace (must be a Child) - # @param replacement the child to insert into the nodelist (must be a - # - # source://rexml//lib/rexml/parent.rb#140 - def replace_child(to_replace, replacement); end - - # @return the number of children of this parent - # - # source://rexml//lib/rexml/parent.rb#130 - def size; end - - # source://rexml//lib/rexml/parent.rb#115 - def to_a; end - - # source://rexml//lib/rexml/parent.rb#27 - def unshift(object); end -end - -# source://rexml//lib/rexml/parseexception.rb#3 -class REXML::ParseException < ::RuntimeError - # @return [ParseException] a new instance of ParseException - # - # source://rexml//lib/rexml/parseexception.rb#6 - def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parseexception.rb#48 - def context; end - - # Returns the value of attribute continued_exception. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def continued_exception; end - - # Sets the attribute continued_exception - # - # @param value the value to set the attribute continued_exception to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def continued_exception=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#43 - def line; end - - # Returns the value of attribute parser. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def parser; end - - # Sets the attribute parser - # - # @param value the value to set the attribute parser to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def parser=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#38 - def position; end - - # Returns the value of attribute source. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def source; end - - # Sets the attribute source - # - # @param value the value to set the attribute source to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def source=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#13 - def to_s; end -end - -# = Using the Pull Parser -# <em>This API is experimental, and subject to change.</em> -# parser = PullParser.new( "<a>text<b att='val'/>txet</a>" ) -# while parser.has_next? -# res = parser.next -# puts res[1]['att'] if res.start_tag? and res[0] == 'b' -# end -# See the PullEvent class for information on the content of the results. -# The data is identical to the arguments passed for the various events to -# the StreamListener API. -# -# Notice that: -# parser = PullParser.new( "<a>BAD DOCUMENT" ) -# while parser.has_next? -# res = parser.next -# raise res[1] if res.error? -# end -# -# Nat Price gave me some good ideas for the API. -# -# source://rexml//lib/rexml/parsers/baseparser.rb#29 -class REXML::Parsers::BaseParser - # @return [BaseParser] a new instance of BaseParser - # - # source://rexml//lib/rexml/parsers/baseparser.rb#115 - def initialize(source); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#120 - def add_listener(listener); end - - # Returns true if there are no more events - # - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#146 - def empty?; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#438 - def entity(reference, entities); end - - # Returns true if there are more events. Synonymous with !empty? - # - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#151 - def has_next?; end - - # Escapes all possible entities - # - # source://rexml//lib/rexml/parsers/baseparser.rb#449 - def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - - # Peek at the +depth+ event in the stack. The first element on the stack - # is at depth 0. If +depth+ is -1, will parse to the end of the input - # stream and return the last event, which is always :end_document. - # Be aware that this causes the stream to be parsed up to the +depth+ - # event, so you can effectively pre-parse the entire document (pull the - # entire thing into memory) using this method. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#167 - def peek(depth = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#136 - def position; end - - # Returns the next event. This is a +PullEvent+ object. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#182 - def pull; end - - # Returns the value of attribute source. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#124 - def source; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#126 - def stream=(source); end - - # Unescapes all possible entities - # - # source://rexml//lib/rexml/parsers/baseparser.rb#465 - def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end - - # Push an event back on the head of the stream. This method - # has (theoretically) infinite depth. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#157 - def unshift(token); end - - private - - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#495 - def need_source_encoding_update?(xml_declaration_encoding); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#589 - def parse_attributes(prefixes, curr_ns); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#514 - def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#542 - def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#501 - def parse_name(base_error_message); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#580 - def process_instruction; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#190 - def pull_event; end -end - -# source://rexml//lib/rexml/parsers/baseparser.rb#102 -REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#103 -REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#104 -REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#38 -REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#37 -REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) - -# source://rexml//lib/rexml/parsers/streamparser.rb#6 -class REXML::Parsers::StreamParser - # @return [StreamParser] a new instance of StreamParser - # - # source://rexml//lib/rexml/parsers/streamparser.rb#7 - def initialize(source, listener); end - - # source://rexml//lib/rexml/parsers/streamparser.rb#13 - def add_listener(listener); end - - # source://rexml//lib/rexml/parsers/streamparser.rb#17 - def parse; end -end - -# source://rexml//lib/rexml/parsers/treeparser.rb#7 -class REXML::Parsers::TreeParser - # @return [TreeParser] a new instance of TreeParser - # - # source://rexml//lib/rexml/parsers/treeparser.rb#8 - def initialize(source, build_context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parsers/treeparser.rb#13 - def add_listener(listener); end - - # source://rexml//lib/rexml/parsers/treeparser.rb#17 - def parse; end -end - -# You don't want to use this class. Really. Use XPath, which is a wrapper -# for this class. Believe me. You don't want to poke around in here. -# There is strange, dark magic at work in this code. Beware. Go back! Go -# back while you still can! -# -# source://rexml//lib/rexml/parsers/xpathparser.rb#12 -class REXML::Parsers::XPathParser - include ::REXML::XMLTokens - - # source://rexml//lib/rexml/parsers/xpathparser.rb#42 - def abbreviate(path_or_parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#132 - def expand(path_or_parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#16 - def namespaces=(namespaces); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#21 - def parse(path); end - - # For backward compatibility - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#174 - def preciate_to_string(parsed, &block); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#36 - def predicate(path); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#174 - def predicate_to_path(parsed, &block); end - - private - - # | AdditiveExpr ('+' | '-') MultiplicativeExpr - # | MultiplicativeExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#505 - def AdditiveExpr(path, parsed); end - - # | AndExpr S 'and' S EqualityExpr - # | EqualityExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#438 - def AndExpr(path, parsed); end - - # | EqualityExpr ('=' | '!=') RelationalExpr - # | RelationalExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#457 - def EqualityExpr(path, parsed); end - - # | FilterExpr Predicate - # | PrimaryExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#608 - def FilterExpr(path, parsed); end - - # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#663 - def FunctionCall(rest, parsed); end - - # LocationPath - # | RelativeLocationPath - # | '/' RelativeLocationPath? - # | '//' RelativeLocationPath - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#243 - def LocationPath(path, parsed); end - - # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr - # | UnaryExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#528 - def MultiplicativeExpr(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#343 - def NodeTest(path, parsed); end - - # | OrExpr S 'or' S AndExpr - # | AndExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#419 - def OrExpr(path, parsed); end - - # | LocationPath - # | FilterExpr ('/' | '//') RelativeLocationPath - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#590 - def PathExpr(path, parsed); end - - # Filters the supplied nodeset on the predicate(s) - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#395 - def Predicate(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#626 - def PrimaryExpr(path, parsed); end - - # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr - # | AdditiveExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#480 - def RelationalExpr(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#267 - def RelativeLocationPath(path, parsed); end - - # | '-' UnaryExpr - # | UnionExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#553 - def UnaryExpr(path, parsed); end - - # | UnionExpr '|' PathExpr - # | PathExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#571 - def UnionExpr(path, parsed); end - - # get_group( '[foo]bar' ) -> ['bar', '[foo]'] - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#676 - def get_group(string); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#694 - def parse_args(string); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#224 - def quote_literal(literal); end -end - -# source://rexml//lib/rexml/parsers/xpathparser.rb#339 -REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) - -# Returns a 1-1 map of the nodeset -# The contents of the resulting array are either: -# true/false, if a positive match -# String, if a name match -# NodeTest -# | ('*' | NCNAME ':' '*' | QNAME) NameTest -# | '*' ':' NCNAME NameTest since XPath 2.0 -# | NODE_TYPE '(' ')' NodeType -# | PI '(' LITERAL ')' PI -# | '[' expr ']' Predicate -# -# source://rexml//lib/rexml/parsers/xpathparser.rb#338 -REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/doctype.rb#10 -class REXML::ReferenceWriter - # @return [ReferenceWriter] a new instance of ReferenceWriter - # - # source://rexml//lib/rexml/doctype.rb#11 - def initialize(id_type, public_id_literal, system_literal, context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/doctype.rb#25 - def write(output); end -end - -# A Source can be searched for patterns, and wraps buffers and other -# objects and provides consumption of text -# -# source://rexml//lib/rexml/source.rb#31 -class REXML::Source - include ::REXML::Encoding - - # Constructor - # value, overriding all encoding detection - # - # @param arg must be a String, and should be a valid XML document - # @param encoding if non-null, sets the encoding of the source to this - # @return [Source] a new instance of Source - # - # source://rexml//lib/rexml/source.rb#43 - def initialize(arg, encoding = T.unsafe(nil)); end - - # The current buffer (what we're going to read next) - # - # source://rexml//lib/rexml/source.rb#34 - def buffer; end - - # source://rexml//lib/rexml/source.rb#87 - def consume(pattern); end - - # @return the current line in the source - # - # source://rexml//lib/rexml/source.rb#117 - def current_line; end - - # @return [Boolean] true if the Source is exhausted - # - # source://rexml//lib/rexml/source.rb#108 - def empty?; end - - # Returns the value of attribute encoding. - # - # source://rexml//lib/rexml/source.rb#37 - def encoding; end - - # Inherited from Encoding - # Overridden to support optimized en/decoding - # - # source://rexml//lib/rexml/source.rb#56 - def encoding=(enc); end - - # The line number of the last consumed text - # - # source://rexml//lib/rexml/source.rb#36 - def line; end - - # source://rexml//lib/rexml/source.rb#101 - def match(pattern, cons = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#91 - def match_to(char, pattern); end - - # source://rexml//lib/rexml/source.rb#95 - def match_to_consume(char, pattern); end - - # source://rexml//lib/rexml/source.rb#112 - def position; end - - # source://rexml//lib/rexml/source.rb#84 - def read; end - - # Scans the source for a given pattern. Note, that this is not your - # usual scan() method. For one thing, the pattern argument has some - # requirements; for another, the source can be consumed. You can easily - # confuse this method. Originally, the patterns were easier - # to construct and this method more robust, because this method - # generated search regexps on the fly; however, this was - # computationally expensive and slowed down the entire REXML package - # considerably, since this is by far the most commonly called method. - # /^\s*(#{your pattern, with no groups})(.*)/. The first group - # will be returned; the second group is used if the consume flag is - # set. - # everything after it in the Source. - # pattern is not found. - # - # @param pattern must be a Regexp, and must be in the form of - # @param consume if true, the pattern returned will be consumed, leaving - # @return the pattern, if found, or nil if the Source is empty or the - # - # source://rexml//lib/rexml/source.rb#77 - def scan(pattern, cons = T.unsafe(nil)); end - - private - - # source://rexml//lib/rexml/source.rb#125 - def detect_encoding; end - - # source://rexml//lib/rexml/source.rb#146 - def encoding_updated; end -end - -# Represents text nodes in an XML document -# -# source://rexml//lib/rexml/text.rb#11 -class REXML::Text < ::REXML::Child - include ::Comparable - - # Constructor - # +arg+ if a String, the content is set to the String. If a Text, - # the object is shallowly cloned. - # - # +respect_whitespace+ (boolean, false) if true, whitespace is - # respected - # - # +parent+ (nil) if this is a Parent object, the parent - # will be set to this. - # - # +raw+ (nil) This argument can be given three values. - # If true, then the value of used to construct this object is expected to - # contain no unescaped XML markup, and REXML will not change the text. If - # this value is false, the string may contain any characters, and REXML will - # escape any and all defined entities whose values are contained in the - # text. If this value is nil (the default), then the raw value of the - # parent will be used as the raw value for this node. If there is no raw - # value for the parent, and no value is supplied, the default is false. - # Use this field if you have entities defined for some text, and you don't - # want REXML to escape that text in output. - # Text.new( "<&", false, nil, false ) #-> "<&" - # Text.new( "<&", false, nil, false ) #-> "&lt;&amp;" - # Text.new( "<&", false, nil, true ) #-> Parse exception - # Text.new( "<&", false, nil, true ) #-> "<&" - # # Assume that the entity "s" is defined to be "sean" - # # and that the entity "r" is defined to be "russell" - # Text.new( "sean russell" ) #-> "&s; &r;" - # Text.new( "sean russell", false, nil, true ) #-> "sean russell" - # - # +entity_filter+ (nil) This can be an array of entities to match in the - # supplied text. This argument is only useful if +raw+ is set to false. - # Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell" - # Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell" - # In the last example, the +entity_filter+ argument is ignored. - # - # +illegal+ INTERNAL USE ONLY - # - # @return [Text] a new instance of Text - # - # source://rexml//lib/rexml/text.rb#94 - def initialize(arg, respect_whitespace = T.unsafe(nil), parent = T.unsafe(nil), raw = T.unsafe(nil), entity_filter = T.unsafe(nil), illegal = T.unsafe(nil)); end - - # Appends text to this text node. The text is appended in the +raw+ mode - # of this text node. - # - # +returns+ the text itself to enable method chain like - # 'text << "XXX" << "YYY"'. - # - # source://rexml//lib/rexml/text.rb#194 - def <<(to_append); end - - # +other+ a String or a Text - # +returns+ the result of (to_s <=> arg.to_s) - # - # source://rexml//lib/rexml/text.rb#203 - def <=>(other); end - - # source://rexml//lib/rexml/text.rb#184 - def clone; end - - # source://rexml//lib/rexml/text.rb#207 - def doctype; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/text.rb#179 - def empty?; end - - # source://rexml//lib/rexml/text.rb#278 - def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - - # source://rexml//lib/rexml/text.rb#233 - def inspect; end - - # source://rexml//lib/rexml/text.rb#175 - def node_type; end - - # source://rexml//lib/rexml/text.rb#125 - def parent=(parent); end - - # If +raw+ is true, then REXML leaves the value alone - # - # source://rexml//lib/rexml/text.rb#21 - def raw; end - - # If +raw+ is true, then REXML leaves the value alone - # - # source://rexml//lib/rexml/text.rb#21 - def raw=(_arg0); end - - # Returns the string value of this text node. This string is always - # escaped, meaning that it is a valid XML text node string, and all - # entities that can be escaped, have been inserted. This method respects - # the entity filter set in the constructor. - # - # # Assume that the entity "s" is defined to be "sean", and that the - # # entity "r" is defined to be "russell" - # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) - # t.to_s #-> "< & &s; russell" - # t = Text.new( "< & &s; russell", false, nil, false ) - # t.to_s #-> "< & &s; russell" - # u = Text.new( "sean russell", false, nil, true ) - # u.to_s #-> "sean russell" - # - # source://rexml//lib/rexml/text.rb#228 - def to_s; end - - # Returns the string value of this text. This is the text without - # entities, as it might be used programmatically, or printed to the - # console. This ignores the 'raw' attribute setting, and any - # entity_filter. - # - # # Assume that the entity "s" is defined to be "sean", and that the - # # entity "r" is defined to be "russell" - # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) - # t.value #-> "< & sean russell" - # t = Text.new( "< & &s; russell", false, nil, false ) - # t.value #-> "< & sean russell" - # u = Text.new( "sean russell", false, nil, true ) - # u.value #-> "sean russell" - # - # source://rexml//lib/rexml/text.rb#250 - def value; end - - # Sets the contents of this text node. This expects the text to be - # unnormalized. It returns self. - # - # e = Element.new( "a" ) - # e.add_text( "foo" ) # <a>foo</a> - # e[0].value = "bar" # <a>bar</a> - # e[0].value = "<a>" # <a><a></a> - # - # source://rexml//lib/rexml/text.rb#261 - def value=(val); end - - # source://rexml//lib/rexml/text.rb#267 - def wrap(string, width, addnewline = T.unsafe(nil)); end - - # == DEPRECATED - # See REXML::Formatters - # - # source://rexml//lib/rexml/text.rb#293 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # Writes out text, substituting special characters beforehand. - # +out+ A String, IO, or any other object supporting <<( String ) - # +input+ the text to substitute and the write out - # - # z=utf8.unpack("U*") - # ascOut="" - # z.each{|r| - # if r < 0x100 - # ascOut.concat(r.chr) - # else - # ascOut.concat(sprintf("&#x%x;", r)) - # end - # } - # puts ascOut - # - # source://rexml//lib/rexml/text.rb#325 - def write_with_substitution(out, input); end - - # FIXME - # This probably won't work properly - # - # source://rexml//lib/rexml/text.rb#305 - def xpath; end - - private - - # source://rexml//lib/rexml/text.rb#338 - def clear_cache; end - - class << self - # check for illegal characters - # - # source://rexml//lib/rexml/text.rb#131 - def check(string, pattern, doctype); end - - # source://rexml//lib/rexml/text.rb#407 - def expand(ref, doctype, filter); end - - # Escapes all possible entities - # - # source://rexml//lib/rexml/text.rb#370 - def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - - # Reads text, substituting entities - # - # source://rexml//lib/rexml/text.rb#344 - def read_with_substitution(input, illegal = T.unsafe(nil)); end - - # Unescapes all possible entities - # - # source://rexml//lib/rexml/text.rb#394 - def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end - end -end - -# source://rexml//lib/rexml/undefinednamespaceexception.rb#4 -class REXML::UndefinedNamespaceException < ::REXML::ParseException - # @return [UndefinedNamespaceException] a new instance of UndefinedNamespaceException - # - # source://rexml//lib/rexml/undefinednamespaceexception.rb#5 - def initialize(prefix, source, parser); end -end - -# source://rexml//lib/rexml/validation/validationexception.rb#4 -class REXML::Validation::ValidationException < ::RuntimeError - # @return [ValidationException] a new instance of ValidationException - # - # source://rexml//lib/rexml/validation/validationexception.rb#5 - def initialize(msg); end -end - -# NEEDS DOCUMENTATION -# -# source://rexml//lib/rexml/xmldecl.rb#8 -class REXML::XMLDecl < ::REXML::Child - include ::REXML::Encoding - - # @return [XMLDecl] a new instance of XMLDecl - # - # source://rexml//lib/rexml/xmldecl.rb#20 - def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xmldecl.rb#56 - def ==(other); end - - # source://rexml//lib/rexml/xmldecl.rb#39 - def clone; end - - # source://rexml//lib/rexml/xmldecl.rb#102 - def dowrite; end - - # source://rexml//lib/rexml/xmldecl.rb#76 - def encoding=(enc); end - - # source://rexml//lib/rexml/xmldecl.rb#106 - def inspect; end - - # source://rexml//lib/rexml/xmldecl.rb#69 - def node_type; end - - # source://rexml//lib/rexml/xmldecl.rb#98 - def nowrite; end - - # source://rexml//lib/rexml/encoding.rb#7 - def old_enc=(encoding); end - - # Returns the value of attribute standalone. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def stand_alone?; end - - # Returns the value of attribute standalone. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def standalone; end - - # Sets the attribute standalone - # - # @param value the value to set the attribute standalone to. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def standalone=(_arg0); end - - # Returns the value of attribute version. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def version; end - - # Sets the attribute version - # - # @param value the value to set the attribute version to. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def version=(_arg0); end - - # indent:: - # Ignored. There must be no whitespace before an XML declaration - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # source://rexml//lib/rexml/xmldecl.rb#49 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # Returns the value of attribute writeencoding. - # - # source://rexml//lib/rexml/xmldecl.rb#18 - def writeencoding; end - - # Returns the value of attribute writethis. - # - # source://rexml//lib/rexml/xmldecl.rb#18 - def writethis; end - - # source://rexml//lib/rexml/xmldecl.rb#63 - def xmldecl(version, encoding, standalone); end - - private - - # source://rexml//lib/rexml/xmldecl.rb#111 - def content(enc); end - - class << self - # Only use this if you do not want the XML declaration to be written; - # this object is ignored by the XML writer. Otherwise, instantiate your - # own XMLDecl and add it to the document. - # - # Note that XML 1.1 documents *must* include an XML declaration - # - # source://rexml//lib/rexml/xmldecl.rb#92 - def default; end - end -end - -# @private -# -# source://rexml//lib/rexml/xpath_parser.rb#959 -class REXML::XPathNode - # @return [XPathNode] a new instance of XPathNode - # - # source://rexml//lib/rexml/xpath_parser.rb#961 - def initialize(node, context = T.unsafe(nil)); end - - # Returns the value of attribute context. - # - # source://rexml//lib/rexml/xpath_parser.rb#960 - def context; end - - # source://rexml//lib/rexml/xpath_parser.rb#970 - def position; end - - # Returns the value of attribute raw_node. - # - # source://rexml//lib/rexml/xpath_parser.rb#960 - def raw_node; end -end - -# You don't want to use this class. Really. Use XPath, which is a wrapper -# for this class. Believe me. You don't want to poke around in here. -# There is strange, dark magic at work in this code. Beware. Go back! Go -# back while you still can! -# -# source://rexml//lib/rexml/xpath_parser.rb#54 -class REXML::XPathParser - include ::REXML::XMLTokens - - # @return [XPathParser] a new instance of XPathParser - # - # source://rexml//lib/rexml/xpath_parser.rb#60 - def initialize(strict: T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#94 - def []=(variable_name, value); end - - # Performs a depth-first (document order) XPath search, and returns the - # first match. This is the fastest, lightest way to return a single result. - # - # FIXME: This method is incomplete! - # - # source://rexml//lib/rexml/xpath_parser.rb#103 - def first(path_stack, node); end - - # source://rexml//lib/rexml/xpath_parser.rb#84 - def get_first(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#139 - def match(path_stack, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#69 - def namespaces=(namespaces = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#79 - def parse(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#89 - def predicate(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#74 - def variables=(vars = T.unsafe(nil)); end - - private - - # source://rexml//lib/rexml/xpath_parser.rb#775 - def child(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#916 - def compare(a, operator, b); end - - # source://rexml//lib/rexml/xpath_parser.rb#678 - def descendant(nodeset, include_self); end - - # source://rexml//lib/rexml/xpath_parser.rb#689 - def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end - - # source://rexml//lib/rexml/xpath_parser.rb#938 - def each_unnode(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#637 - def enter(tag, *args); end - - # source://rexml//lib/rexml/xpath_parser.rb#815 - def equality_relational_compare(set1, op, set2); end - - # source://rexml//lib/rexml/xpath_parser.rb#591 - def evaluate_predicate(expression, nodesets); end - - # Expr takes a stack of path elements and a set of nodes (either a Parent - # or an Array and returns an Array of matching nodes - # - # source://rexml//lib/rexml/xpath_parser.rb#175 - def expr(path_stack, nodeset, context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#582 - def filter_nodeset(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#745 - def following(node); end - - # source://rexml//lib/rexml/xpath_parser.rb#756 - def following_node_of(node); end - - # Returns a String namespace for a node, given a prefix - # The rules are: - # - # 1. Use the supplied namespace mapping first. - # 2. If no mapping was supplied, use the context node to look up the namespace - # - # source://rexml//lib/rexml/xpath_parser.rb#163 - def get_namespace(node, prefix); end - - # source://rexml//lib/rexml/xpath_parser.rb#642 - def leave(tag, *args); end - - # source://rexml//lib/rexml/xpath_parser.rb#763 - def next_sibling_node(node); end - - # source://rexml//lib/rexml/xpath_parser.rb#477 - def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#802 - def norm(b); end - - # source://rexml//lib/rexml/xpath_parser.rb#890 - def normalize_compare_values(a, operator, b); end - - # Builds a nodeset of all of the preceding nodes of the supplied node, - # in reverse document order - # preceding:: includes every element in the document that precedes this node, - # except for ancestors - # - # source://rexml//lib/rexml/xpath_parser.rb#708 - def preceding(node); end - - # source://rexml//lib/rexml/xpath_parser.rb#730 - def preceding_node_of(node); end - - # Reorders an array of nodes so that they are in document order - # It tries to do this efficiently. - # - # FIXME: I need to get rid of this, but the issue is that most of the XPath - # interpreter functions as a filter, which means that we lose context going - # in and out of function calls. If I knew what the index of the nodes was, - # I wouldn't have to do this. Maybe add a document IDX for each node? - # Problems with mutable documents. Or, rewrite everything. - # - # source://rexml//lib/rexml/xpath_parser.rb#655 - def sort(array_of_nodes, order); end - - # source://rexml//lib/rexml/xpath_parser.rb#441 - def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rexml//lib/rexml/xpath_parser.rb#154 - def strict?; end - - # source://rexml//lib/rexml/xpath_parser.rb#630 - def trace(*args); end - - # source://rexml//lib/rexml/xpath_parser.rb#950 - def unnode(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#877 - def value_type(value); end -end - -# source://rexml//lib/rexml/xpath_parser.rb#58 -REXML::XPathParser::DEBUG = T.let(T.unsafe(nil), FalseClass) diff --git a/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.33.1.rbi similarity index 79% rename from sorbet/rbi/gems/rubocop-ast@1.30.0.rbi rename to sorbet/rbi/gems/rubocop-ast@1.33.1.rbi index 4c53b6b..102d185 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.33.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop-ast` gem. # Please instead update this file by running `bin/tapioca gem rubocop-ast`. + class Parser::Source::Range include ::RuboCop::AST::Ext::Range end @@ -159,12 +160,16 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node # # @return [Boolean] whether the array is enclosed in percent or square # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#60 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#64 def bracketed?; end - # @deprecated Use `values.each` (a.k.a. `children.each`) + # Calls the given block for each `value` node in the `array` literal. + # If no block is given, an `Enumerator` is returned. + # + # @return [self] if a block is given + # @return [Enumerator] if no block is given # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#21 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#25 def each_value(&block); end # Checks whether the `array` literal is delimited by percent brackets. @@ -173,14 +178,14 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node # @overload percent_literal? # @return [Boolean] whether the array is enclosed in percent brackets # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#47 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#51 def percent_literal?(type = T.unsafe(nil)); end # Checks whether the `array` literal is delimited by square brackets. # # @return [Boolean] whether the array is enclosed in square brackets # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#32 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#36 def square_brackets?; end # Returns an array of all value nodes in the `array` literal. @@ -216,7 +221,7 @@ class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node end # Common functionality for primitive literal nodes: `sym`, `str`, -# `int`, `float`, ... +# `int`, `float`, `rational`... # # source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#7 module RuboCop::AST::BasicLiteralNode @@ -438,18 +443,18 @@ class RuboCop::AST::Builder < ::Parser::Builders::Default # # @return [Node] the generated node # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#98 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#105 def n(type, children, source_map); end # TODO: Figure out what to do about literal encoding handling... # More details here https://github.com/whitequark/parser/issues/283 # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#104 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#111 def string_value(token); end private - # source://rubocop-ast//lib/rubocop/ast/builder.rb#110 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#117 def node_klass(type); end end @@ -569,26 +574,17 @@ end # # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#8 class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConstantNode + # The expression being assigned to the variable. # # @return [Node] the expression being assigned. # - # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#26 + # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#16 def expression; end - # The name of the variable being assigned as a symbol. - # - # @return [Symbol] the name of the variable being assigned - # - # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#19 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#14 def name; end - - # The namespace of the constant being assigned. - # - # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) - # - # source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#12 - def namespace; end end # A node extension for `class` nodes. This will be used in place of a plain @@ -623,412 +619,412 @@ end # # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#6 module RuboCop::AST::CollectionNode - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # source://forwardable/1.3.3/forwardable.rb#231 - def &(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def &(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def *(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def *(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def +(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def +(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def -(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def -(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def <<(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def <<(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def all?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def all?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def any?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def any?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def append(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def append(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def assoc(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def assoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def bsearch(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def bsearch_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chain(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chain(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chunk(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chunk_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def clear(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def clear(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect_concat(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect_concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def combination(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def concat(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def count(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def count(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def cycle(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def cycle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def deconstruct(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def deconstruct(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete_at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete_if(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def detect(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def detect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def difference(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def difference(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def drop(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def drop_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_cons(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_cons(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_entry(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_entry(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_slice(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_with_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_with_object(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_object(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def empty?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def empty?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def entries(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def entries(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fill(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fill(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter_map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find_all(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_all(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def first(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def first(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flat_map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flat_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flatten(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flatten!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def grep(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def grep_v(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep_v(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def group_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def group_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def include?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def include?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def inject(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def inject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def insert(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def insert(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def intersect?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersect?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def intersection(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersection(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def join(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def join(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keep_if(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keep_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def last(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def lazy(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def lazy(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def length(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def length(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def map!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def max(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def max_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def member?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def member?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def min(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def min_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minmax(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minmax_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def none?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def none?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def one?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def one?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pack(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pack(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def partition(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def partition(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def permutation(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def place(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def place(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pop(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def prepend(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def prepend(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def product(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def product(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def push(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def push(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rassoc(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rassoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reduce(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reduce(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reject(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reject!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def repeated_combination(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def repeated_permutation(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse_each(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse_each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rindex(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rindex(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rotate(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rotate!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sample(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sample(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def select(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def select!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shelljoin(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shelljoin(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shift(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shuffle(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shuffle!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def size(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def size(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_after(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_after(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_before(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_before(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_when(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_when(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort_by!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sum(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def take(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def take_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def tally(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tally(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_ary(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_ary(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_set(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_set(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def transpose(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transpose(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def union(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def union(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def uniq(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def uniq!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def unshift(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def unshift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def values_at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def values_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def zip(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def zip(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def |(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def |(*_arg0, **_arg1, &_arg2); end end # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 @@ -1079,16 +1075,24 @@ end # # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#6 class RuboCop::AST::ConstNode < ::RuboCop::AST::Node + include ::RuboCop::AST::ConstantNode +end + +# Common functionality for nodes that deal with constants: +# `const`, `casgn`. +# +# source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#7 +module RuboCop::AST::ConstantNode # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#26 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#27 def absolute?; end # @return [Boolean] if the constant is a Module / Class, according to the standard convention. # Note: some classes might have uppercase in which case this method # returns false # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#20 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#21 def class_name?; end # Yield nodes for the namespace @@ -1098,29 +1102,29 @@ class RuboCop::AST::ConstNode < ::RuboCop::AST::Node # s(:const, :Foo), then # s(:const, s(:const, :Foo), :Bar) # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#43 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#44 def each_path(&block); end # @return [Boolean] if the constant is a Module / Class, according to the standard convention. # Note: some classes might have uppercase in which case this method # returns false # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#20 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#21 def module_name?; end # @return [Node, nil] the node associated with the scope (e.g. cbase, const, ...) # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#8 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#9 def namespace; end # @return [Boolean] if the constant does not start with `::` (aka s(:cbase)) # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#33 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#34 def relative?; end # @return [Symbol] the demodulized name of the constant: "::Foo::Bar" => :Bar # - # source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#13 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/constant_node.rb#14 def short_name; end end @@ -1310,6 +1314,14 @@ class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node # # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#12 def body; end + + # Checks whether this node body is a void context. + # Always `true` for `ensure`. + # + # @return [true] whether the `ensure` node body is a void context + # + # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#20 + def void_context?; end end # source://rubocop-ast//lib/rubocop/ast/ext/range.rb#5 @@ -1337,11 +1349,6 @@ module RuboCop::AST::Ext::Range def line_span(exclude_end: T.unsafe(nil)); end end -# Refinement to circumvent broken `Range#minmax` for infinity ranges in 2.6- -# -# source://rubocop-ast//lib/rubocop/ast/ext/range_min_max.rb#7 -module RuboCop::AST::Ext::RangeMinMax; end - # A node extension for `float` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available to # all `float` nodes within RuboCop. @@ -2038,6 +2045,71 @@ class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node def first_argument_index; end end +# A node extension for `masgn` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#8 +class RuboCop::AST::MasgnNode < ::RuboCop::AST::Node + # @return [Array<Node>] the assignment nodes of the multiple assignment + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#16 + def assignments; end + + # The RHS (right hand side) of the multiple assignment. This returns + # the nodes as parsed: either a single node if the RHS has a single value, + # or an `array` node containing multiple nodes. + # + # NOTE: Due to how parsing works, `expression` will return the same for + # `a, b = x, y` and `a, b = [x, y]`. + # + # @return [Node] the right hand side of a multiple assignment. + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#39 + def expression; end + + # @return [MlhsNode] the `mlhs` node + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#10 + def lhs; end + + # @return [Array<Symbol>] names of all the variables being assigned + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#21 + def names; end + + # The RHS (right hand side) of the multiple assignment. This returns + # the nodes as parsed: either a single node if the RHS has a single value, + # or an `array` node containing multiple nodes. + # + # NOTE: Due to how parsing works, `expression` will return the same for + # `a, b = x, y` and `a, b = [x, y]`. + # + # @return [Node] the right hand side of a multiple assignment. + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#39 + def rhs; end + + # In contrast to `expression`, `values` always returns a Ruby array + # containing all the nodes being assigned on the RHS. + # + # Literal arrays are considered a singular value; but unlike `expression`, + # implied `array` nodes from assigning multiple values on the RHS are treated + # as separate. + # + # @return [Array<Node>] individual values being assigned on the RHS of the multiple assignment + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#52 + def values; end + + private + + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node/masgn_node.rb#58 + def multiple_rhs?; end +end + # Common functionality for nodes that are a kind of method dispatch: # `send`, `csend`, `super`, `zsuper`, `yield`, `defined?`, # and (modern only): `index`, `indexasgn`, `lambda` @@ -2470,6 +2542,22 @@ RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_identifier_predicates.rb#20 RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) +# A node extension for `mlhs` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/mlhs_node.rb#8 +class RuboCop::AST::MlhsNode < ::RuboCop::AST::Node + # Returns all the assignment nodes on the left hand side (LHS) of a multiple assignment. + # These are generally assignment nodes (`lvasgn`, `ivasgn`, `cvasgn`, `gvasgn`, `casgn`) + # but can also be `send` nodes in case of `foo.bar, ... =` or `foo[:bar], ... =`. + # + # @return [Array<Node>] the assignment nodes of the multiple assignment LHS + # + # source://rubocop-ast//lib/rubocop/ast/node/mlhs_node.rb#14 + def assignments; end +end + # Common functionality for nodes that can be used as modifiers: # `if`, `while`, `until` # @@ -2540,19 +2628,19 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Node] a new instance of Node # @see https://www.rubydoc.info/gems/ast/AST/Node:initialize # - # source://rubocop-ast//lib/rubocop/ast/node.rb#92 + # source://rubocop-ast//lib/rubocop/ast/node.rb#113 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __ENCODING___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __FILE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __LINE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def alias_type?; end # Returns an array of ancestor nodes. @@ -2560,173 +2648,173 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array<Node>] an array of ancestor nodes # - # source://rubocop-ast//lib/rubocop/ast/node.rb#247 + # source://rubocop-ast//lib/rubocop/ast/node.rb#268 def ancestors; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def and_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def and_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def arg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def args_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#464 + # source://rubocop-ast//lib/rubocop/ast/node.rb#474 def argument?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#468 + # source://rubocop-ast//lib/rubocop/ast/node.rb#478 def argument_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_pattern_with_tail_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#416 + # source://rubocop-ast//lib/rubocop/ast/node.rb#426 def assignment?; end # Some cops treat the shovel operator as a kind of assignment. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#355 + # source://rubocop-ast//lib/rubocop/ast/node.rb#376 def assignment_or_similar?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def back_ref_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#420 + # source://rubocop-ast//lib/rubocop/ast/node.rb#430 def basic_conditional?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#363 + # source://rubocop-ast//lib/rubocop/ast/node.rb#384 def basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def begin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def block_pass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def block_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def blockarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def blockarg_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#472 + # source://rubocop-ast//lib/rubocop/ast/node.rb#482 def boolean_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def break_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#456 + # source://rubocop-ast//lib/rubocop/ast/node.rb#466 def call_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def case_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def case_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def casgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cbase_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#460 + # source://rubocop-ast//lib/rubocop/ast/node.rb#470 def chained?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#512 + # source://rubocop-ast//lib/rubocop/ast/node.rb#522 def class_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#530 + # source://rubocop-ast//lib/rubocop/ast/node.rb#540 def class_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def class_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#144 + # source://rubocop-ast//lib/rubocop/ast/node.rb#165 def complete!; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#149 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def complete?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def complex_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#424 + # source://rubocop-ast//lib/rubocop/ast/node.rb#434 def conditional?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#293 + # source://rubocop-ast//lib/rubocop/ast/node.rb#314 def const_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def const_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def const_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def csend_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def def_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#314 + # source://rubocop-ast//lib/rubocop/ast/node.rb#335 def defined_module; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#319 + # source://rubocop-ast//lib/rubocop/ast/node.rb#340 def defined_module_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def defined_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def defs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def dstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def dsym_type?; end # Calls the given block for each ancestor node from parent to root. @@ -2739,163 +2827,163 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Enumerator] if no block is given # @yieldparam node [Node] each ancestor node # - # source://rubocop-ast//lib/rubocop/ast/node.rb#235 + # source://rubocop-ast//lib/rubocop/ast/node.rb#256 def each_ancestor(*types, &block); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def eflipflop_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def empty_else_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#349 + # source://rubocop-ast//lib/rubocop/ast/node.rb#370 def empty_source?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ensure_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#408 + # source://rubocop-ast//lib/rubocop/ast/node.rb#418 def equals_asgn?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def erange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def false_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#371 + # source://rubocop-ast//lib/rubocop/ast/node.rb#392 def falsey_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def find_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#261 + # source://rubocop-ast//lib/rubocop/ast/node.rb#282 def first_line; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def float_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def for_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forward_arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forward_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#509 + # source://rubocop-ast//lib/rubocop/ast/node.rb#519 def global_const?(param0 = T.unsafe(nil), param1); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#484 + # source://rubocop-ast//lib/rubocop/ast/node.rb#494 def guard_clause?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def gvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def gvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def hash_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def hash_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ident_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def if_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def if_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def iflipflop_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#379 + # source://rubocop-ast//lib/rubocop/ast/node.rb#400 def immutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def in_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def in_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def index_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def indexasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def int_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def irange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ivar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ivasgn_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#437 + # source://rubocop-ast//lib/rubocop/ast/node.rb#447 def keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwbegin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwnilarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwoptarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwsplat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#503 + # source://rubocop-ast//lib/rubocop/ast/node.rb#513 def lambda?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#506 + # source://rubocop-ast//lib/rubocop/ast/node.rb#516 def lambda_or_proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lambda_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#265 + # source://rubocop-ast//lib/rubocop/ast/node.rb#286 def last_line; end # Use is discouraged, this is a potentially slow method and can lead @@ -2903,7 +2991,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Node, nil] the left (aka previous) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#187 + # source://rubocop-ast//lib/rubocop/ast/node.rb#208 def left_sibling; end # Use is discouraged, this is a potentially slow method and can lead @@ -2911,94 +2999,94 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array<Node>] the left (aka previous) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#197 + # source://rubocop-ast//lib/rubocop/ast/node.rb#218 def left_siblings; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#269 + # source://rubocop-ast//lib/rubocop/ast/node.rb#290 def line_count; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#359 + # source://rubocop-ast//lib/rubocop/ast/node.rb#380 def literal?; end # NOTE: `loop { }` is a normal method call and thus not a loop keyword. # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#433 + # source://rubocop-ast//lib/rubocop/ast/node.rb#443 def loop_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def masgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_alt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_as_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_current_line_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#491 + # source://rubocop-ast//lib/rubocop/ast/node.rb#501 def match_guard_clause?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_nil_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_pattern_p_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_rest_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_var_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_with_lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_with_trailing_comma_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def mlhs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#537 + # source://rubocop-ast//lib/rubocop/ast/node.rb#547 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def module_type?; end # Predicates # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#341 + # source://rubocop-ast//lib/rubocop/ast/node.rb#362 def multiline?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#375 + # source://rubocop-ast//lib/rubocop/ast/node.rb#396 def mutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#671 + # source://rubocop-ast//lib/rubocop/ast/node.rb#679 def new_class_or_module_block?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def next_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def nil_type?; end # Common destructuring method. This can be used to normalize @@ -3011,95 +3099,95 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://ast/2.4.2/lib/ast/node.rb#56 def node_parts; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#275 + # source://rubocop-ast//lib/rubocop/ast/node.rb#296 def nonempty_line_count; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def not_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def nth_ref_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def numargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def numblock_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#476 + # source://rubocop-ast//lib/rubocop/ast/node.rb#486 def numeric_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_varargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def op_asgn_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#448 + # source://rubocop-ast//lib/rubocop/ast/node.rb#458 def operator_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def optarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def or_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def or_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def pair_type?; end # Returns the parent node, or `nil` if the receiver is a root node. # # @return [Node, nil] the parent node or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#126 + # source://rubocop-ast//lib/rubocop/ast/node.rb#147 def parent; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#135 + # source://rubocop-ast//lib/rubocop/ast/node.rb#156 def parent?; end # Searching the AST # - # source://rubocop-ast//lib/rubocop/ast/node.rb#325 + # source://rubocop-ast//lib/rubocop/ast/node.rb#346 def parent_module_name; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#452 + # source://rubocop-ast//lib/rubocop/ast/node.rb#462 def parenthesized_call?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def pin_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#428 + # source://rubocop-ast//lib/rubocop/ast/node.rb#438 def post_condition_loop?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def postexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def preexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#496 + # source://rubocop-ast//lib/rubocop/ast/node.rb#506 def proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def procarg0_type?; end # Some expressions are evaluated for their value, some for their side @@ -3112,56 +3200,60 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#582 + # source://rubocop-ast//lib/rubocop/ast/node.rb#590 def pure?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#480 + # source://rubocop-ast//lib/rubocop/ast/node.rb#490 def range_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def rational_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#286 + # source://rubocop-ast//lib/rubocop/ast/node.rb#307 def receiver(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#97 def recursive_basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#97 def recursive_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def redo_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#404 + # source://rubocop-ast//lib/rubocop/ast/node.rb#414 def reference?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def regexp_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def regopt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def resbody_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def rescue_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def restarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def retry_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def return_type?; end # Use is discouraged, this is a potentially slow method and can lead @@ -3169,7 +3261,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Node, nil] the right (aka next) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#178 + # source://rubocop-ast//lib/rubocop/ast/node.rb#199 def right_sibling; end # Use is discouraged, this is a potentially slow method and can lead @@ -3177,18 +3269,18 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array<Node>] the right (aka next) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#206 + # source://rubocop-ast//lib/rubocop/ast/node.rb#227 def right_siblings; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#140 + # source://rubocop-ast//lib/rubocop/ast/node.rb#161 def root?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def sclass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def self_type?; end # Most nodes are of 'send' type, so this method is defined @@ -3196,15 +3288,15 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#119 + # source://rubocop-ast//lib/rubocop/ast/node.rb#140 def send_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def shadowarg_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#412 + # source://rubocop-ast//lib/rubocop/ast/node.rb#422 def shorthand_asgn?; end # Returns the index of the receiver node in its siblings. (Sibling index @@ -3213,70 +3305,70 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Integer, nil] the index of the receiver node in its siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 + # source://rubocop-ast//lib/rubocop/ast/node.rb#192 def sibling_index; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#345 + # source://rubocop-ast//lib/rubocop/ast/node.rb#366 def single_line?; end # NOTE: Some rare nodes may have no source, like `s(:args)` in `foo {}` # # @return [String, nil] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#253 + # source://rubocop-ast//lib/rubocop/ast/node.rb#274 def source; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#279 + # source://rubocop-ast//lib/rubocop/ast/node.rb#300 def source_length; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#257 + # source://rubocop-ast//lib/rubocop/ast/node.rb#278 def source_range; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#444 + # source://rubocop-ast//lib/rubocop/ast/node.rb#454 def special_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def splat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#291 + # source://rubocop-ast//lib/rubocop/ast/node.rb#312 def str_content(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def str_type?; end # @deprecated Use `:class_constructor?` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#525 + # source://rubocop-ast//lib/rubocop/ast/node.rb#535 def struct_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def super_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def sym_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def true_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#367 + # source://rubocop-ast//lib/rubocop/ast/node.rb#388 def truthy_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def undef_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def unless_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def until_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def until_type?; end # Override `AST::Node#updated` so that `AST::Processor` does not try to @@ -3285,7 +3377,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # identical subtrees. Rather, the entire AST must be copied any time any # part of it is changed. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#160 + # source://rubocop-ast//lib/rubocop/ast/node.rb#181 def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end # Some expressions are evaluated for their value, some for their side @@ -3296,76 +3388,82 @@ class RuboCop::AST::Node < ::Parser::AST::Node # So, does the return value of this node matter? If we changed it to # `(...; nil)`, might that affect anything? # - # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#551 + # source://rubocop-ast//lib/rubocop/ast/node.rb#560 def value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#400 + # source://rubocop-ast//lib/rubocop/ast/node.rb#410 def variable?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def when_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def while_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def while_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def xstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def yield_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def zsuper_type?; end protected - # source://rubocop-ast//lib/rubocop/ast/node.rb#130 + # source://rubocop-ast//lib/rubocop/ast/node.rb#151 def parent=(node); end private # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#610 + # source://rubocop-ast//lib/rubocop/ast/node.rb#618 def begin_value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#621 + # source://rubocop-ast//lib/rubocop/ast/node.rb#629 def case_if_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#305 + # source://rubocop-ast//lib/rubocop/ast/node.rb#326 def defined_module0(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#615 + # source://rubocop-ast//lib/rubocop/ast/node.rb#623 def for_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#657 + # source://rubocop-ast//lib/rubocop/ast/node.rb#665 def parent_module_name_for_block(ancestor); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#645 + # source://rubocop-ast//lib/rubocop/ast/node.rb#653 def parent_module_name_for_sclass(sclass_node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#632 + # source://rubocop-ast//lib/rubocop/ast/node.rb#640 def parent_module_name_part(node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#600 + # source://rubocop-ast//lib/rubocop/ast/node.rb#608 def visit_ancestors(types); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#627 + # source://rubocop-ast//lib/rubocop/ast/node.rb#635 def while_until_value_used?; end + + class << self + private + + # source://rubocop-ast//lib/rubocop/ast/node.rb#92 + def def_recursive_literal_predicate(kind); end + end end # @api private @@ -3509,7 +3607,7 @@ RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 class RuboCop::AST::NodePattern include ::RuboCop::AST::NodePattern::MethodDefiner - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [NodePattern] a new instance of NodePattern # @@ -3527,8 +3625,8 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def ast; end - # source://forwardable/1.3.3/forwardable.rb#231 - def captures(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def captures(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 def encode_with(coder); end @@ -3556,16 +3654,16 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def match_code; end - # source://forwardable/1.3.3/forwardable.rb#231 - def named_parameters(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def named_parameters(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute pattern. # # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def pattern; end - # source://forwardable/1.3.3/forwardable.rb#231 - def positional_parameters(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def positional_parameters(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 def to_s; end @@ -3670,15 +3768,15 @@ end # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 class RuboCop::AST::NodePattern::Compiler - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Compiler] a new instance of Compiler # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#15 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 - def bind(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bind(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute binding. # @@ -3803,7 +3901,10 @@ class RuboCop::AST::NodePattern::Compiler::Binding # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16 def bind(name); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#30 + # Yields for each branch of the given union, forbidding unification of + # bindings which only appear in a subset of the union. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#31 def union_bind(enum); end private @@ -3821,8 +3922,8 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 - def comments(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def comments(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 def named_parameters; end @@ -3835,8 +3936,8 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 def parser; end - # source://forwardable/1.3.3/forwardable.rb#231 - def tokens(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tokens(*_arg0, **_arg1, &_arg2); end end # @api private @@ -4151,7 +4252,6 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17 class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler # Calls `compile_sequence`; the actual `compile` method @@ -4305,6 +4405,8 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST: def within_loop; end end +# Shift of 1 from standard Ruby indices +# # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#18 RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) @@ -4437,7 +4539,7 @@ class RuboCop::AST::NodePattern::LexerRex # The current location in the parse. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#104 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#103 def location; end # The StringScanner for this lexer. @@ -4452,22 +4554,22 @@ class RuboCop::AST::NodePattern::LexerRex # Lex the next token. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#113 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#112 def next_token; end # Parse the given string. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#84 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#83 def parse(str); end # Read in and parse the file at +path+. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#94 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#93 def parse_file(path); end # The current scanner class. Must be overridden in subclasses. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#77 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#76 def scanner_class; end # The StringScanner for this lexer. @@ -4611,218 +4713,218 @@ end # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node include ::RuboCop::AST::Descendence - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # Note: `arity.end` may be `Float::INFINITY` # # @return [Integer, Range] An Integer for fixed length terms, otherwise a Range. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#29 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#28 def arity; end # @return [Range] arity as a Range # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#69 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#68 def arity_range; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#23 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#22 def capture?; end # @return [Node] most nodes have only one child # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#48 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#47 def child; end # @return [Array<Node>] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#43 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#42 def children_nodes; end # @return [Array<Node>, nil] replace node with result, or `nil` if no change requested. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#34 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#33 def in_sequence_head; end # that matches within a Set (e.g. `42`, `:sym` but not `/regexp/`) # # @return [Boolean] returns true for nodes having a Ruby literal equivalent # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#64 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#63 def matches_within_set?; end # @return [Integer] nb of captures of that node and its descendants # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#53 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#52 def nb_captures; end # To be overridden by subclasses # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#19 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#18 def rest?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#78 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#77 def source_range; end # @return [Boolean] returns whether it matches a variable number of elements # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#58 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#57 def variadic?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#74 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#73 def with(type: T.unsafe(nil), children: T.unsafe(nil), location: T.unsafe(nil)); end end # Node class for `<int str ...>` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#180 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#179 class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#198 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#197 def arity; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#190 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#189 def ends_with_rest?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#194 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#193 def rest_node; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#186 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#185 def term_nodes; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#183 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#182 RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) # Node class for `$something` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#97 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#96 class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node - # source://forwardable/1.3.3/forwardable.rb#231 - def arity(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def arity(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#101 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#100 def capture?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#109 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#108 def in_sequence_head; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#105 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#104 def nb_captures; end - # source://forwardable/1.3.3/forwardable.rb#231 - def rest?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rest?(*_arg0, **_arg1, &_arg2); end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#85 module RuboCop::AST::NodePattern::Node::ForbidInSeqHead # @raise [NodePattern::Invalid] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#87 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 def in_sequence_head; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#140 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#139 RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#82 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#81 RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) # Registry # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#250 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249 RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#12 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#11 RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) # Node class for `predicate?(:arg, :list)` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#130 class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#136 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#135 def arg_list; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#131 def method_name; end end # Node class for `int+` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#143 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#142 class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#156 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#155 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#146 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#145 def operator; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#150 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#149 RuboCop::AST::NodePattern::Node::Repetition::ARITIES = T.let(T.unsafe(nil), Hash) # Node class for `...` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#161 class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#170 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#169 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#174 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#173 def in_sequence_head; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#166 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#165 def rest?; end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#163 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#162 RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) # Node class for `(type first second ...)` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#118 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#117 class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead # @return [Sequence] a new instance of Sequence # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#121 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#120 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end end # A list (potentially empty) of nodes; part of a Union # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#206 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#205 class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#209 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#208 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#214 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#213 def in_sequence_head; end end # Node class for `{ ... }` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#223 class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#225 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#232 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#231 def in_sequence_head; end end @@ -4834,7 +4936,7 @@ end # # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#12 class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Parser] a new instance of Parser # @@ -4953,29 +5055,29 @@ class RuboCop::AST::NodePattern::Parser < ::Racc::Parser # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465 def _reduce_none(val, _values); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_atom(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_atom(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_call(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_call(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_capture(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_capture(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_list(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_list(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_unary_op(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_unary_op(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_union(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_union(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 def inspect; end - # source://forwardable/1.3.3/forwardable.rb#231 - def next_token(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def next_token(*_arg0, **_arg1, &_arg2); end # (Similar API to `parser` gem) # Parses a source and returns the AST. @@ -5161,9 +5263,6 @@ RuboCop::AST::NodePattern::Sets::SET_CLONE_DUP_FREEZE = T.let(T.unsafe(nil), Set # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) @@ -5173,9 +5272,6 @@ RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ENV = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) @@ -5239,6 +5335,9 @@ RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MAP_FILTER_MAP = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_MODULE_FUNCTION_RUBY2_KEYWORDS = T.let(T.unsafe(nil), Set) @@ -5344,6 +5443,9 @@ RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__PUSH_APPEND = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) @@ -5401,7 +5503,7 @@ RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#55 RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) -# Common functionality for primitive numeric nodes: `int`, `float`, ... +# Common functionality for primitive numeric nodes: `int`, `float`, `rational`... # # source://rubocop-ast//lib/rubocop/ast/node/mixin/numeric_node.rb#6 module RuboCop::AST::NumericNode @@ -5738,42 +5840,42 @@ end # and other information such as disabled lines for cops. # It also provides a convenient way to access source lines. # -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#11 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#10 class RuboCop::AST::ProcessedSource # @return [ProcessedSource] a new instance of ProcessedSource # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#26 - def initialize(source, ruby_version, path = T.unsafe(nil)); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#28 + def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#63 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#72 def [](*args); end # Returns the value of attribute ast. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def ast; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#50 def ast_with_comments; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#102 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#111 def blank?; end # Returns the value of attribute buffer. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def buffer; end # Raw source checksum for tracking infinite loops. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#74 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#83 def checksum; end # @return [Comment, nil] the comment at that line, if any. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#116 def comment_at_line(line); end # Consider using `each_comment_in_lines` instead @@ -5781,173 +5883,181 @@ class RuboCop::AST::ProcessedSource # @deprecated use contains_comment? # @return [Boolean] if any of the lines in the given `source_range` has a comment. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#129 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138 def commented?(source_range); end # Returns the value of attribute comments. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def comments; end # Should have been called `comments_before_or_at_line`. Doubtful it has of any valid use. # # @deprecated Use `each_comment_in_lines` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#137 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#146 def comments_before_line(line); end # Consider using `each_comment_in_lines` instead # # @return [Boolean] if any of the lines in the given `source_range` has a comment. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#129 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138 def contains_comment?(source_range); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#151 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#160 def current_line(token); end # Returns the value of attribute diagnostics. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def diagnostics; end # @deprecated Use `comments.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#79 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#88 def each_comment(&block); end # Enumerates on the comments contained with the given `line_range` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#117 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126 def each_comment_in_lines(line_range); end # @deprecated Use `tokens.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#89 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98 def each_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 def file_path; end # @deprecated Use `comment_at_line`, `each_comment_in_lines`, or `comments.find` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#84 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#93 def find_comment(&block); end # @deprecated Use `tokens.find` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#94 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#103 def find_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#172 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#181 def first_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#155 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#164 def following_line(token); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#176 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#185 def last_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#159 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#168 def line_indentation(line_number); end # @return [Boolean] if the given line number has a comment. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#112 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#121 def line_with_comment?(line); end # Returns the source lines, line break characters removed, excluding a # possible __END__ and everything that comes after. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#49 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#58 def lines; end + # Returns the value of attribute parser_engine. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def parser_engine; end + # Returns the value of attribute parser_error. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def parser_error; end # Returns the value of attribute path. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def path; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#147 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#156 def preceding_line(token); end # Returns the value of attribute raw_source. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def raw_source; end # Returns the value of attribute ruby_version. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def ruby_version; end # The tokens list is always sorted by token position, except for cases when heredoc # is passed as a method argument. In this case tokens are interleaved by # heredoc contents' tokens. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#183 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#192 def sorted_tokens; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#141 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#150 def start_with?(string); end # Returns the value of attribute tokens. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def tokens; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#166 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#175 def tokens_within(range_or_node); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#67 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#76 def valid_syntax?; end private - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#190 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#199 def comment_index; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#278 - def create_parser(ruby_version); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#309 + def create_parser(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#294 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#325 def first_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#299 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#330 def last_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#196 - def parse(source, ruby_version); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#205 + def parse(source, ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#230 - def parser_class(ruby_version); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#238 + def parser_class(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#304 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#335 def source_range(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#213 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#222 def tokenize(parser); end class << self - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 - def from_file(path, ruby_version); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#23 + def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end end end -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#15 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#14 RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#17 +RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) + # @api private # -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#12 RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) # A node extension for `irange` and `erange` nodes. This will be used in @@ -5963,6 +6073,16 @@ class RuboCop::AST::RangeNode < ::RuboCop::AST::Node def end; end end +# A node extension for `rational` nodes. This will be used in place of a plain +# node when the builder constructs the AST, making its methods available to +# all `rational` nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/rational_node.rb#8 +class RuboCop::AST::RationalNode < ::RuboCop::AST::Node + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode +end + # A node extension for `regexp` nodes. This will be used in place of a plain # node when the builder constructs the AST, making its methods available # to all `regexp` nodes within RuboCop. @@ -6905,6 +7025,18 @@ class RuboCop::AST::UntilNode < ::RuboCop::AST::Node def keyword; end end +# A node extension for `lvar`, `ivar`, `cvar` and `gvar` nodes. +# This will be used in place of a plain node when the builder constructs +# the AST, making its methods available to all assignment nodes within RuboCop. +# +# source://rubocop-ast//lib/rubocop/ast/node/var_node.rb#8 +class RuboCop::AST::VarNode < ::RuboCop::AST::Node + # @return [Symbol] The name of the variable. + # + # source://rubocop-ast//lib/rubocop/ast/node/var_node.rb#10 + def name; end +end + # source://rubocop-ast//lib/rubocop/ast/version.rb#5 module RuboCop::AST::Version; end @@ -7004,3 +7136,343 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 def node_parts; end end + +class RuboCop::CommentConfig + # source://standard/1.41.1/lib/standard/rubocop/ext.rb#20 + def initialize(processed_source); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#63 + def comment_only_line?(line_number); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#51 + def cop_disabled_line_ranges; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#39 + def cop_enabled_at_line?(cop, line_number); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#47 + def cop_opted_in?(cop); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#55 + def extra_enabled_comments; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#30 + def processed_source; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end + + private + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#96 + def analyze; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#124 + def analyze_cop(analysis, directive); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#144 + def analyze_disabled(analysis, directive); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#155 + def analyze_rest(analysis, directive); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#135 + def analyze_single_line(analysis, directive); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#164 + def cop_line_ranges(analysis); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#170 + def each_directive; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#69 + def extra_enabled_comments_with_names(extras:, names:); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#190 + def handle_enable_all(directive, names, extras); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#204 + def handle_switch(directive, names, extras); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#115 + def inject_disabled_cops_directives(analyses); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#183 + def non_comment_token_line_numbers; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#34 + def old_initialize(processed_source); end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#83 + def opt_in_cops; end + + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#179 + def qualified_cop_name(cop_name); end +end + +class RuboCop::Config + # source://rubocop/1.66.1/lib/rubocop/config.rb#30 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#170 + def active_support_extensions_enabled?; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#96 + def add_excludes_from_higher_level(highest_config); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#197 + def allowed_camel_case_file?(file); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#241 + def base_dir_for_path_parameters; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#271 + def bundler_lock_file_path; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#51 + def check; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#142 + def clusivity_config_for_badge?(badge); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#108 + def deprecation_check; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#162 + def disabled_new_cops?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#166 + def enabled_new_cops?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#219 + def file_to_exclude?(file); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#178 + def file_to_include?(file); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#158 + def for_all_cops; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#128 + def for_badge(badge); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#122 + def for_cop(cop); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#153 + def for_department(department_name); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#296 + def gem_versions_in_target; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#300 + def inspect; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#76 + def internal?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#47 + def loaded_features; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#20 + def loaded_path; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#81 + def make_excludes_absolute; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#251 + def parser_engine; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#232 + def path_relative_to_config(path); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#228 + def patterns_to_exclude; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#224 + def patterns_to_include; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#282 + def pending_cops; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#211 + def possibly_include_hidden?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#71 + def signature; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#266 + def smart_loaded_path; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#255 + def target_rails_version; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#67 + def to_s; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#58 + def validate_after_resolution; end + + private + + # source://rubocop/1.66.1/lib/rubocop/config.rb#350 + def department_of(qualified_cop_name); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#338 + def enable_cop?(qualified_cop_name, cop_options); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#325 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#331 + def read_gem_versions_from_target_lockfile; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#312 + def read_rails_version_from_bundler_lock_file; end + + # source://rubocop/1.66.1/lib/rubocop/config.rb#307 + def target_rails_version_from_bundler_lock_file; end + + class << self + # source://rubocop/1.66.1/lib/rubocop/config.rb#22 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +class RuboCop::ConfigValidator + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#26 + def initialize(config); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#62 + def target_ruby_version; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#32 + def validate; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#58 + def validate_after_resolution; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#66 + def validate_section_presence(name); end + + private + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#103 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#253 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#76 + def check_obsoletions; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#83 + def check_target_ruby; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#194 + def each_invalid_parameter(cop_name); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#119 + def list_unknown_cops(invalid_cop_names); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#273 + def param_error_message(parent, key, value, supposed_values); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#241 + def reject_conflicting_safe_settings; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#232 + def reject_mutually_exclusive_defaults; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#141 + def suggestion(name); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#74 + def target_ruby; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#206 + def validate_enforced_styles(valid_cop_names); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#168 + def validate_new_cops_parameter; end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#179 + def validate_parameter_names(valid_cop_names); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#226 + def validate_support_and_has_list(name, formats, valid); end + + # source://rubocop/1.66.1/lib/rubocop/config_validator.rb#157 + def validate_syntax_cop; end +end + +# Similar to `Forwardable#def_delegators`, but simpler & faster +# +# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#5 +module RuboCop::SimpleForwardable + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#6 + def def_delegators(accessor, *methods); end +end diff --git a/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi b/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-performance@1.20.2.rbi rename to sorbet/rbi/gems/rubocop-performance@1.22.1.rbi index 72f4043..6d0fc57 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `rubocop-performance` gem. # Please instead update this file by running `bin/tapioca gem rubocop-performance`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.7.7.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-sorbet@0.7.7.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi index f5ac216..9dac839 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.7.7.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `rubocop-sorbet` gem. # Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop@1.60.2.rbi b/sorbet/rbi/gems/rubocop@1.66.1.rbi similarity index 94% rename from sorbet/rbi/gems/rubocop@1.60.2.rbi rename to sorbet/rbi/gems/rubocop@1.66.1.rbi index ed45e7f..272d6ca 100644 --- a/sorbet/rbi/gems/rubocop@1.60.2.rbi +++ b/sorbet/rbi/gems/rubocop@1.66.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop` gem. # Please instead update this file by running `bin/tapioca gem rubocop`. + class Parser::Source::Comment include ::RuboCop::Ext::Comment end @@ -97,41 +98,44 @@ class RuboCop::CLI private - # source://rubocop//lib/rubocop/cli.rb#152 + # source://rubocop//lib/rubocop/cli.rb#156 def act_on_options; end - # source://rubocop//lib/rubocop/cli.rb#189 + # source://rubocop//lib/rubocop/cli.rb#198 def apply_default_formatter; end - # source://rubocop//lib/rubocop/cli.rb#121 + # source://rubocop//lib/rubocop/cli.rb#125 def execute_runners; end + # source://rubocop//lib/rubocop/cli.rb#182 + def handle_editor_mode; end + # @raise [Finished] # - # source://rubocop//lib/rubocop/cli.rb#178 + # source://rubocop//lib/rubocop/cli.rb#187 def handle_exiting_options; end - # source://rubocop//lib/rubocop/cli.rb#140 + # source://rubocop//lib/rubocop/cli.rb#144 def parallel_by_default!; end - # source://rubocop//lib/rubocop/cli.rb#76 + # source://rubocop//lib/rubocop/cli.rb#80 def profile_if_needed; end - # source://rubocop//lib/rubocop/cli.rb#109 + # source://rubocop//lib/rubocop/cli.rb#113 def require_gem(name); end - # source://rubocop//lib/rubocop/cli.rb#117 + # source://rubocop//lib/rubocop/cli.rb#121 def run_command(name); end - # source://rubocop//lib/rubocop/cli.rb#169 + # source://rubocop//lib/rubocop/cli.rb#174 def set_options_to_config_loader; end - # source://rubocop//lib/rubocop/cli.rb#129 + # source://rubocop//lib/rubocop/cli.rb#133 def suggest_extensions; end # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/cli.rb#133 + # source://rubocop//lib/rubocop/cli.rb#137 def validate_options_vs_config; end end @@ -166,77 +170,83 @@ end class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#25 def run; end private # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#98 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#107 def add_formatter; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#106 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#115 def add_inheritance_from_auto_generated_file(config_file); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#102 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#111 def execute_runner; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#127 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#136 def existing_configuration(config_file); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#60 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#65 def line_length_cop(config); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#53 def line_length_enabled?(config); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#56 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#61 def max_line_length(config); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#31 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#34 def maybe_run_line_length_cop; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#73 + def only_exclude?; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#162 def options_config_in_root?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#64 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#69 def options_has_only_flag?; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#144 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153 def relative_path_to_todo_from_options_config; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#100 def reset_config_and_auto_gen_file; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#82 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91 def run_all_cops(line_length_contents); end # Do an initial run with only Layout/LineLength so that cops that @@ -245,23 +255,23 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#71 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#80 def run_line_length_cop; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#52 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#57 def same_max_line_length?(config1, config2); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#43 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 def skip_line_length_cop(reason); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#133 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#142 def write_config_file(file_name, file_string, rubocop_yml_contents); end end @@ -288,7 +298,12 @@ RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(n # @api private # # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED = T.let(T.unsafe(nil), String) +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_COPS = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 +RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED_ONLY_EXCLUDE = T.let(T.unsafe(nil), String) # @api private # @@ -426,7 +441,7 @@ RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) # @api private # # source://rubocop//lib/rubocop/cli/command/lsp.rb#10 -class RuboCop::CLI::Command::Lsp < ::RuboCop::CLI::Command::Base +class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base # @api private # # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 @@ -730,6 +745,11 @@ class RuboCop::CachedData # source://rubocop//lib/rubocop/cached_data.rb#47 def deserialize_offenses(offenses); end + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#56 + def location_from_source_buffer(offense, source_buffer); end + # @api private # # source://rubocop//lib/rubocop/cached_data.rb#40 @@ -745,11 +765,11 @@ end # # source://rubocop//lib/rubocop/comment_config.rb#6 class RuboCop::CommentConfig - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [CommentConfig] a new instance of CommentConfig # - # source://standard/1.34.0/lib/standard/rubocop/ext.rb#20 + # source://standard/1.41.1/lib/standard/rubocop/ext.rb#20 def initialize(processed_source); end # @return [Boolean] @@ -757,8 +777,8 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://forwardable/1.3.3/forwardable.rb#231 - def config(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/comment_config.rb#51 def cop_disabled_line_ranges; end @@ -781,8 +801,8 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://forwardable/1.3.3/forwardable.rb#231 - def registry(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end private @@ -953,18 +973,18 @@ end class RuboCop::Config include ::RuboCop::PathUtil include ::RuboCop::FileFinder - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Config] a new instance of Config # # source://rubocop//lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # @@ -976,7 +996,7 @@ class RuboCop::Config # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#193 + # source://rubocop//lib/rubocop/config.rb#197 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -985,10 +1005,12 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # source://rubocop//lib/rubocop/config.rb#237 + # source://rubocop//lib/rubocop/config.rb#241 def base_dir_for_path_parameters; end - # source://rubocop//lib/rubocop/config.rb#262 + # @return [String, nil] + # + # source://rubocop//lib/rubocop/config.rb#271 def bundler_lock_file_path; end # source://rubocop//lib/rubocop/config.rb#51 @@ -1000,42 +1022,42 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#108 def deprecation_check; end - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://rubocop//lib/rubocop/config.rb#162 def disabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_key(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://rubocop//lib/rubocop/config.rb#166 def enabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#215 + # source://rubocop//lib/rubocop/config.rb#219 def file_to_exclude?(file); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#174 + # source://rubocop//lib/rubocop/config.rb#178 def file_to_include?(file); end # source://rubocop//lib/rubocop/config.rb#158 @@ -1064,7 +1086,12 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#153 def for_department(department_name); end - # source://rubocop//lib/rubocop/config.rb#285 + # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) + # + # source://rubocop//lib/rubocop/config.rb#296 + def gem_versions_in_target; end + + # source://rubocop//lib/rubocop/config.rb#300 def inspect; end # True if this is a config file that is shipped with RuboCop @@ -1074,11 +1101,11 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#76 def internal?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def key?(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keys(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#47 def loaded_features; end @@ -1091,22 +1118,25 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#81 def make_excludes_absolute; end - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def merge(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#228 + # source://rubocop//lib/rubocop/config.rb#251 + def parser_engine; end + + # source://rubocop//lib/rubocop/config.rb#232 def path_relative_to_config(path); end - # source://rubocop//lib/rubocop/config.rb#224 + # source://rubocop//lib/rubocop/config.rb#228 def patterns_to_exclude; end - # source://rubocop//lib/rubocop/config.rb#220 + # source://rubocop//lib/rubocop/config.rb#224 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#273 + # source://rubocop//lib/rubocop/config.rb#282 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1114,56 +1144,74 @@ class RuboCop::Config # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#207 + # source://rubocop//lib/rubocop/config.rb#211 def possibly_include_hidden?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#71 def signature; end - # source://rubocop//lib/rubocop/config.rb#258 + # source://rubocop//lib/rubocop/config.rb#266 def smart_loaded_path; end - # source://rubocop//lib/rubocop/config.rb#247 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop//lib/rubocop/config.rb#255 def target_rails_version; end - # source://forwardable/1.3.3/forwardable.rb#231 - def target_ruby_version(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_hash(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#67 def to_s; end - # source://forwardable/1.3.3/forwardable.rb#231 - def transform_values(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def validate(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#58 def validate_after_resolution; end private - # source://rubocop//lib/rubocop/config.rb#320 + # source://rubocop//lib/rubocop/config.rb#350 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#308 + # source://rubocop//lib/rubocop/config.rb#338 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop//lib/rubocop/config.rb#295 + # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` + # @return [Float] The major and minor version, like `7.1` + # + # source://rubocop//lib/rubocop/config.rb#325 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop//lib/rubocop/config.rb#331 + def read_gem_versions_from_target_lockfile; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#312 def read_rails_version_from_bundler_lock_file; end - # source://rubocop//lib/rubocop/config.rb#291 + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#307 def target_rails_version_from_bundler_lock_file; end class << self @@ -1239,7 +1287,7 @@ class RuboCop::ConfigFinder # @api private # - # source://rubocop//lib/rubocop/config_finder.rb#59 + # source://rubocop//lib/rubocop/config_finder.rb#69 def expand_path(path); end # @api private @@ -1255,11 +1303,16 @@ class RuboCop::ConfigFinder # @api private # # source://rubocop//lib/rubocop/config_finder.rb#44 + def find_project_root_dot_config; end + + # @api private + # + # source://rubocop//lib/rubocop/config_finder.rb#54 def find_user_dotfile; end # @api private # - # source://rubocop//lib/rubocop/config_finder.rb#52 + # source://rubocop//lib/rubocop/config_finder.rb#62 def find_user_xdg_config; end end end @@ -1475,10 +1528,10 @@ class RuboCop::ConfigLoader def resolver; end # source://rubocop//lib/rubocop/config_loader.rb#238 - def yaml_safe_load(yaml_code, filename); end + def yaml_tree_to_hash(yaml_tree); end # source://rubocop//lib/rubocop/config_loader.rb#248 - def yaml_safe_load!(yaml_code, filename); end + def yaml_tree_to_hash!(yaml_tree); end end end @@ -1585,12 +1638,12 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#268 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 def gem_config_path(gem_name, relative_config_path); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#245 def handle_disabled_by_default(config, new_default_configuration); end # @api private @@ -1630,7 +1683,7 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#264 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#263 def transform(config, &block); end # @api private @@ -2212,23 +2265,23 @@ end # # source://rubocop//lib/rubocop/config_validator.rb#6 class RuboCop::ConfigValidator - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [ConfigValidator] a new instance of ConfigValidator # - # source://rubocop//lib/rubocop/config_validator.rb#25 + # source://rubocop//lib/rubocop/config_validator.rb#26 def initialize(config); end - # source://forwardable/1.3.3/forwardable.rb#231 - def for_all_cops(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def smart_loaded_path(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config_validator.rb#61 + # source://rubocop//lib/rubocop/config_validator.rb#62 def target_ruby_version; end - # source://rubocop//lib/rubocop/config_validator.rb#31 + # source://rubocop//lib/rubocop/config_validator.rb#32 def validate; end # Validations that should only be run after all config resolving has @@ -2237,76 +2290,76 @@ class RuboCop::ConfigValidator # chain has been loaded so that only the final value is validated, and # any obsolete but overridden values are ignored. # - # source://rubocop//lib/rubocop/config_validator.rb#57 + # source://rubocop//lib/rubocop/config_validator.rb#58 def validate_after_resolution; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#65 + # source://rubocop//lib/rubocop/config_validator.rb#66 def validate_section_presence(name); end private # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#102 + # source://rubocop//lib/rubocop/config_validator.rb#103 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#251 + # source://rubocop//lib/rubocop/config_validator.rb#253 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_validator.rb#75 + # source://rubocop//lib/rubocop/config_validator.rb#76 def check_obsoletions; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#82 + # source://rubocop//lib/rubocop/config_validator.rb#83 def check_target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#193 + # source://rubocop//lib/rubocop/config_validator.rb#194 def each_invalid_parameter(cop_name); end - # source://rubocop//lib/rubocop/config_validator.rb#118 + # source://rubocop//lib/rubocop/config_validator.rb#119 def list_unknown_cops(invalid_cop_names); end # FIXME: Handling colors in exception messages like this is ugly. # - # source://rubocop//lib/rubocop/config_validator.rb#264 - def msg_not_boolean(parent, key, value); end + # source://rubocop//lib/rubocop/config_validator.rb#273 + def param_error_message(parent, key, value, supposed_values); end - # source://rubocop//lib/rubocop/config_validator.rb#240 + # source://rubocop//lib/rubocop/config_validator.rb#241 def reject_conflicting_safe_settings; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#231 + # source://rubocop//lib/rubocop/config_validator.rb#232 def reject_mutually_exclusive_defaults; end - # source://rubocop//lib/rubocop/config_validator.rb#140 + # source://rubocop//lib/rubocop/config_validator.rb#141 def suggestion(name); end # Returns the value of attribute target_ruby. # - # source://rubocop//lib/rubocop/config_validator.rb#73 + # source://rubocop//lib/rubocop/config_validator.rb#74 def target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#205 + # source://rubocop//lib/rubocop/config_validator.rb#206 def validate_enforced_styles(valid_cop_names); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#167 + # source://rubocop//lib/rubocop/config_validator.rb#168 def validate_new_cops_parameter; end - # source://rubocop//lib/rubocop/config_validator.rb#178 + # source://rubocop//lib/rubocop/config_validator.rb#179 def validate_parameter_names(valid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#225 + # source://rubocop//lib/rubocop/config_validator.rb#226 def validate_support_and_has_list(name, formats, valid); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#156 + # source://rubocop//lib/rubocop/config_validator.rb#157 def validate_syntax_cop; end end @@ -2315,6 +2368,9 @@ end # source://rubocop//lib/rubocop/config_validator.rb#10 RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) +# source://rubocop//lib/rubocop/config_validator.rb#21 +RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/config_validator.rb#20 RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) @@ -2364,7 +2420,7 @@ module RuboCop::Cop::Alignment # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#45 def each_bad_alignment(items, base_column); end - # @deprecated Use processed_source.comment_at_line(line) + # @deprecated Use processed_source.line_with_comment?(line) # # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#69 def end_of_line_comment(line); end @@ -2377,7 +2433,7 @@ module RuboCop::Cop::Alignment # @api private # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#74 + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#78 def register_offense(offense_node, message_node); end # @api public @@ -2490,21 +2546,20 @@ module RuboCop::Cop::AllowedMethods # @api public # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#21 + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#27 def allowed_methods; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#29 + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#35 def cop_config_allowed_methods; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#33 + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#39 def cop_config_deprecated_values; end - # @api public # @deprecated Use allowed_method? instead # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 - def ignored_method?(name); end + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#18 + def ignored_method?; end end # This module encapsulates the ability to ignore certain lines when @@ -2519,31 +2574,31 @@ module RuboCop::Cop::AllowedPattern # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 def allowed_line?(line); end - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#30 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#42 def allowed_patterns; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#46 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#58 def cop_config_deprecated_methods_values; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#40 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#52 def cop_config_patterns_values; end # @deprecated Use allowed_line? instead # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 - def ignored_line?(line); end + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#21 + def ignored_line?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#29 def matches_allowed_pattern?(line); end - # @deprecated Use matches_allowed_pattern?? instead + # @deprecated Use matches_allowed_pattern? instead # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 - def matches_ignored_pattern?(line); end + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#34 + def matches_ignored_pattern?; end end # This module encapsulates the ability to allow certain receivers in a cop. @@ -2580,85 +2635,83 @@ RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#6 class RuboCop::Cop::AnnotationComment - extend ::Forwardable - # @param comment [Parser::Source::Comment] # @param keywords [Array<String>] # @return [AnnotationComment] a new instance of AnnotationComment # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#13 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#11 def initialize(comment, keywords); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#19 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#17 def annotation?; end # Returns the range bounds for just the annotation # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#31 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#29 def bounds; end # Returns the value of attribute colon. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def colon; end # Returns the value of attribute comment. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def comment; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#21 def correct?(colon:); end # Returns the value of attribute keyword. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def keyword; end # Returns the value of attribute margin. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def margin; end # Returns the value of attribute note. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def note; end # Returns the value of attribute space. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def space; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#67 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#65 def just_keyword_of_sentence?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#63 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#61 def keyword_appearance?; end # Returns the value of attribute keywords. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#37 def keywords; end - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#53 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#51 def regex; end - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 def split_comment(comment); end end -# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#50 +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#48 RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) # Handles the `MinSize` configuration option for array-based cops @@ -2751,34 +2804,34 @@ module RuboCop::Cop::AutocorrectLogic private - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#46 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#51 def disable_offense(offense_range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#113 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#118 def disable_offense_at_end_of_line(range, eol_comment); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#117 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#122 def disable_offense_before_and_after(range_by_lines); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#56 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#61 def disable_offense_with_eol_or_surround_comment(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#109 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#114 def max_line_length; end # Expand the given range to include all of any lines it covers. Does not # include newline at end of the last line. # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#99 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#104 def range_by_lines(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#90 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#95 def range_of_first_line(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#67 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#72 def surrounding_heredoc(offense_range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#78 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#83 def surrounding_percent_array(offense_range); end end @@ -2891,18 +2944,18 @@ class RuboCop::Cop::Base # @return [Base] a new instance of Base # - # source://rubocop//lib/rubocop/cop/base.rb#129 + # source://rubocop//lib/rubocop/cop/base.rb#156 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#239 + # source://rubocop//lib/rubocop/cop/base.rb#272 def active_support_extensions_enabled?; end # Adds an offense that has no particular location. # No correction can be applied to global offenses # - # source://rubocop//lib/rubocop/cop/base.rb#162 + # source://rubocop//lib/rubocop/cop/base.rb#189 def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end # Adds an offense on the specified range (or node with an expression) @@ -2910,19 +2963,25 @@ class RuboCop::Cop::Base # to provide the cop the opportunity to autocorrect the offense. # If message is not specified, the method `message` will be called. # - # source://rubocop//lib/rubocop/cop/base.rb#172 + # source://rubocop//lib/rubocop/cop/base.rb#201 def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#347 + def always_autocorrect?; end + # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#295 + # source://rubocop//lib/rubocop/cop/base.rb#333 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#280 + # source://rubocop//lib/rubocop/cop/base.rb#318 def callbacks_needed; end # Returns the value of attribute config. @@ -2930,23 +2989,29 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#43 def config; end - # source://rubocop//lib/rubocop/cop/base.rb#223 + # source://rubocop//lib/rubocop/cop/base.rb#252 def config_to_allow_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#227 + # source://rubocop//lib/rubocop/cop/base.rb#256 def config_to_allow_offenses=(hash); end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#353 + def contextual_autocorrect?; end + # Configuration Helpers # - # source://rubocop//lib/rubocop/cop/base.rb#217 + # source://rubocop//lib/rubocop/cop/base.rb#246 def cop_config; end - # source://rubocop//lib/rubocop/cop/base.rb#209 + # source://rubocop//lib/rubocop/cop/base.rb#238 def cop_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#251 + # source://rubocop//lib/rubocop/cop/base.rb#289 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -2965,50 +3030,53 @@ class RuboCop::Cop::Base # ResultCache system when those external dependencies change, # ie when the ResultCache should be invalidated. # - # source://rubocop//lib/rubocop/cop/base.rb#205 + # source://rubocop//lib/rubocop/cop/base.rb#234 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#308 + # source://rubocop//lib/rubocop/cop/base.rb#357 def inspect; end # Gets called if no message is specified when calling `add_offense` or # `add_global_offense` # Cops are discouraged to override this; instead pass your message directly # - # source://rubocop//lib/rubocop/cop/base.rb#156 + # source://rubocop//lib/rubocop/cop/base.rb#183 def message(_range = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#209 + # source://rubocop//lib/rubocop/cop/base.rb#238 def name; end # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#271 + # source://rubocop//lib/rubocop/cop/base.rb#309 def offenses; end # Called after all on_... have been called # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#143 + # source://rubocop//lib/rubocop/cop/base.rb#170 def on_investigation_end; end # Called before all on_... have been called # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#137 + # source://rubocop//lib/rubocop/cop/base.rb#164 def on_new_investigation; end # Called instead of all on_... callbacks for unrecognized files / syntax errors # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#149 + # source://rubocop//lib/rubocop/cop/base.rb#176 def on_other_file; end # There should be very limited reasons for a Cop to do it's own parsing # - # source://rubocop//lib/rubocop/cop/base.rb#256 + # source://rubocop//lib/rubocop/cop/base.rb#294 def parse(source, path = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/base.rb#264 + def parser_engine; end + # Returns the value of attribute processed_source. # # source://rubocop//lib/rubocop/cop/base.rb#43 @@ -3018,107 +3086,111 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#262 + # source://rubocop//lib/rubocop/cop/base.rb#300 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#243 + # source://rubocop//lib/rubocop/cop/base.rb#280 def relevant_file?(file); end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#276 + def string_literals_frozen_by_default?; end + + # source://rubocop//lib/rubocop/cop/base.rb#268 def target_rails_version; end - # source://rubocop//lib/rubocop/cop/base.rb#231 + # source://rubocop//lib/rubocop/cop/base.rb#260 def target_ruby_version; end private - # source://rubocop//lib/rubocop/cop/base.rb#436 + # source://rubocop//lib/rubocop/cop/base.rb#475 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#320 + # source://rubocop//lib/rubocop/cop/base.rb#369 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#400 + # source://rubocop//lib/rubocop/cop/base.rb#439 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#316 + # source://rubocop//lib/rubocop/cop/base.rb#365 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#349 + # source://rubocop//lib/rubocop/cop/base.rb#398 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#374 + # source://rubocop//lib/rubocop/cop/base.rb#413 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#334 + # source://rubocop//lib/rubocop/cop/base.rb#383 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#326 + # source://rubocop//lib/rubocop/cop/base.rb#375 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#338 + # source://rubocop//lib/rubocop/cop/base.rb#387 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#330 + # source://rubocop//lib/rubocop/cop/base.rb#379 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#464 + # source://rubocop//lib/rubocop/cop/base.rb#503 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#460 + # source://rubocop//lib/rubocop/cop/base.rb#499 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#414 + # source://rubocop//lib/rubocop/cop/base.rb#453 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#450 + # source://rubocop//lib/rubocop/cop/base.rb#489 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#442 + # source://rubocop//lib/rubocop/cop/base.rb#481 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#432 + # source://rubocop//lib/rubocop/cop/base.rb#471 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#495 def find_severity(_range, severity); end - # This experimental feature has been under consideration for a while. - # - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#487 - def lsp_mode?; end - - # source://rubocop//lib/rubocop/cop/base.rb#477 + # source://rubocop//lib/rubocop/cop/base.rb#516 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#421 + # source://rubocop//lib/rubocop/cop/base.rb#460 def range_from_node_or_range(node_or_range); end - # source://rubocop//lib/rubocop/cop/base.rb#369 + # Actually private methods + # + # source://rubocop//lib/rubocop/cop/base.rb#408 def reset_investigation; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#524 + def target_satisfies_all_gem_version_requirements?; end + # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#389 + # source://rubocop//lib/rubocop/cop/base.rb#428 def use_corrector(range, corrector); end class << self @@ -3133,46 +3205,54 @@ class RuboCop::Cop::Base # Naming # - # source://rubocop//lib/rubocop/cop/base.rb#89 + # source://rubocop//lib/rubocop/cop/base.rb#93 def badge; end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#285 + # source://rubocop//lib/rubocop/cop/base.rb#323 def callbacks_needed; end - # source://rubocop//lib/rubocop/cop/base.rb#93 + # source://rubocop//lib/rubocop/cop/base.rb#97 def cop_name; end - # source://rubocop//lib/rubocop/cop/base.rb#97 + # source://rubocop//lib/rubocop/cop/base.rb#101 def department; end - # Cops (other than builtin) are encouraged to implement this + # Returns an url to view this cops documentation online. + # Requires 'DocumentationBaseURL' to be set for your department. + # Will follow the convention of RuboCops own documentation structure, + # overwrite this method to accommodate your custom layout. # # @api public # @return [String, nil] # - # source://rubocop//lib/rubocop/cop/base.rb#67 - def documentation_url; end + # source://rubocop//lib/rubocop/cop/base.rb#70 + def documentation_url(config = T.unsafe(nil)); end # Call for abstract Cop classes # - # source://rubocop//lib/rubocop/cop/base.rb#77 + # source://rubocop//lib/rubocop/cop/base.rb#81 def exclude_from_registry; end + # Returns the value of attribute gem_requirements. + # + # source://rubocop//lib/rubocop/cop/base.rb#138 + def gem_requirements; end + # @private # - # source://rubocop//lib/rubocop/cop/base.rb#71 + # source://rubocop//lib/rubocop/cop/base.rb#74 def inherited(subclass); end # Override and return the Force class(es) you need to join # - # source://rubocop//lib/rubocop/cop/base.rb#114 + # source://rubocop//lib/rubocop/cop/base.rb#118 def joining_forces; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#101 + # source://rubocop//lib/rubocop/cop/base.rb#105 def lint?; end # Returns true if the cop name or the cop namespace matches any of the @@ -3180,15 +3260,30 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#107 + # source://rubocop//lib/rubocop/cop/base.rb#111 def match?(given_names); end + # Register a version requirement for the given gem name. + # This cop will be skipped unless the target satisfies *all* requirements. + # + # @api public + # @param gem_name [String] + # @param version_requirements [Array<String>] The version requirements, + # using the same syntax as a Gemfile, e.g. ">= 1.2.3" + # + # If omitted, any version of the gem will be accepted. + # + # https://guides.rubygems.org/patterns/#declaring-dependencies + # + # source://rubocop//lib/rubocop/cop/base.rb#151 + def requires_gem(gem_name, *version_requirements); end + # Returns if class supports autocorrect. # It is recommended to extend AutoCorrector instead of overriding # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#83 + # source://rubocop//lib/rubocop/cop/base.rb#87 def support_autocorrect?; end # Override if your cop should be called repeatedly for multiple investigations @@ -3201,22 +3296,17 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#125 + # source://rubocop//lib/rubocop/cop/base.rb#129 def support_multiple_source?; end private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#360 - def builtin?; end - - # source://rubocop//lib/rubocop/cop/base.rb#342 + # source://rubocop//lib/rubocop/cop/base.rb#391 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#346 +# source://rubocop//lib/rubocop/cop/base.rb#395 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -3755,35 +3845,35 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#113 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#111 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#119 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#117 def forbidden_style?; end # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 - def message(range); end + def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#103 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#101 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#107 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#105 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#123 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#121 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#127 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#125 def version_specification?(expression); end end @@ -4105,6 +4195,9 @@ module RuboCop::Cop::CodeLength # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#45 def irrelevant_line(source_line); end + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#58 + def location(node); end + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#19 def max_length; end @@ -4777,7 +4870,7 @@ end # Handles `Max` configuration parameters, especially setting them to an # appropriate value with --auto-gen-config. # -# @deprecated Use `exclude_limit ParameterName` instead. +# @deprecated Use `exclude_limit <ParameterName>` instead. # # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#8 module RuboCop::Cop::ConfigurableMax @@ -4786,7 +4879,7 @@ module RuboCop::Cop::ConfigurableMax # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#11 def max=(value); end - # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#19 + # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#23 def max_parameter_name; end end @@ -4819,22 +4912,22 @@ RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) # # source://rubocop//lib/rubocop/cop/cop.rb#11 class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/cop.rb#53 + # source://rubocop//lib/rubocop/cop/cop.rb#65 def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/cop.rb#103 + # source://rubocop//lib/rubocop/cop/cop.rb#121 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @deprecated # - # source://rubocop//lib/rubocop/cop/cop.rb#82 + # source://rubocop//lib/rubocop/cop/cop.rb#97 def corrections; end - # source://rubocop//lib/rubocop/cop/cop.rb#70 + # source://rubocop//lib/rubocop/cop/cop.rb#82 def find_location(node, loc); end # Returns the value of attribute offenses. @@ -4844,53 +4937,53 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # Called after all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#96 + # source://rubocop//lib/rubocop/cop/cop.rb#114 def on_investigation_end; end # Called before all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#90 + # source://rubocop//lib/rubocop/cop/cop.rb#108 def on_new_investigation; end # @deprecated Use class method # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/cop.rb#76 + # source://rubocop//lib/rubocop/cop/cop.rb#88 def support_autocorrect?; end private - # source://rubocop//lib/rubocop/cop/cop.rb#121 + # source://rubocop//lib/rubocop/cop/cop.rb#139 def apply_correction(corrector); end # Override Base # - # source://rubocop//lib/rubocop/cop/cop.rb#117 + # source://rubocop//lib/rubocop/cop/cop.rb#135 def callback_argument(_range); end - # source://rubocop//lib/rubocop/cop/cop.rb#138 + # source://rubocop//lib/rubocop/cop/cop.rb#156 def correction_lambda; end - # source://rubocop//lib/rubocop/cop/cop.rb#144 + # source://rubocop//lib/rubocop/cop/cop.rb#162 def dedupe_on_node(node); end # Just for legacy # # @yield [corrector] # - # source://rubocop//lib/rubocop/cop/cop.rb#126 + # source://rubocop//lib/rubocop/cop/cop.rb#144 def emulate_v0_callsequence(corrector); end - # source://rubocop//lib/rubocop/cop/cop.rb#157 + # source://rubocop//lib/rubocop/cop/cop.rb#175 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/cop.rb#151 + # source://rubocop//lib/rubocop/cop/cop.rb#169 def suppress_clobbering; end class << self # @deprecated Use Registry.all # - # source://rubocop//lib/rubocop/cop/cop.rb#44 + # source://rubocop//lib/rubocop/cop/cop.rb#48 def all; end # source://rubocop//lib/rubocop/cop/cop.rb#29 @@ -4898,7 +4991,7 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # @deprecated Use Registry.qualified_cop_name # - # source://rubocop//lib/rubocop/cop/cop.rb#49 + # source://rubocop//lib/rubocop/cop/cop.rb#57 def qualified_cop_name(name, origin); end # @deprecated Use Registry.global @@ -5010,7 +5103,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.0.5/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.5.1/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5076,19 +5169,34 @@ module RuboCop::Cop::Documentation # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 + # source://rubocop//lib/rubocop/cop/documentation.rb#25 def base_url_for(cop_class, config); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#34 + # source://rubocop//lib/rubocop/cop/documentation.rb#57 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#47 def default_base_url; end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#10 def department_to_basename(department); end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#15 @@ -5097,19 +5205,35 @@ module RuboCop::Cop::Documentation class << self # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 + # source://rubocop//lib/rubocop/cop/documentation.rb#25 def base_url_for(cop_class, config); end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/documentation.rb#57 + def builtin?(cop_class); end + # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#34 + # source://rubocop//lib/rubocop/cop/documentation.rb#47 def default_base_url; end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#10 def department_to_basename(department); end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#15 @@ -5242,9 +5366,6 @@ class RuboCop::Cop::EachToForCorrector # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#36 def offending_range; end - - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#44 - def replacement_range(end_pos); end end # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#10 @@ -5400,45 +5521,39 @@ class RuboCop::Cop::ForToEachCorrector private - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#55 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#57 def collection_end; end # Returns the value of attribute collection_node. # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#23 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 def collection_node; end - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#29 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#31 def collection_source; end - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#27 def correction; end - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#43 - def end_position; end + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#45 + def end_range; end # Returns the value of attribute for_node. # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#23 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 def for_node; end - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#51 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#53 def keyword_begin; end - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#63 - def offending_range; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#67 - def replacement_range(end_pos); end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#37 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#39 def requires_parentheses?; end # Returns the value of attribute variable_node. # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#23 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 def variable_node; end end @@ -5451,37 +5566,53 @@ RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) class RuboCop::Cop::Force # @return [Force] a new instance of Force # - # source://rubocop//lib/rubocop/cop/force.rb#22 + # source://rubocop//lib/rubocop/cop/force.rb#32 def initialize(cops); end # Returns the value of attribute cops. # - # source://rubocop//lib/rubocop/cop/force.rb#7 + # source://rubocop//lib/rubocop/cop/force.rb#17 def cops; end - # source://rubocop//lib/rubocop/cop/force.rb#38 + # source://rubocop//lib/rubocop/cop/force.rb#50 def investigate(_processed_source); end - # source://rubocop//lib/rubocop/cop/force.rb#26 + # source://rubocop//lib/rubocop/cop/force.rb#36 def name; end - # source://rubocop//lib/rubocop/cop/force.rb#30 + # source://rubocop//lib/rubocop/cop/force.rb#40 def run_hook(method_name, *args); end class << self - # source://rubocop//lib/rubocop/cop/force.rb#9 + # source://rubocop//lib/rubocop/cop/force.rb#19 def all; end - # source://rubocop//lib/rubocop/cop/force.rb#18 + # source://rubocop//lib/rubocop/cop/force.rb#28 def force_name; end # @private # - # source://rubocop//lib/rubocop/cop/force.rb#13 + # source://rubocop//lib/rubocop/cop/force.rb#23 def inherited(subclass); end end end +# @api private +# +# source://rubocop//lib/rubocop/cop/force.rb#8 +class RuboCop::Cop::Force::HookError < ::StandardError + # @api private + # @return [HookError] a new instance of HookError + # + # source://rubocop//lib/rubocop/cop/force.rb#11 + def initialize(joining_cop); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/force.rb#9 + def joining_cop; end +end + # Common functionality for dealing with frozen string literals. # # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#6 @@ -5497,21 +5628,24 @@ module RuboCop::Cop::FrozenStringLiteral # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 def frozen_string_literal_comment_exists?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#66 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 def frozen_string_literal_specified?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#60 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#70 def frozen_string_literals_disabled?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#42 def frozen_string_literals_enabled?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#86 def leading_comment_lines; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#72 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#82 def leading_magic_comments; end + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#35 + def uninterpolated_heredoc?(node); end + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#31 def uninterpolated_string?(node); end @@ -5542,9 +5676,38 @@ module RuboCop::Cop::GemDeclaration def gem_declaration?(param0 = T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#5 +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#5 module RuboCop::Cop::Gemspec; end +# Prefer `add_dependency` over `add_runtime_dependency` as the latter is +# considered soft-deprecated. +# +# @example +# +# # bad +# Gem::Specification.new do |spec| +# spec.add_runtime_dependency('rubocop') +# end +# +# # good +# Gem::Specification.new do |spec| +# spec.add_dependency('rubocop') +# end +# +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#21 +class RuboCop::Cop::Gemspec::AddRuntimeDependency < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#28 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#24 +RuboCop::Cop::Gemspec::AddRuntimeDependency::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/gemspec/add_runtime_dependency.rb#26 +RuboCop::Cop::Gemspec::AddRuntimeDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Enforce that gem dependency version specifications or a commit reference (branch, # ref, or tag) are either required or forbidden. # @@ -5612,7 +5775,7 @@ class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#120 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#118 def add_dependency_method?(method_name); end # @return [Boolean] @@ -5625,40 +5788,40 @@ class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#134 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#132 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#140 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#138 def forbidden_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#114 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#112 def match_block_variable_name?(receiver_name); end # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#104 - def message(range); end + def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#124 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#122 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#128 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#126 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#144 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#142 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#148 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#146 def version_specification?(expression); end end @@ -5847,8 +6010,8 @@ RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsaf # # # good # Gem::Specification.new do |spec| -# spec.add_runtime_dependency('parallel', '~> 1.10') -# spec.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0') +# spec.add_dependency('parallel', '~> 1.10') +# spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0') # end # # source://rubocop//lib/rubocop/cop/gemspec/duplicated_assignment.rb#37 @@ -6111,7 +6274,7 @@ class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#78 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#82 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#84 def on_send(node); end # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#65 @@ -6121,13 +6284,13 @@ class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#94 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#96 def dynamic_version?(node); end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#100 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#102 def extract_ruby_version(required_ruby_version); end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#116 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#120 def not_equal_message(required_ruby_version, target_ruby_version); end end @@ -6151,15 +6314,15 @@ RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(ni # # bad # Gem::Specification.new do |spec| # if RUBY_VERSION >= '3.0' -# spec.add_runtime_dependency 'gem_a' +# spec.add_dependency 'gem_a' # else -# spec.add_runtime_dependency 'gem_b' +# spec.add_dependency 'gem_b' # end # end # # # good # Gem::Specification.new do |spec| -# spec.add_runtime_dependency 'gem_a' +# spec.add_dependency 'gem_a' # end # # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28 @@ -6544,40 +6707,45 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#125 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 def brackets?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#155 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#156 def breakdown_value_types_of_hash(hash_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#102 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 def def_node_that_require_parentheses(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#179 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#185 def each_omittable_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#175 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#181 def each_omitted_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#80 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 def enforced_shorthand_syntax; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#117 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#118 def find_ancestor_method_dispatch_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#171 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#74 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#75 def ignore_hash_shorthand_syntax?(pair_node); end # @return [Boolean] @@ -6587,18 +6755,18 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#140 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#141 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#149 def method_dispatch_as_argument?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#183 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#189 def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#205 def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 @@ -6606,22 +6774,22 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#84 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#85 def require_hash_value?(hash_key_source, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#94 def require_hash_value_for_around_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#129 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#130 def use_element_of_hash_literal_as_receiver?(ancestor, parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#134 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#135 def use_modifier_form_without_parenthesized_method_call?(ancestor); end end @@ -6634,12 +6802,12 @@ RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#209 +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#216 class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#218 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#225 def first_argument; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#222 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#229 def last_argument; end # Returns the value of attribute node @@ -6653,7 +6821,7 @@ class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct # @return [Object] the newly set value def node=(_); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#210 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#217 def selector; end class << self @@ -6958,7 +7126,7 @@ RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), # @deprecated IgnoredMethods class has been replaced with AllowedMethods. # -# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#40 +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#46 RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods # Handles adding and checking ignored nodes. @@ -6986,7 +7154,7 @@ end # @deprecated IgnoredPattern class has been replaced with AllowedPattern. # -# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#54 +# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#66 RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern # Common functionality for checking integer nodes. @@ -7363,7 +7531,7 @@ RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), St # right-hand-side of a multi-line assignment. # # The indentation of the remaining lines can be corrected with -# other cops such as `IndentationConsistency` and `EndAlignment`. +# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`. # # @example # # bad @@ -7378,7 +7546,7 @@ RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), St # 'bar' # end # -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#24 +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#25 class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::CheckAssignment include ::RuboCop::Cop::Alignment @@ -7386,17 +7554,17 @@ class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#42 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#43 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#33 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#34 def check_assignment(node, rhs); end - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#46 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#47 def leftmost_multiple_assignment(node); end end -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#29 +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#30 RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) # Checks whether the end keyword of `begin` is aligned properly. @@ -7471,7 +7639,7 @@ RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) # start of the line where the expression started. # # `either` (which is the default) : the `end` is allowed to be in either -# location. The autofixer will default to `start_of_line`. +# location. The autocorrect will default to `start_of_line`. # # @example EnforcedStyleAlignWith: either (default) # # bad @@ -7536,54 +7704,63 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#228 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#246 def add_space_before(corrector, loc, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#205 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#223 def alt_start_msg(start_loc, source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#155 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#145 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 def block_end_align_target(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#123 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#113 def check_block_alignment(start_node, block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#178 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#196 def compute_do_source_line_column(node, end_loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#220 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#238 def compute_start_col(ancestor_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#119 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#109 def disqualified_parent?(parent, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 def end_align_target?(node, parent); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#168 + # In offense message, we want to show the assignment LHS rather than + # the entire assignment. + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#191 + def find_lhs_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#162 def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#233 def format_source_line_column(source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 def loc_to_source_line_column(loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#136 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#126 def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#232 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#250 def remove_space_before(corrector, end_pos, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#172 def start_for_block_node(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#179 + def start_for_line_node(block_node); end end # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 @@ -8384,43 +8561,40 @@ RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # if # some_condition # do_something # end -# @example # # # good -# # if some_condition # do_something # end # -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#21 class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#31 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#27 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 def on_until(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#44 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#40 def check(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#58 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#54 def message(condition); end end -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#29 +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) # Checks whether the end keywords of method definitions are @@ -8698,35 +8872,35 @@ class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#131 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#133 def allow_border_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#135 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#137 def allow_margin_comment?; end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#97 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#127 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#129 def comment_text(comment); end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#108 def concat_consecutive_comments(comments); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#139 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#141 def current_token(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#117 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#119 def empty_comment_only?(comment_text); end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#85 def investigate(comments); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#143 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#145 def previous_token(node); end end @@ -8910,15 +9084,19 @@ class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base private + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#61 + def comments_before_code(source); end + # Find the last magic comment in the source file. # - # Take all comments that precede the first line of code, select the + # Take all comments that precede the first line of code (or just take + # them all in the case when there is no code), select the # magic comments, and return the last magic comment in the file. # # @return [Parser::Source::Comment] if magic comments exist before code # @return [nil] otherwise # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#54 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#55 def last_magic_comment(source); end # source://rubocop//lib/rubocop/cop/layout/empty_line_after_magic_comment.rb#43 @@ -9148,84 +9326,84 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#290 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#291 def allowance_range?; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#274 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#275 def autocorrect_insert_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#268 def autocorrect_remove_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#227 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#228 def blank_lines_count_between(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#171 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#172 def candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#192 def class_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#255 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#256 def def_end(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#163 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#164 def def_location(correction_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#247 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#248 def def_start(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#178 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#179 def empty_line_between_macros; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#259 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#260 def end_loc(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#205 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#206 def expected_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#223 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#224 def line_count_allowed?(count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#239 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#240 def lines_between_defs(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#183 def macro_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#235 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#236 def maximum_empty_lines; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#199 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#200 def message(node, count: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#188 def method_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#231 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#232 def minimum_empty_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#196 def module_candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#215 def multiple_blank_lines_groups?(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#281 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#282 def node_type(node); end class << self @@ -9919,22 +10097,24 @@ class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCo # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 def check_body(body, line_of_def_or_kwbegin); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#113 def keyword_locations(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#130 def keyword_locations_in_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#121 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#126 def keyword_locations_in_rescue(node); end + # @return [Boolean] + # # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 - def last_rescue_and_end_on_same_line(body); end + def last_body_and_end_on_same_line?(body); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#100 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#105 def message(location, keyword); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#109 def style; end end @@ -10051,7 +10231,9 @@ RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), St # This `Layout/EndAlignment` cop aligns with keywords (e.g. `if`, `while`, `case`) # by default. On the other hand, `Layout/BeginEndAlignment` cop aligns with # `EnforcedStyleAlignWith: start_of_line` by default due to `||= begin` tends -# to align with the start of the line. These style can be configured by each cop. +# to align with the start of the line. `Layout/DefEndAlignment` cop also aligns with +# `EnforcedStyleAlignWith: start_of_line` by default. +# These style can be configured by each cop. # # @example EnforcedStyleAlignWith: keyword (default) # # bad @@ -10102,7 +10284,7 @@ RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), St # if true # end # -# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#75 +# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#77 class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::CheckAssignment include ::RuboCop::Cop::ConfigurableEnforcedStyle @@ -10110,54 +10292,54 @@ class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::EndKeywordAlignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#109 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 def on_case(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#109 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 def on_case_match(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#81 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#83 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#97 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#99 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#93 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#95 def on_module(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#85 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#87 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#107 def on_until(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#101 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#103 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#165 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#167 def alignment_node(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#182 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#184 def alignment_node_for_variable_style(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#146 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#148 def asgn_variable_align_with(outer_node, inner_node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#200 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#202 def assignment_or_operator_method(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#120 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#122 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#135 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#137 def check_asgn_alignment(outer_node, inner_node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#124 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#126 def check_assignment(node, rhs); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#156 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#158 def check_other_alignment(node); end end @@ -10434,8 +10616,8 @@ RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), Strin # second_params # @example EnforcedStyle: special_for_inner_method_call # # The first argument should normally be indented one step more than -# # the preceding line, but if it's a argument for a method call that -# # is itself a argument in a method call, then the inner argument +# # the preceding line, but if it's an argument for a method call that +# # is itself an argument in a method call, then the inner argument # # should be indented relative to the inner method. # # # good @@ -10591,7 +10773,6 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # defined inside a method call. # # # bad -# # consistent # array = [ # :value # ] @@ -10611,68 +10792,66 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # brackets are indented to the same position. # # # bad -# # align_brackets # and_now_for_something = [ # :completely_different # ] # # # good -# # align_brackets # and_now_for_something = [ # :completely_different # ] # -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#85 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::MultilineElementIndentation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 def on_array(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#98 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#98 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#189 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#188 def array_alignment_config; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#109 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 def autocorrect(corrector, node); end # Returns the description of what the correct indentation is based on. # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#147 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#146 def base_description(indent_base_type); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#113 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 def brace_alignment_style; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#117 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#116 def check(array_node, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#131 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#130 def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#183 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#182 def enforce_first_argument_with_fixed_indentation?; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#160 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#159 def message(base_description); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#168 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#167 def message_for_right_bracket(indent_base_type); end end -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first element in a @@ -11671,7 +11850,7 @@ RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(ni # Checks the indentation of the here document bodies. The bodies # are indented one step. # -# Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), +# NOTE: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), # this cop does not add any offenses for long here documents to # avoid ``Layout/LineLength``'s offenses. # @@ -12661,29 +12840,29 @@ RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_IN # split across lines. These include arrays, hashes, and # method calls with argument lists. # -# If autocorrection is enabled, the following Layout cops +# If autocorrection is enabled, the following cops # are recommended to further format the broken lines. # (Many of these are enabled by default.) # -# * ArgumentAlignment -# * ArrayAlignment -# * BlockAlignment -# * BlockDelimiters -# * BlockEndNewline -# * ClosingParenthesisIndentation -# * FirstArgumentIndentation -# * FirstArrayElementIndentation -# * FirstHashElementIndentation -# * FirstParameterIndentation -# * HashAlignment -# * IndentationWidth -# * MultilineArrayLineBreaks -# * MultilineBlockLayout -# * MultilineHashBraceLayout -# * MultilineHashKeyLineBreaks -# * MultilineMethodArgumentLineBreaks -# * MultilineMethodParameterLineBreaks -# * ParameterAlignment +# * `Layout/ArgumentAlignment` +# * `Layout/ArrayAlignment` +# * `Layout/BlockAlignment` +# * `Layout/BlockEndNewline` +# * `Layout/ClosingParenthesisIndentation` +# * `Layout/FirstArgumentIndentation` +# * `Layout/FirstArrayElementIndentation` +# * `Layout/FirstHashElementIndentation` +# * `Layout/FirstParameterIndentation` +# * `Layout/HashAlignment` +# * `Layout/IndentationWidth` +# * `Layout/MultilineArrayLineBreaks` +# * `Layout/MultilineBlockLayout` +# * `Layout/MultilineHashBraceLayout` +# * `Layout/MultilineHashKeyLineBreaks` +# * `Layout/MultilineMethodArgumentLineBreaks` +# * `Layout/MultilineMethodParameterLineBreaks` +# * `Layout//ParameterAlignment` +# * `Style/BlockDelimiters` # # Together, these cops will pretty print hashes, arrays, # method calls, etc. For example, let's say the max columns @@ -14113,17 +14292,17 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#125 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 def comment_within?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#95 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 def configured_to_not_be_inspected?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#119 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#127 def convertible_block?(node); end # @return [Boolean] @@ -14133,10 +14312,10 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#91 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 def index_access_call_chained?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#147 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#155 def max_line_length; end # @return [Boolean] @@ -14146,7 +14325,7 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#102 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#110 def other_cop_takes_precedence?(node); end # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#79 @@ -14154,20 +14333,25 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#108 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#93 + def require_backslash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#116 def single_line_block_chain_enabled?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#112 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 def suitable_as_single_line?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#138 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#146 def to_single_line(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#141 def too_long?(node); end end @@ -15016,44 +15200,44 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#256 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#259 def align_hash_cop_config; end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#195 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#198 def autocorrect(corrector, range, right_operand); end # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 def check_operator(type, operator, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#209 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#212 def enclose_operator_with_space(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#236 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#239 def excess_leading_space?(type, operator, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#251 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254 def excess_trailing_space?(right_operand, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#274 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#277 def force_equal_sign_alignment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#260 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#263 def hash_table_style?; end # @yield [msg] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#190 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#193 def offense(type, operator, with_space, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#222 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#225 def offense_message(type, operator, with_space, right_operand); end # @return [Boolean] @@ -15068,17 +15252,17 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#278 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#281 def should_not_have_surrounding_space?(operator, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#264 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#267 def space_around_exponent_operator?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#268 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#271 def space_around_slash_operator?(right_operand); end class << self @@ -15143,35 +15327,38 @@ class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#124 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#133 def autocorrect(corrector, range); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#144 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#153 def block_delimiters_style; end # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#83 def check_empty(left_brace, space_plus_brace, used_style); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#100 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#109 def check_non_empty(left_brace, space_plus_brace, used_style); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#140 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#149 def conflict_with_block_delimiters?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#148 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#157 def empty_braces?(loc); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#115 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#101 + def handle_different_styles_for_empty_braces(used_style); end + + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#124 def space_detected(left_brace, space_plus_brace); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#108 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#117 def space_missing(left_brace); end - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#131 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#140 def style_for_empty_braces; end class << self @@ -16163,23 +16350,20 @@ class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Bas include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#31 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#30 def on_interpolation(begin_node); end private - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#47 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#46 def autocorrect(corrector, begin_node); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#57 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#56 def delimiters(begin_node); end end # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#28 -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::NO_SPACE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#29 -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::SPACE_MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) # Looks for trailing blank lines and a final newline in the # source code. @@ -16404,7 +16588,7 @@ class RuboCop::Cop::LineBreakCorrector # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#58 + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#60 def trailing_class_definition?(token, body); end end end @@ -16449,7 +16633,7 @@ module RuboCop::Cop::LineLengthHelp # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#32 def line_length(line); end - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#105 + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#110 def line_length_without_directive(line); end # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#51 @@ -16463,7 +16647,7 @@ module RuboCop::Cop::LineLengthHelp # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#98 + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#103 def valid_uri?(uri_ish_string); end end @@ -16532,7 +16716,6 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf # # # bad # some_method a { |val| puts val } -# @example # # # good # # With parentheses, there's no ambiguity. @@ -16565,38 +16748,38 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf # expect { do_something }.to change { object.attribute } # expect { do_something }.to not_change { object.attribute } # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#54 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#52 class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#85 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#83 def allowed_method_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#79 def ambiguous_block_association?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#91 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#89 def message(send_node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#97 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#95 def wrap_in_parentheses(corrector, node); end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#60 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#58 RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) # Checks for ambiguous operators in the first argument of a @@ -16609,51 +16792,50 @@ RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String # # The `*` is interpreted as a splat operator but it could possibly be # # a `*` method invocation (i.e. `do_something.*(some_array)`). # do_something *some_array -# @example # # # good # # # With parentheses, there's no ambiguity. # do_something(*some_array) # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#23 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#21 class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#45 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#43 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#62 def find_offense_node_by(diagnostic); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#82 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#80 def message(diagnostic); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#92 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#90 def offense_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#88 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#86 def offense_position?(node, diagnostic); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#101 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#99 def unary_operator?(node, diagnostic); end class << self - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#41 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#39 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#26 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#24 RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#36 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#34 RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) # Looks for expressions containing multiple binary operators @@ -16819,40 +17001,39 @@ RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) # # but it could possibly be `/` method invocations. # # (i.e. `do_something./(pattern)./(i)`) # do_something /pattern/i -# @example # # # good # # # With parentheses, there's no ambiguity. # do_something(/pattern/i) # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#24 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#22 class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#31 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#29 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#56 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#54 def find_offense_node(node, regexp_receiver); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#49 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#47 def find_offense_node_by(diagnostic); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#67 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#65 def first_argument_is_regexp?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#71 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#69 def method_chain_to_regexp_receiver?(node, regexp_receiver); end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#27 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#25 RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) # Checks for assignments in the conditions of @@ -16889,7 +17070,7 @@ class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::SafeAssignment extend ::RuboCop::Cop::AutoCorrector - # source://standard/1.34.0/lib/standard/rubocop/ext.rb#4 + # source://standard/1.41.1/lib/standard/rubocop/ext.rb#4 def message(_); end # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#55 @@ -17018,7 +17199,6 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni # # # good # true -# @example # # # bad # :false @@ -17026,23 +17206,23 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni # # good # false # -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#29 +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#27 class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#33 def boolean_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#37 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 def on_sym(node); end private - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#50 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#48 def autocorrect(corrector, node); end end -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#32 +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#30 RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) # Checks for circular argument references in optional keyword @@ -17053,54 +17233,45 @@ RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def bake(pie: pie) # pie.heat_up # end -# @example # # # good -# # def bake(pie:) # pie.refrigerate # end -# @example # # # good -# # def bake(pie: self.pie) # pie.feed_to(user) # end -# @example # # # bad -# # def cook(dry_ingredients = dry_ingredients) # dry_ingredients.reduce(&:+) # end -# @example # # # good -# # def cook(dry_ingredients = self.dry_ingredients) # dry_ingredients.combine # end # -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#37 class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#53 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#40 def on_kwoptarg(node); end - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#57 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#44 def on_optarg(node); end private - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#63 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 def check_for_circular_argument_references(arg_name, arg_value); end end -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#51 +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#38 RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) # Do not define constants within a block, since the block's scope does not @@ -17333,6 +17504,11 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # MyDebugger.debug_this # ---- # +# Some gems also ship files that will start a debugging session when required, +# for example `require 'debug/start'` from `ruby/debug`. These requires can +# be configured through `DebuggerRequires`. It has the same structure as +# `DebuggerMethods`, which you can read about above. +# # @example # # # bad (ok during development) @@ -17342,7 +17518,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # binding.pry # do_something # end -# @example # # # bad (ok during development) # @@ -17351,7 +17526,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # byebug # do_something # end -# @example # # # good # @@ -17365,43 +17539,56 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # def some_method # my_debugger # end +# @example DebuggerRequires: [my_debugger/start] +# +# # bad (ok during development) +# +# require 'my_debugger/start' # -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#67 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#74 class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#71 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#138 def assumed_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#96 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 def assumed_usage_context?(node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#106 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#127 def chained_method_name(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#104 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#83 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 def debugger_methods; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#110 + def debugger_require?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#97 + def debugger_requires; end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#86 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#69 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#76 RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#68 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#75 RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) # Checks for uses of the deprecated class method usages. @@ -17538,25 +17725,17 @@ RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), # # @example # -# # Example for OpenSSL::Cipher instantiation. -# # # bad # OpenSSL::Cipher::AES.new(128, :GCM) # # # good # OpenSSL::Cipher.new('aes-128-gcm') -# @example -# -# # Example for OpenSSL::Digest instantiation. # # # bad # OpenSSL::Digest::SHA256.new # # # good # OpenSSL::Digest.new('SHA256') -# @example -# -# # Example for ::Digest inherited class methods. # # # bad # OpenSSL::Digest::SHA256.digest('foo') @@ -17564,51 +17743,51 @@ RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), # # good # OpenSSL::Digest.digest('SHA256', 'foo') # -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#40 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#30 class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#39 def algorithm_const(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#59 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49 def digest_const?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#63 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#53 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#100 def algorithm_name(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#75 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#65 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#139 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#129 def build_cipher_arguments(node, algorithm_name, no_arguments); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#102 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#92 def correction_range(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#87 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#77 def message(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#106 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#96 def openssl_class(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#128 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#118 def replacement_args(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#120 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 def sanitize_arguments(arguments); end end -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#44 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#34 RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#46 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#36 RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) # Checks constructors for disjunctive assignments (`||=`) that should @@ -17805,17 +17984,14 @@ RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # case x # when 'first' # do_something # when 'first' # do_something_else # end -# @example # # # good -# # case x # when 'first' # do_something @@ -17823,13 +17999,13 @@ RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#30 +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#26 class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#33 + # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#29 def on_case(case_node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#31 +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#27 RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) # Checks that there are no repeated conditions used in if 'elsif'. @@ -17866,23 +18042,20 @@ RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # hash = { food: 'apple', food: 'orange' } -# @example # # # good -# # hash = { food: 'apple', other_food: 'orange' } # -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#22 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#18 class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base include ::RuboCop::Cop::Duplication - # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#27 + # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#23 def on_hash(node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#25 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21 RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) # Checks for duplicated magic comments. @@ -18034,7 +18207,6 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def foo # 1 # end @@ -18042,19 +18214,15 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # def foo # 2 # end -# @example # # # bad -# # def foo # 1 # end # # alias foo bar -# @example # # # good -# # def foo # 1 # end @@ -18062,98 +18230,96 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # def bar # 2 # end -# @example # # # good -# # def foo # 1 # end # # alias bar foo # -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#52 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#42 class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base # @return [DuplicateMethods] a new instance of DuplicateMethods # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#57 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#47 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#98 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#88 def alias_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#85 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#75 def method_alias?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#89 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#79 def on_alias(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#63 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#72 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#62 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#104 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#94 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#103 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#93 def sym_name(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#117 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#107 def check_const_receiver(node, name, const_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#124 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#114 def check_self_receiver(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#198 def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#136 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#126 def found_instance_method(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#159 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 def found_method(node, method_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#139 def found_sclass_method(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#186 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#176 def location(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#218 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 def lookup_constant(node, const_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#131 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#121 def message_for_dup(node, method_name, key); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#178 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#168 def method_key(node, method_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#194 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#184 def on_attr(node, attr_name, args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#240 def possible_dsl?(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#236 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#226 def qualified_name(enclosing, namespace, mod_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#260 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 def source_location(node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#55 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#45 RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#43 RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#54 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#44 RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for duplicate elements in Regexp character classes. @@ -18310,31 +18476,28 @@ RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # sum = numbers.each_with_object(0) { |e, a| a += e } -# @example # # # good -# # num = 0 # sum = numbers.each_with_object(num) { |e, a| a += e } # -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#24 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#20 class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 def each_with_object?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 def on_send(node); end end -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#21 RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#26 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#22 RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for odd `else` block layout - like @@ -18354,7 +18517,6 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni # else do_this # do_that # end -# @example # # # good # @@ -18374,28 +18536,28 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni # do_that # end # -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#43 +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#41 class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#50 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#81 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#79 def autocorrect(corrector, node, first_else); end - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#61 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#59 def check(node); end - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#71 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#69 def check_else(node); end end -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#46 RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) # Checks for blocks without a body. @@ -18619,104 +18781,100 @@ class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#70 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#71 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#156 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#177 def all_branches_body_missing?(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#83 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#95 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#142 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#163 def branch_range(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#104 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#125 def correct_other_branches(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#162 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#183 def deletion_range(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#158 def else_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#131 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#152 def empty_elsif_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#123 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#144 def empty_if_branch?(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#89 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#87 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#101 def remove_comments(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#96 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#109 def remove_empty_branch(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#116 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 def require_other_branches_correction?(node); end end # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#68 RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) -# Checks for empty `ensure` blocks +# Checks for empty `ensure` blocks. # # @example # # # bad -# # def some_method # do_something # ensure # end -# @example # # # bad -# # begin # do_something # ensure # end -# @example # # # good -# # def some_method # do_something # ensure # do_something_else # end -# @example # # # good -# # begin # do_something # ensure # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#45 +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#35 class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#50 + # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#40 def on_ensure(node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#48 +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#38 RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of empty expressions. @@ -18851,24 +19009,21 @@ RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # "result is #{}" -# @example # # # good -# # "result is #{some_result}" # -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#15 class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#25 + # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#21 def on_interpolation(begin_node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#23 +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of `when` branches without a body. @@ -18881,7 +19036,6 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # do_something # when baz # end -# @example # # # good # case condition @@ -18909,15 +19063,15 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # # do nothing # end # -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#47 +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#45 class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp - # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#52 + # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 def on_case(node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#48 RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # Checks for `return` from an `ensure` block. @@ -18930,17 +19084,14 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def foo # do_something # ensure # cleanup # return self # end -# @example # # # good -# # def foo # do_something # self @@ -18948,8 +19099,7 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # cleanup # end # -# # also good -# +# # good # def foo # begin # do_something @@ -18961,16 +19111,16 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # cleanup # end # -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#47 +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#42 class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#53 + # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#48 def on_ensure(node); end end -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51 +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#46 RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warnings in Ruby 2.6. @@ -19034,36 +19184,45 @@ class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#83 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#81 def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#88 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#86 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#153 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#160 def arguments_range(node); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#108 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#115 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#123 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#130 def build_kwargs(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#119 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#126 def correct_arguments?(arguments); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#140 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#104 + def message(positional_argument_index, arg_value); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#147 def override_by_legacy_args(kwargs, node); end end +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#74 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_EOUTVAR = T.let(T.unsafe(nil), String) + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68 -RuboCop::Cop::Lint::ErbNewArguments::MESSAGES = T.let(T.unsafe(nil), Array) +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_SAFE_LEVEL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#71 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_TRIM_MODE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#80 +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#78 RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Looks for uses of flip-flop operator @@ -19173,21 +19332,18 @@ RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # # bad -# # float = 3.0e400 -# @example # # # good -# # float = 42.9 # -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#21 +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#17 class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#24 + # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#20 def on_float(node); end end -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#22 +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#18 RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # This lint sees if there is a mismatch between the number of @@ -19201,138 +19357,131 @@ RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # format('A value: %s and another: %i', a_value) -# @example # # # good -# # format('A value: %s and another: %i', a_value, another) -# @example # # # bad -# # format('Unnumbered format: %s and numbered: %2$s', a_value, another) -# @example # # # good -# # format('Numbered format: %1$s and numbered %2$s', a_value, another) # -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#27 class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#90 def called_on_string?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#49 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#137 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#127 def count_format_matches(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 def count_matches(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#141 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#131 def count_percent_matches(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#129 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 def countable_format?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#133 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#123 def countable_percent?(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#153 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#143 def expected_fields_count(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#168 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#158 def format?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#146 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#136 def format_method?(name, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#64 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#54 def format_string?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#115 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 def heredoc?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#68 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#58 def invalid_format_string?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#91 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#81 def matched_arguments_count?(expected, passed); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#186 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#95 def method_with_format_args?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#77 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#67 def offending_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#166 def percent?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#99 def splat_args?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#172 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#162 def sprintf?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#195 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#185 def string_type?(node); end end -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#44 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#34 RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) # http://rubular.com/r/CvpbxkcTzy # -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#29 RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#41 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#31 RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#47 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#45 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#35 RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#46 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#36 RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) # Prefer using `Hash#compare_by_identity` rather than using `object_id` @@ -19512,12 +19661,9 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # @example # # # bad -# # array = ['Item 1' 'Item 2'] -# @example # # # good -# # array = ['Item 1Item 2'] # array = ['Item 1' + 'Item 2'] # array = [ @@ -19525,43 +19671,45 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # 'Item 2' # ] # -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#25 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#21 class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#33 + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 def on_dstr(node); end private - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#83 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 def display_str(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#50 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#53 def each_bad_cons(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#65 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#68 def ending_delimiter(str); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#91 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#94 def str_content(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#75 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#78 def string_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#79 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 def string_literals?(node1, node2); end end -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#24 RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) # Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. @@ -19623,7 +19771,6 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # @example # # # bad -# # class C # private # @@ -19631,10 +19778,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # puts 'hi' # end # end -# @example # # # good -# # class C # def self.method # puts 'hi' @@ -19642,10 +19787,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # # private_class_method :method # end -# @example # # # good -# # class C # class << self # private @@ -19656,49 +19799,49 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # end # end # -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#41 class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 def on_class(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 def on_module(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#55 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 def private_class_methods(param0); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#109 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#102 def access_modifier?(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#66 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 def check_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#113 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#106 def correct_visibility?(node, modifier, ignored_methods); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#78 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#71 def format_message(modifier); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#91 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#84 def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#74 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#67 def private_class_method_names(node); end end -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#51 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#44 RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#45 RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#49 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#42 RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) # Looks for error classes inheriting from `Exception`. @@ -19777,33 +19920,30 @@ RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # @example # # # bad -# # foo = 'something with #{interpolation} inside' -# @example # # # good -# # foo = "something with #{interpolation} inside" # -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#25 +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#21 class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#31 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#27 def on_str(node); end private - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#42 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#38 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#53 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#49 def heredoc?(node); end end -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#24 RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warning in Ruby 3.3. @@ -20046,84 +20186,81 @@ RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), Str # @example # # # bad -# # "result is #{10}" -# @example # # # good -# # "result is 10" # -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#19 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#15 class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#28 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#24 def on_interpolation(begin_node); end private - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#62 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#58 def autocorrected_value(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#108 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#104 def autocorrected_value_for_array(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#114 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#110 def autocorrected_value_for_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#84 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#80 def autocorrected_value_for_string(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#92 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#88 def autocorrected_value_for_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#125 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121 def autocorrected_value_in_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#99 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#95 def autocorrected_value_in_hash_for_symbol(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#155 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 def ends_heredoc_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#163 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#159 def in_array_percent_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#48 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#44 def offending?(node); end # Does node print its own source when converted to a string? # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#146 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#142 def prints_as_self?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#147 def space_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#56 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#52 def special_keyword?(node); end end -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#26 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#22 RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#21 RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # Checks for uses of `begin...end while/until something`. @@ -20136,15 +20273,6 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # begin # do_something # end while some_condition -# @example -# -# # bad -# -# # using until -# begin -# do_something -# end until some_condition -# @example # # # good # @@ -20153,7 +20281,13 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # do_something # break unless some_condition # end -# @example +# +# # bad +# +# # using until +# begin +# do_something +# end until some_condition # # # good # @@ -20163,29 +20297,29 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # break if some_condition # end # -# source://rubocop//lib/rubocop/cop/lint/loop.rb#50 +# source://rubocop//lib/rubocop/cop/lint/loop.rb#44 class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#53 def on_until_post(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#55 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#49 def on_while_post(node); end private - # source://rubocop//lib/rubocop/cop/lint/loop.rb#79 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#73 def build_break_line(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#75 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#69 def keyword_and_condition_range(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#65 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 def register_offense(node); end end -# source://rubocop//lib/rubocop/cop/lint/loop.rb#53 +# source://rubocop//lib/rubocop/cop/lint/loop.rb#47 RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) # cop disables on wide ranges of code, that latter contributors to @@ -20416,7 +20550,7 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#56 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#58 def each_unsafe_regexp_range(node); end # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 @@ -20430,31 +20564,31 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#72 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#74 def build_source_range(range_start, range_end); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#76 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#78 def range_for(char); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#82 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#84 def range_pairs(expr); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#102 - def rewrite_regexp_range(source); end + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#104 + def regexp_range(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#92 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#94 def skip_expression?(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#96 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#98 def skip_range?(range_start, range_end); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#86 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#88 def unsafe_range?(range_start, range_end); end end @@ -20531,15 +20665,17 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # Checks for nested method definitions. # -# @example AllowedPatterns: ['baz'] -# # good -# def foo(obj) -# obj.do_baz do +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo # def bar # end # end -# end -# @example # # # good # @@ -20547,7 +20683,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # bar = -> { puts 'hello' } # bar.call # end -# @example # # # good # @@ -20567,7 +20702,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example # # # good # @@ -20601,49 +20735,46 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example -# -# # bad -# -# # `bar` definition actually produces methods in the same scope -# # as the outer `foo` method. Furthermore, the `bar` method -# # will be redefined every time `foo` is invoked. -# def foo +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do # def bar # end # end +# end # -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#91 class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#133 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#127 def eval_call?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#138 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#132 def exec_call?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#126 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#120 def allowed_method_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#121 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#115 def scoping_method_call?(child); end end -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#101 +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#95 RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) # Checks for nested percent literals. @@ -20709,38 +20840,35 @@ RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) # @example # # # bad -# # result = (1..4).reduce(0) do |acc, i| # next if i.odd? # acc + i # end -# @example # # # good -# # result = (1..4).reduce(0) do |acc, i| # next acc if i.odd? # acc + i # end # -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#25 +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#21 class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#42 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38 def on_block_body_of_reduce(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#49 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#45 def parent_block_node(node); end end -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#26 +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#22 RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of a `return` inside a `begin..end` block @@ -20751,16 +20879,13 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # @some_variable ||= begin # return some_value if some_condition_is_met # # do_something # end -# @example # # # good -# # @some_variable ||= begin # if some_condition_is_met # some_value @@ -20770,7 +20895,6 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # end # # # good -# # some_variable = if some_condition_is_met # return if another_condition_is_met # @@ -20779,19 +20903,19 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # do_something # end # -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#43 +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#38 class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_op_asgn(node); end - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_or_asgn(node); end end -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#44 +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#39 RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) # Checks for non-atomic file operation. @@ -21479,44 +21603,41 @@ RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), S # @example # # # bad -# # %w('foo', "bar") -# @example # # # good -# # %w(foo bar) # -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#29 class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#40 def on_array(node); end - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#48 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 def on_percent_literal(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#65 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#61 def contains_quotes_or_commas?(node); end end -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#38 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#34 RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#41 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#39 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#35 RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) # Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` @@ -21528,43 +21649,40 @@ RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Re # @example # # # bad -# # %i(:foo, :bar) -# @example # # # good -# # %i(foo bar) # -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#19 class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#26 def on_array(node); end - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#34 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 def on_percent_literal(node); end private - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#42 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#38 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#52 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#48 def contains_colons_or_commas?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#62 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#58 def non_alphanumeric_literal?(literal); end end -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#27 +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) # Checks for `raise` or `fail` statements which are @@ -21630,35 +21748,32 @@ RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # @example # # # bad -# # rand 1 # Kernel.rand(-1) # rand 1.0 # rand(-1.0) -# @example # # # good -# # 0 # just use 0 instead # -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#23 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#19 class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#32 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 def rand_one?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#40 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#36 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#20 RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#25 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#21 RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # removed without causing any offenses to be reported. It's implemented @@ -21839,13 +21954,14 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.le # that cop checks whether any cop was actually enabled. # # @example +# # # bad # foo = 1 # # rubocop:enable Layout/LineLength # # # good # foo = 1 -# @example +# # # bad # # rubocop:disable Style/StringLiterals # foo = "1" @@ -21859,54 +21975,54 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.le # # rubocop:enable all # baz # -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#37 +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#39 class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::SurroundingSpace extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#46 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#120 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#122 def all_or_name(name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#76 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#78 def comment_start(comment); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#80 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#82 def cop_name_indention(comment, name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#124 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#126 def department?(directive, name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#71 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#73 def range_of_offense(comment, name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#95 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#97 def range_to_remove(begin_pos, end_pos, comment); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#84 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#86 def range_with_comma(comment, name); end # If the list of cops is comma-separated, but without a empty space after the comma, # we should **not** remove the prepending empty space, thus begin_pos += 1 # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#114 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#116 def range_with_comma_after(comment, start, begin_pos, end_pos); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#108 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#110 def range_with_comma_before(start, begin_pos, end_pos); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#53 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#55 def register_offense(comment, cop_names); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#42 +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) # Sort globbed results by default in Ruby 3.0. @@ -22096,7 +22212,8 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # Checks for redundant safe navigation calls. # Use cases where a constant, named in camel case for classes and modules is `nil` are rare, -# and an offense is not detected when the receiver is a snake case constant. +# and an offense is not detected when the receiver is a constant. The detection also applies +# to literal receivers, except for `nil`. # # For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, # and `equal?` methods are checked by default. @@ -22159,10 +22276,9 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # do_something if attrs.nil_safe_method(:[]) # do_something if attrs&.not_nil_safe_method(:[]) # -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#77 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#78 class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#95 @@ -22181,12 +22297,17 @@ class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#134 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#133 + def assume_receiver_instance_exists?(receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#139 def check?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#144 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#149 def condition?(parent, node); end end @@ -22202,7 +22323,7 @@ RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsa # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) -# Checks for unneeded usages of splat expansion +# Checks for unneeded usages of splat expansion. # # @example # @@ -22355,47 +22476,44 @@ RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), St # @example # # # bad -# # "result is #{something.to_s}" # print something.to_s # puts something.to_s # warn something.to_s -# @example # # # good -# # "result is #{something}" # print something # puts something # warn something # -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#23 class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#38 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#34 def on_interpolation(begin_node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#46 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#42 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#36 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 def to_s_without_args?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#58 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#54 def register_offense(node, context); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#31 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#28 RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#33 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#29 RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for redundant `with_index`. @@ -22426,21 +22544,21 @@ class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#36 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#36 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#56 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#60 def redundant_with_index?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#66 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#70 def message(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#74 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78 def with_index_range(send); end end @@ -22575,38 +22693,35 @@ RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # if day.is? :tuesday && month == :jan # # ... # end -# @example # # # good -# # if day.is?(:tuesday) && month == :jan # # ... # end # -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#30 +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#26 class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#58 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#54 def check_predicate(predicate, node); end - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#48 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#44 def check_ternary(ternary, node); end end -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#33 +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#29 RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) # Checks that a range literal is enclosed in parentheses when the end of the range is @@ -22700,34 +22815,31 @@ RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(n # @example # # # bad -# # begin # do_something # rescue Exception # handle_exception # end -# @example # # # good -# # begin # do_something # rescue ArgumentError # handle_exception # end # -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#27 +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#23 class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#30 + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#26 def on_resbody(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#39 + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#35 def targets_exception?(rescue_arg_node); end end -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#28 +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#24 RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) # Check for arguments to `rescue` that will result in a `TypeError` @@ -22774,13 +22886,13 @@ class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#71 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#69 def correction(*exceptions); end - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#82 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#80 def invalid_exceptions(exceptions); end - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#78 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#76 def valid_exceptions(exceptions); end end @@ -22805,7 +22917,6 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) # def foo=(bar) # return 42 # end -# @example # # # good # def initialize @@ -22818,18 +22929,18 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) # return # end # -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#34 +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#32 class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#37 + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 def on_return(return_node); end private - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#53 + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#51 def non_void_context(return_node); end end -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#33 RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) # The safe navigation operator returns nil if the receiver is @@ -22841,28 +22952,25 @@ RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # x&.foo.bar # x&.foo + bar # x&.foo[bar] -# @example # # # good -# # x&.foo&.bar # x&.foo || bar # -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#26 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#22 class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::NilMethods extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#37 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 def bad_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#44 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#40 def on_send(node); end private @@ -22871,31 +22979,31 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # @param send_node [RuboCop::AST::SendNode] # @return [String] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#58 def add_safe_navigation_operator(offense_range:, send_node:); end # @param corrector [RuboCop::Cop::Corrector] # @param offense_range [Parser::Source::Range] # @param send_node [RuboCop::AST::SendNode] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#77 def autocorrect(corrector, offense_range:, send_node:); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#86 def brackets?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 def require_parentheses?(send_node); end end -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#29 RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#34 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#30 RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) # Check to make sure that if safe navigation is used for a method @@ -23018,7 +23126,7 @@ class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base private # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#55 - def autocorrect(comment); end + def autocorrect; end # @return [Boolean] # @@ -23398,17 +23506,16 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # because `Ractor` should not access outer variables. # eg. following style is encouraged: # -# [source,ruby] -# ---- -# worker_id, pipe = env -# Ractor.new(worker_id, pipe) do |worker_id, pipe| -# end -# ---- +# [source,ruby] +# ---- +# worker_id, pipe = env +# Ractor.new(worker_id, pipe) do |worker_id, pipe| +# end +# ---- # # @example # # # bad -# # def some_method # foo = 1 # @@ -23416,10 +23523,8 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # do_something(foo) # end # end -# @example # # # good -# # def some_method # foo = 1 # @@ -23428,37 +23533,37 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#41 class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#57 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 def before_declaring_variable(variable, variable_table); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#89 def find_conditional_node_from_ascendant(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#96 def node_or_its_ascendant_conditional?(node); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 def ractor_block?(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#69 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#65 def same_conditions_node_different_branch?(variable, outer_local_variable); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#83 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#79 def variable_node(variable); end class << self - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#46 +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#42 RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) # Checks unexpected overrides of the `Struct` built-in methods @@ -23795,12 +23900,12 @@ class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#78 + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#76 def argument_match?(send_arg, def_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#63 + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#61 def arguments_match?(arguments, def_node); end end @@ -24109,27 +24214,24 @@ RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # 1.is_a?(Fixnum) # 1.is_a?(Bignum) -# @example # # # good -# # 1.is_a?(Integer) # -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#20 +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#16 class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#22 def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#30 + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 def on_const(node); end end -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#23 +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#19 RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) # Looks for `reduce` or `inject` blocks where the value returned (implicitly or @@ -24224,31 +24326,31 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#190 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#191 def acceptable_return?(return_val, element_name); end # Exclude `begin` nodes inside a `dstr` from being collected by `return_values` # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#198 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#199 def allowed_type?(parent_node); end - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#158 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#159 def block_arg_name(node, index); end - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#141 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#142 def check_return_values(block_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#175 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#176 def potential_offense?(return_values, block_body, element_name, accumulator_name); end # Return values in a block are either the value given to next, # the last line of a multiline block, or the only line of the block # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#127 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#128 def return_values(block_body_node); end # Look for an index of the accumulator being returned, except where the index @@ -24256,7 +24358,7 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # This is always an offense, in order to try to catch potential exceptions # due to type mismatches # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#166 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#167 def returned_accumulator_index(return_values, accumulator_name, element_name); end # If the accumulator is used in any return value, the node is acceptable since @@ -24264,7 +24366,7 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#182 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#183 def returns_accumulator_anywhere?(return_values, accumulator_name); end end @@ -24281,14 +24383,12 @@ RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil) # @example # # # bad -# # def some_method # return # do_something # end # # # bad -# # def some_method # if cond # return @@ -24297,40 +24397,38 @@ RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil) # end # do_something # end -# @example # # # good -# # def some_method # do_something # end # -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#37 +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#32 class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#55 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#50 def flow_command?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 def on_kwbegin(node); end private - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#87 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#82 def check_case(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#81 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#76 def check_if(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#65 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#60 def flow_expression?(node); end end -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#38 +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#33 RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) # Checks for loops that will have at most one iteration. @@ -24459,7 +24557,7 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#194 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#200 def conditional_continue_keyword?(break_statement); end # @return [Boolean] @@ -24469,7 +24567,7 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#184 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#190 def preceded_by_continue_statement?(break_statement); end # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#130 @@ -24995,103 +25093,105 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # reassignments and properly handles varied cases such as branch, loop, # rescue, ensure, etc. # +# This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from +# operator assignment can cause NameError if this assignment has been used to declare +# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause +# "undefined local variable or method `a' for main:Object (NameError)". +# # NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables # can lead to a syntax error, so this case is not autocorrected. # # @example # # # bad -# # def some_method # some_var = 1 # do_something # end -# @example # # # good -# # def some_method # some_var = 1 # do_something(some_var) # end # -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#40 class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#51 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165 def autocorrect(corrector, assignment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#106 def chained_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 def check_for_unused_assignments(variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#149 def collect_variable_like_names(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#82 def message_for_useless_assignment(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#110 def message_specification(assignment, variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#120 def multiple_assignment_message(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#88 def offense_range(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125 def operator_assignment_message(scope, assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#182 def remove_exception_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#206 def remove_local_variable_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#195 def remove_trailing_character_from_operator(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#191 def rename_variable_with_underscore(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#199 def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end # TODO: More precise handling (rescue, ensure, nested begin, etc.) # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#139 def return_value_node_of_scope(scope); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#96 def sequential_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132 def similar_name_message(variable); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158 def variable_like_method_invocation?(node); end class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#47 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless `else` in `begin..end` without `rescue`. @@ -25101,16 +25201,13 @@ RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # begin # do_something # else # do_something_else # This will never be run. # end -# @example # # # good -# # begin # do_something # rescue @@ -25119,13 +25216,13 @@ RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#31 +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#27 class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#34 + # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#30 def on_new_investigation; end end -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#32 +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#28 RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) # Checks for useless method definitions, specifically: empty constructors @@ -25187,6 +25284,62 @@ end # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) +# Certain numeric operations have no impact, being: +# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. +# These are probably leftover from debugging, or are mistakes. +# +# @example +# +# # bad +# x + 0 +# x - 0 +# x * 1 +# x / 1 +# x ** 1 +# +# # good +# x +# +# # bad +# x += 0 +# x -= 0 +# x *= 1 +# x /= 1 +# x **= 1 +# +# # good +# x = x +# +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#32 +class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#54 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#41 + def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#38 + def useless_operation?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#67 + def useless?(operation, number); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#34 +RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#35 +RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for useless `rescue`s, which only reraise rescued exceptions. # # @example @@ -25353,83 +25506,80 @@ RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # @example # # # bad -# # def something # x = Something.new # x.attr = 5 # end -# @example # # # good -# # def something # x = Something.new # x.attr = 5 # x # end # -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#31 class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#59 def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#67 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 def last_expression(body); end end -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#39 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#38 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#34 RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) # This class tracks variable assignments in a method body # and if a variable contains object passed as argument at the end of # the method. # -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#76 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#72 class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker # @return [MethodVariableTracker] a new instance of MethodVariableTracker # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#77 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#73 def initialize(body_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#163 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#159 def constructor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#82 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#78 def contain_local_object?(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#152 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148 def process_assignment(asgn_node, rhs_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#100 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#96 def process_assignment_node(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#142 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#138 def process_binary_operator_assignment(op_asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#133 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#129 def process_logical_operator_assignment(asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#114 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#110 def process_multiple_assignment(masgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#92 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#88 def scan(node, &block); end end @@ -25551,61 +25701,77 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 + # source://rubocop//lib/rubocop/cop/lint/void.rb#95 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/void.rb#212 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#258 + def all_keys_entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#262 + def all_values_entirely_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#236 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#208 + # source://rubocop//lib/rubocop/cop/lint/void.rb#230 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#196 + # source://rubocop//lib/rubocop/cop/lint/void.rb#218 def autocorrect_void_op(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#99 + # source://rubocop//lib/rubocop/cop/lint/void.rb#101 def check_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#108 + # source://rubocop//lib/rubocop/cop/lint/void.rb#198 + def check_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#115 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#146 + # source://rubocop//lib/rubocop/cop/lint/void.rb#156 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + # source://rubocop//lib/rubocop/cop/lint/void.rb#180 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#154 + # source://rubocop//lib/rubocop/cop/lint/void.rb#164 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#128 + # source://rubocop//lib/rubocop/cop/lint/void.rb#138 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#162 + # source://rubocop//lib/rubocop/cop/lint/void.rb#172 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#118 + # source://rubocop//lib/rubocop/cop/lint/void.rb#127 def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#221 + # source://rubocop//lib/rubocop/cop/lint/void.rb#245 def entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#188 + # source://rubocop//lib/rubocop/cop/lint/void.rb#211 def in_void_context?(node); end end @@ -25621,13 +25787,13 @@ RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/void.rb#61 RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#77 +# source://rubocop//lib/rubocop/cop/lint/void.rb#76 RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#79 +# source://rubocop//lib/rubocop/cop/lint/void.rb#78 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#70 +# source://rubocop//lib/rubocop/cop/lint/void.rb#69 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/void.rb#64 @@ -25648,9 +25814,6 @@ RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/void.rb#59 RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#69 -RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) - # Common functionality for obtaining source ranges from regexp matches # # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 @@ -25832,6 +25995,11 @@ module RuboCop::Cop::MethodComplexity # # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#61 def complexity(body); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#73 + def location(node); end end # Common code for cops that deal with preferred methods. @@ -25908,8 +26076,9 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # The cop can be configured to ignore blocks passed to certain methods. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: This cop does not apply for `Struct` definitions. # @@ -25917,7 +26086,7 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` # instead. By default, there are no methods to allowed. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # something do # array = [ # +1 @@ -25925,7 +26094,7 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # 2 # ] # -# hash = { # +3 +# hash = { # +1 # key: 'value' # } # @@ -25938,40 +26107,40 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#44 +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#45 class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_block(node); end - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#80 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#81 def cop_label; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#62 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#63 def method_receiver_excluded?(node); end end -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49 +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#50 RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) -# Checks for excessive nesting of conditional and looping -# constructs. +# Checks for excessive nesting of conditional and looping constructs. # -# You can configure if blocks are considered using the `CountBlocks` -# option. When set to `false` (the default) blocks are not counted -# towards the nesting level. Set to `true` to count blocks as well. +# You can configure if blocks are considered using the `CountBlocks` and `CountModifierForms` +# options. When both are set to `false` (the default) blocks and modifier forms are not +# counted towards the nesting level. Set them to `true` to include these in the nesting level +# calculation as well. # # The maximum level of nesting allowed is configurable. # @@ -25990,15 +26159,25 @@ class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#52 def consider_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#54 + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#62 def count_blocks?; end - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#50 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 + def count_if_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#66 + def count_modifier_forms?; end + + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#58 def message(max); end end @@ -26010,12 +26189,13 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: This cop also applies for `Struct` definitions. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # class Foo # ARRAY = [ # +1 @@ -26023,7 +26203,7 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # 2 # ] # -# HASH = { # +3 +# HASH = { # +1 # key: 'value' # } # @@ -26036,24 +26216,24 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#39 +# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#40 class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#52 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#53 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#43 def on_class(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 def on_sclass(node); end private - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#70 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#71 def message(length, max_length); end end @@ -26184,15 +26364,16 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is # deprecated and only kept for backwards compatibility. # Please use `AllowedMethods` and `AllowedPatterns` instead. # By default, there are no methods to allowed. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # def m # array = [ # +1 @@ -26200,7 +26381,7 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # 2 # ] # -# hash = { # +3 +# hash = { # +1 # key: 'value' # } # @@ -26213,33 +26394,33 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#42 +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#43 class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_block(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_def(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#65 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#66 def cop_label; end end -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#47 +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#48 RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # Checks if the length of a module exceeds some maximum value. @@ -26247,10 +26428,11 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # module M # ARRAY = [ # +1 @@ -26258,7 +26440,7 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # 2 # ] # -# HASH = { # +3 +# HASH = { # +1 # key: 'value' # } # @@ -26271,24 +26453,24 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#37 +# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#38 class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#52 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#44 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#45 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#40 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#41 def on_module(node); end private - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#55 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#56 def message(length, max_length); end end @@ -27282,16 +27464,21 @@ class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#61 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#66 def bad_reader_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#65 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#70 def bad_writer_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#53 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#54 def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#62 + def proper_attribute_name?(node); end end # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 @@ -27450,43 +27637,66 @@ class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#55 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#55 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#95 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 def anonymous_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#127 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + def block_argument_name_matched?(block_pass_node, last_argument); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#146 def block_forwarding_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#81 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#77 def expected_block_forwarding_style?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#99 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 def explicit_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#103 + # Prevents the following syntax error: + # + # # foo.rb + # def foo(&) + # block_method do + # bar(&) + # end + # end + # + # $ ruby -vc foo.rb + # ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] + # foo.rb: foo.rb:4: anonymous block parameter is also used within block (SyntaxError) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#106 + def invalidates_syntax?(block_pass_node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 def register_offense(block_argument, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#119 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#138 def use_block_argument_as_local_variable?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 def use_kwarg_in_method_definition?(node); end class << self @@ -27712,8 +27922,6 @@ class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/file_name.rb#165 def find_definition(node); end - # @yield [source_range(processed_source.buffer, 1, 0), msg] - # # source://rubocop//lib/rubocop/cop/naming/file_name.rb#65 def for_bad_filename(file_path); end @@ -27965,13 +28173,13 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 def check_token?(type); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#244 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#243 def create_message(word, message = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#218 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#217 def create_multiple_word_message_for_file(words); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#214 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#213 def create_single_word_message_for_file(word); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189 @@ -27980,10 +28188,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 def extract_regexp(term, term_definition); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#252 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#251 def find_flagged_term(word); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#266 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#265 def format_suggestions(suggestions); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197 @@ -27992,10 +28200,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 def investigate_tokens; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#232 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#231 def mask_input(str); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#281 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#280 def offense_range(token, word); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 @@ -28004,13 +28212,13 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 def preprocess_flagged_terms; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#259 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#258 def preprocess_suggestions(suggestions); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179 def process_allowed_regex(allowed); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#222 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#221 def scan_for_words(input); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174 @@ -28360,94 +28568,109 @@ class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base def on_defs(node); end end -# Checks that predicate methods names end with a question mark and +# Checks that predicate method names end with a question mark and # do not start with a forbidden prefix. # -# A method is determined to be a predicate method if its name starts -# with one of the prefixes defined in the `NamePrefix` configuration. -# You can change what prefixes are considered by changing this option. -# Any method name that starts with one of these prefixes is required by -# the cop to end with a `?`. Other methods can be allowed by adding to -# the `AllowedMethods` configuration. +# A method is determined to be a predicate method if its name starts with +# one of the prefixes listed in the `NamePrefix` configuration. The list +# defaults to `is_`, `has_`, and `have_` but may be overridden. # -# NOTE: The `is_a?` method is allowed by default. +# Predicate methods must end with a question mark. # -# If `ForbiddenPrefixes` is set, methods that start with the configured -# prefixes will not be allowed and will be removed by autocorrection. +# When `ForbiddenPrefixes` is also set (as it is by default), predicate +# methods which begin with a forbidden prefix are not allowed, even if +# they end with a `?`. These methods should be changed to remove the +# prefix. # -# In other words, if `ForbiddenPrefixes` is empty, a method named `is_foo` -# will register an offense only due to the lack of question mark (and will be -# autocorrected to `is_foo?`). If `ForbiddenPrefixes` contains `is_`, -# `is_foo` will register an offense both because the ? is missing and because of -# the `is_` prefix, and will be corrected to `foo?`. -# -# NOTE: `ForbiddenPrefixes` is only applied to prefixes in `NamePrefix`; -# a prefix in the former but not the latter will not be considered by -# this cop. -# -# @example +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) # # bad # def is_even(value) # end # -# def is_even?(value) -# end -# +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) # # good # def even?(value) # end # +# # When ForbiddenPrefixes: [] +# # good +# def is_even?(value) +# end +# @example NamePrefix: ['seems_to_be_'] # # bad -# def has_value +# def seems_to_be_even(value) # end # -# def has_value? +# # When ForbiddenPrefixes: ['seems_to_be_'] +# # good +# def even?(value) # end # +# # When ForbiddenPrefixes: [] # # good -# def value? +# def seems_to_be_even?(value) # end # @example AllowedMethods: ['is_a?'] (default) +# # Despite starting with the `is_` prefix, this method is allowed # # good # def is_a?(value) # end +# @example AllowedMethods: ['is_even?'] +# # good +# def is_even?(value) +# end +# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) +# # bad +# define_method(:is_even) { |value| } +# +# # good +# define_method(:even?) { |value| } +# @example MethodDefinitionMacros: ['def_node_matcher'] +# # bad +# def_node_matcher(:is_even) { |value| } +# +# # good +# def_node_matcher(:even?) { |value| } # -# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#59 +# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#75 class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#63 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#79 def dynamic_method_define(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#69 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#85 def on_send(node); end + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#112 + def validate_config; end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 def allowed_method_name?(method_name, prefix); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#106 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#132 def expected_name(method_name, prefix); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#120 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#146 def forbidden_prefixes; end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#116 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#142 def message(method_name, new_name); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#128 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#154 def method_definition_macros(macro_name); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#150 def predicate_prefixes; end end @@ -28517,31 +28740,31 @@ class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96 def autocorrect(corrector, node, range, offending_name, preferred_name); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#116 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#117 def correct_node(corrector, node, offending_name, preferred_name); end # If the exception variable is reassigned, that assignment needs to be corrected. # Further `lvar` nodes will not be corrected though since they now refer to a # different variable. # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#134 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 def correct_reassignment(corrector, node, offending_name, preferred_name); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#159 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#168 def message(node); end # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91 def offense_range(resbody); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 def preferred_name(variable_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#165 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#174 def shadowed_variable_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#161 def variable_name(node); end # @return [Boolean] @@ -30461,6 +30684,17 @@ end module RuboCop::Cop::StringLiteralsHelp private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#24 + def enforce_double_quotes?; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#20 + def preferred_string_literal; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#28 + def string_literals_config; end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#9 @@ -30475,6 +30709,17 @@ module RuboCop::Cop::Style; end # EnforcedStyle config covers only method definitions. # Applications of visibility methods to symbols can be controlled # using AllowModifiersOnSymbols config. +# Also, the visibility of `attr*` methods can be controlled using +# AllowModifiersOnAttrs config. +# +# In Ruby 3.0, `attr*` methods now return an array of defined method names +# as symbols. So we can write the modifier and `attr*` in inline style. +# AllowModifiersOnAttrs config allows `attr*` methods to be written in +# inline style without modifying applications that have been maintained +# for a long time in group style. Furthermore, developers who are not very +# familiar with Ruby may know that the modifier applies to `def`, but they +# may not know that it also applies to `attr*` methods. It would be easier +# to understand if we could write `attr*` methods in inline style. # # @example EnforcedStyle: group (default) # # bad @@ -30526,94 +30771,128 @@ module RuboCop::Cop::Style; end # private :bar, :baz # # end +# @example AllowModifiersOnAttrs: true (default) +# # good +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# def public_method; end +# +# private +# +# def private_method; end +# +# end +# @example AllowModifiersOnAttrs: false +# # bad +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# end # -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#70 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#109 class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#91 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 + def access_modifier_with_attr?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#130 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#95 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#140 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#145 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#149 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#199 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#177 + def allow_modifiers_on_attrs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#173 def allow_modifiers_on_symbols?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#112 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#158 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#269 def def_source(node, def_node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#180 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 def find_argument_less_modifier_node(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#169 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 def find_corresponding_def_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#137 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 def group_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 def inline_style?; end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#211 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#261 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#159 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 def message(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#181 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#215 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 def remove_node(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#194 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#244 def replace_def(corrector, node, def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#153 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 def right_siblings_same_inline_method?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#188 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 def select_grouped_def_nodes(node); end end -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#88 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#76 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#81 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#120 RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#86 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#125 RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for grouping of accessors in `class` and `module` bodies. @@ -30757,7 +31036,7 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/alias.rb#51 + # source://rubocop//lib/rubocop/cop/style/alias.rb#52 def on_alias(node); end # source://rubocop//lib/rubocop/cop/style/alias.rb#41 @@ -30765,47 +31044,47 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/alias.rb#85 + # source://rubocop//lib/rubocop/cop/style/alias.rb#86 def add_offense_for_args(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/alias.rb#75 + # source://rubocop//lib/rubocop/cop/style/alias.rb#76 def alias_keyword_possible?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/alias.rb#79 + # source://rubocop//lib/rubocop/cop/style/alias.rb#80 def alias_method_possible?(node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#65 + # source://rubocop//lib/rubocop/cop/style/alias.rb#66 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/alias.rb#124 + # source://rubocop//lib/rubocop/cop/style/alias.rb#125 def bareword?(sym_node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#128 + # source://rubocop//lib/rubocop/cop/style/alias.rb#129 def correct_alias_method_to_alias(corrector, send_node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#135 + # source://rubocop//lib/rubocop/cop/style/alias.rb#136 def correct_alias_to_alias_method(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#142 + # source://rubocop//lib/rubocop/cop/style/alias.rb#143 def correct_alias_with_symbol_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#147 + # source://rubocop//lib/rubocop/cop/style/alias.rb#148 def identifier(node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#113 + # source://rubocop//lib/rubocop/cop/style/alias.rb#114 def lexical_scope_type(node); end # In this expression, will `self` be the same as the innermost enclosing # class or module block (:lexical)? Or will it be something else # (:dynamic)? If we're in an instance_eval block, return that. # - # source://rubocop//lib/rubocop/cop/style/alias.rb#96 + # source://rubocop//lib/rubocop/cop/style/alias.rb#97 def scope_type(node); end end @@ -30929,6 +31208,12 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # This cop identifies places where `do_something(*args, &block)` # can be replaced by `do_something(...)`. # +# In Ruby 3.1, anonymous block forwarding has been added. +# +# This cop identifies places where `do_something(&block)` can be replaced +# by `do_something(&)`; if desired, this functionality can be disabled +# by setting `UseAnonymousForwarding: false`. +# # In Ruby 3.2, anonymous args/kwargs forwarding has been added. # # This cop also identifies places where `use_args(*args)`/`use_kwargs(**kwargs)` can be @@ -30944,6 +31229,8 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # # Names not on this list are likely to be meaningful and are allowed by default. # +# This cop handles not only method forwarding but also forwarding to `super`. +# # @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) # # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. # def foo(&block) @@ -30956,21 +31243,24 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # end # @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) # # bad -# def foo(*args, **kwargs) +# def foo(*args, **kwargs, &block) # args_only(*args) # kwargs_only(**kwargs) +# block_only(&block) # end # # # good -# def foo(*, **) +# def foo(*, **, &) # args_only(*) # kwargs_only(**) +# block_only(&) # end # @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) # # good -# def foo(*args, **kwargs) +# def foo(*args, **kwargs, &block) # args_only(*args) # kwargs_only(**kwargs) +# block_only(&block) # end # @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) # # good @@ -31028,222 +31318,222 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # bar(...) # end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#116 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#176 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 def add_parens_if_missing(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#199 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#321 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#350 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#313 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#338 def arguments_range(node, first_node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#242 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#227 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#473 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#502 def explicit_block_name?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 def extract_forwardable_args(args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#217 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#171 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#182 def only_forwards_all?(send_classifications); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#271 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#294 def outside_block?(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#163 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#261 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#284 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#303 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#277 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#300 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#293 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#316 def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#285 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#308 def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#354 def use_anonymous_forwarding?; end class << self - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#131 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#142 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#124 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#129 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#123 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#126 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#128 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#139 RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#336 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier extend ::RuboCop::AST::NodePattern::Macros # @return [SendNodeClassifier] a new instance of SendNodeClassifier # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#348 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#377 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#376 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#405 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#372 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#399 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#346 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#375 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#393 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#387 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#340 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#369 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#444 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#473 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#440 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#469 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#454 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#483 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#454 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#409 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#417 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#448 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#477 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#405 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#434 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#467 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#496 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#458 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#487 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#401 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#430 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#421 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#450 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#417 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#413 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#442 def referenced_rest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#397 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#426 def ruby_32_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#458 def target_ruby_version; end end @@ -32150,27 +32440,27 @@ RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(n # Corrector to correct conditional assignment in `case` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#605 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#604 class RuboCop::Cop::Style::CaseCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#610 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#609 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#620 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#619 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#640 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#639 def extract_branches(case_node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#634 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#633 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#650 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#649 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -32841,9 +33131,7 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # @example # # bad # array.reject(&:nil?) -# array.delete_if(&:nil?) # array.reject { |e| e.nil? } -# array.delete_if { |e| e.nil? } # array.select { |e| !e.nil? } # array.grep_v(nil) # array.grep_v(NilClass) @@ -32853,7 +33141,9 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # bad # hash.reject!(&:nil?) +# array.delete_if(&:nil?) # hash.reject! { |k, v| v.nil? } +# array.delete_if { |e| e.nil? } # hash.select! { |k, v| !v.nil? } # # # good @@ -33406,44 +33696,44 @@ RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), S # y # end # -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#43 +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#45 class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#57 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#60 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#80 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#83 def offensive?(comment); end - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#67 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#70 def register_offense(comment, matched_keyword); end - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#86 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#89 def source_line(comment); end end -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#54 RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#53 +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#55 RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#49 +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#51 RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#50 +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#47 +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#49 RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#55 +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#58 RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) # Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum. @@ -33562,8 +33852,8 @@ RuboCop::Cop::Style::ConcatArrayLiterals::MSG_FOR_PERCENT_LITERALS = T.let(T.uns RuboCop::Cop::Style::ConcatArrayLiterals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Check for `if` and `case` statements where each branch is used for -# assignment to the same variable when using the return of the -# condition can be used instead. +# both the assignment and comparison of the same variable +# when using the return of the condition can be used instead. # # @example EnforcedStyle: assign_to_condition (default) # # bad @@ -33904,16 +34194,16 @@ module RuboCop::Cop::Style::ConditionalCorrectorHelper # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 def assignment(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#491 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#490 def correct_branches(corrector, branches); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#468 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#467 def correct_if_branches(corrector, cop, node); end # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#441 def remove_whitespace_in_branches(corrector, branch, condition, column); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#478 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#477 def replace_branch_assignment(corrector, branch); end # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 @@ -34011,36 +34301,36 @@ class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/copyright.rb#47 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#45 + def autocorrect(corrector); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#56 def autocorrect_notice; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#78 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#86 def encoding_token?(processed_source, token_index); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#64 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#72 def insert_notice_before(processed_source); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#43 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 def notice; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#85 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#93 def notice_found?(processed_source); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#51 - def offense_range; end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#71 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#79 def shebang_token?(processed_source, token_index); end # @raise [Warning] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#55 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#60 def verify_autocorrect_notice!; end end @@ -34188,7 +34478,6 @@ RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) # # # good (without parentheses it's a syntax error) # def foo() do_something end -# @example # # # bad # def Baz.foo() @@ -34200,18 +34489,18 @@ RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) # do_something # end # -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#42 +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#40 class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 def on_defs(node); end end -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#43 RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) # Checks for places where the `#\_\_dir\_\_` method can replace more @@ -34703,34 +34992,52 @@ RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) # def do_something # end # end +# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] +# +# # good +# class Foo +# def method_missing(name, *args) +# end # -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#98 +# def respond_to_missing?(symbol, include_private) +# end +# end +# +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base include ::RuboCop::Cop::DocumentationComment include ::RuboCop::Cop::VisibilityHelp include ::RuboCop::Cop::DefNode - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#105 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#116 def modifier_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#119 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#146 + def allowed_methods; end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#130 def check(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#126 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#142 + def method_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#138 def require_for_non_public_methods?; end end -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#102 +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#113 RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) # Detects double disable comments on one line. This is mostly to catch @@ -34870,38 +35177,38 @@ RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # # good # 5.times { } -# @example +# # # bad # (0...10).each {} # # # good # 10.times {} # -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#25 +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#24 class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#53 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#52 def each_range(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#65 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#64 def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#77 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#76 def each_range_without_block_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#30 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#29 def on_block(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#46 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#45 def offending?(node); end end -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#28 +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#27 RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) # Looks for inject / reduce calls where the passed in object is @@ -35218,10 +35525,10 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#193 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#194 def autocorrect_forbidden?(type); end - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#186 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#187 def base_node(node); end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#145 @@ -35230,7 +35537,7 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/empty_else.rb#180 - def comment_in_else?(loc); end + def comment_in_else?(node); end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#160 def empty_check(node); end @@ -35240,7 +35547,7 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/empty_else.rb#156 def empty_style?; end - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#197 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#198 def missing_else_style; end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#166 @@ -35289,26 +35596,14 @@ RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::EmptyHeredoc < ::RuboCop::Cop::Base include ::RuboCop::Cop::Heredoc include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#43 + # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#44 def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#63 - def enforce_double_quotes?; end - - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#59 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#67 - def string_literals_config; end end -# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#41 +# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#42 RuboCop::Cop::Style::EmptyHeredoc::MSG = T.let(T.unsafe(nil), String) # Checks for parentheses for empty lambda parameters. Parentheses @@ -35349,7 +35644,9 @@ RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) # @example # # bad # a = Array.new +# a = Array[] # h = Hash.new +# h = Hash[] # s = String.new # # # good @@ -35357,83 +35654,79 @@ RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) # h = {} # s = '' # -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#19 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#21 class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base include ::RuboCop::Cop::FrozenStringLiteral include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 def array_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 def array_with_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#54 + def array_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 def hash_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#46 def hash_with_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#50 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#62 + def hash_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#69 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 def str_node(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#111 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#118 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#74 - def enforce_double_quotes?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#82 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 def first_argument_unparenthesized?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#129 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#136 def frozen_strings?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#102 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#109 def offense_array_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#106 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#113 def offense_hash_node?(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#60 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#79 def offense_message(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#70 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#96 def replacement_range(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#78 - def string_literals_config; end end -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#24 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#27 RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#25 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#26 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#29 RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) # Checks for the formatting of empty method definitions. @@ -35713,9 +36006,18 @@ RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # will not attempt to automatically add a binding, or add filename and # line values. # -# This cop works only when a string literal is given as a code string. +# NOTE: This cop works only when a string literal is given as a code string. # No offense is reported if a string variable is given as below: # +# [source,ruby] +# ---- +# code = <<-RUBY +# def do_something +# end +# RUBY +# eval code # not checked. +# ---- +# # @example # # bad # eval <<-RUBY @@ -35740,100 +36042,93 @@ RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # def do_something # end # RUBY -# @example -# # not checked -# code = <<-RUBY -# def do_something -# end -# RUBY -# eval code # -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#56 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#57 class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#74 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#75 def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#81 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#82 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#69 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#70 def valid_eval_receiver?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#184 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#187 def add_offense_for_different_line(node, line_node, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#132 def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#199 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 def add_offense_for_missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#206 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#209 def add_offense_for_missing_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#178 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 def add_offense_for_same_line(node, line_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#144 def check_file(node, file_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#156 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#157 def check_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#96 def check_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#191 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#194 def expected_line(sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#123 def file_and_line(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#166 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#169 def line_difference(line_node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#218 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#221 def missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#110 def register_offense(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#114 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#115 def special_file_keyword?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#119 def special_line_keyword?(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#170 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#173 def string_first_line(str_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#128 def with_binding?(node); end end -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#62 RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#63 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#64 RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#66 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#67 RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for places where `Integer#even?` or `Integer#odd?` @@ -35907,10 +36202,10 @@ class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#56 + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#57 def exact_match_pattern?(parsed_regexp); end - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#63 + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#64 def new_method(node); end end @@ -36342,8 +36637,7 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Favor `File.(bin)read` convenience methods. # # @example -# ## text mode -# # bad +# # bad - text mode # File.open(filename).read # File.open(filename, &:read) # File.open(filename) { |f| f.read } @@ -36358,9 +36652,8 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # File.read(filename) -# @example -# ## binary mode -# # bad +# +# # bad - binary mode # File.open(filename, 'rb').read # File.open(filename, 'rb', &:read) # File.open(filename, 'rb') do |f| @@ -36370,49 +36663,49 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # File.binread(filename) # -# source://rubocop//lib/rubocop/cop/style/file_read.rb#38 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#35 class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/file_read.rb#65 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#62 def block_read?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#49 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#46 def file_open?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#69 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#66 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#60 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#57 def send_read?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/file_read.rb#84 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#81 def evidence(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#100 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#97 def file_open_read?(node); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#106 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#103 def read_method(mode); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#92 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#89 def read_node?(node, block_pass); end end -# source://rubocop//lib/rubocop/cop/style/file_read.rb#42 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#39 RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/file_read.rb#46 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#43 RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/file_read.rb#44 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#41 RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Favor `File.(bin)write` convenience methods. @@ -36429,8 +36722,7 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # ---- # # @example -# ## text mode -# # bad +# # bad - text mode # File.open(filename, 'w').write(content) # File.open(filename, 'w') do |f| # f.write(content) @@ -36438,9 +36730,8 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # File.write(filename, content) -# @example -# ## binary mode -# # bad +# +# # bad - binary mode # File.open(filename, 'wb').write(content) # File.open(filename, 'wb') do |f| # f.write(content) @@ -36449,24 +36740,24 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # File.binwrite(filename, content) # -# source://rubocop//lib/rubocop/cop/style/file_write.rb#41 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#38 class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/file_write.rb#68 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#65 def block_write?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#85 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#82 def evidence(node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#52 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#49 def file_open?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#72 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#69 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#63 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#60 def send_write?(param0 = T.unsafe(nil)); end private @@ -36474,31 +36765,31 @@ class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base # @return [Boolean] # @yield [content] # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#95 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#92 def file_open_write?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#123 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#120 def heredoc?(write_node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#128 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#125 def heredoc_range(first_argument); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#108 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#105 def replacement(mode, filename, content, write_node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#104 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#101 def write_method(mode); end end -# source://rubocop//lib/rubocop/cop/style/file_write.rb#45 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#42 RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/file_write.rb#47 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#44 RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/file_write.rb#49 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#46 RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) # Checks for division with integers coerced to floats. @@ -36637,7 +36928,7 @@ class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/for.rb#82 + # source://rubocop//lib/rubocop/cop/style/for.rb#84 def suspect_enumerable?(node); end end @@ -36672,25 +36963,25 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # # @example EnforcedStyle: format (default) # # bad -# puts sprintf('%10s', 'hoge') -# puts '%10s' % 'hoge' +# puts sprintf('%10s', 'foo') +# puts '%10s' % 'foo' # # # good -# puts format('%10s', 'hoge') +# puts format('%10s', 'foo') # @example EnforcedStyle: sprintf # # bad -# puts format('%10s', 'hoge') -# puts '%10s' % 'hoge' +# puts format('%10s', 'foo') +# puts '%10s' % 'foo' # # # good -# puts sprintf('%10s', 'hoge') +# puts sprintf('%10s', 'foo') # @example EnforcedStyle: percent # # bad -# puts format('%10s', 'hoge') -# puts sprintf('%10s', 'hoge') +# puts format('%10s', 'foo') +# puts sprintf('%10s', 'foo') # # # good -# puts '%10s' % 'hoge' +# puts '%10s' % 'foo' # # source://rubocop//lib/rubocop/cop/style/format_string.rb#50 class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base @@ -36751,8 +37042,8 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # The reason is that _unannotated_ format is very similar # to encoded URLs or Date/Time formatting strings. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # It is allowed to contain unannotated token # if the number of them is less than or equals to @@ -37063,11 +37354,16 @@ class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#64 + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#70 def gvar_name(const_name); end - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#60 + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#62 def message(const_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#66 + def namespaced?(node); end end # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37 @@ -37261,12 +37557,12 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#285 def accepted_if?(node, ending); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#299 def allowed_consecutive_conditionals?; end # @return [Boolean] @@ -37305,7 +37601,7 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#295 def remove_whole_lines(corrector, range); end # @return [Boolean] @@ -37603,9 +37899,9 @@ RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil) # {foo: 1, bar: 2, baz: 3}.reject {|k, v| k == :bar } # {foo: 1, bar: 2, baz: 3}.select {|k, v| k != :bar } # {foo: 1, bar: 2, baz: 3}.filter {|k, v| k != :bar } -# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[foo bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[foo bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[foo bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[bar].include?(k) } # # # good # {foo: 1, bar: 2, baz: 3}.except(:bar) @@ -37632,42 +37928,42 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#94 - def bad_method?(block); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#95 + def bad_method?(method_name, block); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#166 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#169 def decorate_source(value); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#174 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#177 def except_key(node); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#153 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#156 def except_key_source(key); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#147 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#150 def extract_body_if_negated(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#128 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#131 def included?(negated, body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#132 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135 def not_included?(negated, body); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#183 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#186 def offense_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#136 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#139 def safe_to_register_offense?(block, except_key); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#112 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#115 def semantically_except_method?(send, block); end end @@ -37756,10 +38052,12 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # * never - forces use of explicit hash literal value # * either - accepts both shorthand and explicit use of hash literal value # * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash +# * either_consistent - accepts both shorthand and explicit use of hash literal value, +# but they must be consistent # -# @example EnforcedShorthandSyntax: consistent +# @example EnforcedShorthandSyntax: either_consistent # -# # bad - `foo` and `bar` values can be omitted +# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted # {foo: foo, bar: bar} # # # bad - `bar` value can be omitted @@ -37820,6 +38118,22 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good # {foo:, bar:} +# @example EnforcedShorthandSyntax: consistent +# +# # bad - `foo` and `bar` values can be omitted +# {foo: foo, bar: bar} +# +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} +# +# # good +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} # @example EnforcedStyle: ruby19 (default) # # bad # {:a => 2} @@ -37830,84 +38144,84 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol # {d: 1, 'e' => 2} # technically not forbidden # -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#131 class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::HashShorthandSyntax include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#185 def alternative_style; end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#145 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#163 def hash_rockets_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#177 def no_mixed_keys_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#123 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 def ruby19_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#149 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 def ruby19_no_mixed_keys_check(pairs); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#198 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#217 def acceptable_19_syntax_symbol?(sym_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#252 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#274 def argument_without_space?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#178 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#196 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#256 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#278 def autocorrect_hash_rockets(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#265 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#287 def autocorrect_no_mixed_keys(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#231 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#253 def autocorrect_ruby19(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#216 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#238 def check(pairs, delim, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#273 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#295 def force_hash_rockets?(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#244 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#266 def range_for_autocorrect_ruby19(pair_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#188 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#206 def sym_indices?(pairs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#192 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#210 def word_symbol_pair?(pair); end end -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#119 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#137 RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#121 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#139 RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#120 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#138 RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) # Looks for uses of `\_.each_with_object({}) {...}`, @@ -38146,24 +38460,24 @@ RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), St # Corrector to correct conditional assignment in `if` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#560 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#559 class RuboCop::Cop::Style::IfCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#565 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#564 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#569 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#568 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#583 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#582 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#590 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#589 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -38520,7 +38834,7 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri # # # good # foo == bar -# @example +# # # bad # if foo.do_something? # true @@ -38534,61 +38848,61 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri # # good # num.nonzero? ? true : false # -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#62 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#61 class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#74 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#73 def double_negative?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#70 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#69 def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#76 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#75 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#134 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#135 def assume_boolean_value?(condition); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#113 def message(node, keyword); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#96 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#95 def multiple_elsif?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#102 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#101 def offense_range_with_keyword(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#151 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#152 def opposite_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#141 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#142 def replacement_condition(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#156 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#157 def require_parentheses?(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#120 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#121 def return_boolean_value?(condition); end end -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#65 RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#67 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) # Checks for uses of semicolon in if statements. @@ -38606,25 +38920,42 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base include ::RuboCop::Cop::OnNormalIfUnless extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#23 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#24 def on_normal_if_unless(node); end private - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#38 - def autocorrect(node); end + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#54 + def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#56 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#95 def build_else_branch(second_condition); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#47 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#85 + def build_expression(expr); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#75 def correct_elsif(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#40 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#66 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#62 + def use_block_in_branches?(node); end end # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#21 +RuboCop::Cop::Style::IfWithSemicolon::MSG_NEWLINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#22 RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) # Checks for `raise` or `fail` statements which do not specify an @@ -38681,6 +39012,9 @@ class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#46 def alternative_pattern_source(pattern); end + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#50 + def collect_alternative_patterns(pattern); end end # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 @@ -38865,7 +39199,7 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#181 def dot_range(loc); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#164 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#166 def end_parentheses(node, method_call); end # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#150 @@ -38882,7 +39216,7 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#154 def negated?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#162 def not_to_receiver(node, method_call); end # When comparing classes, `!(Integer < Numeric)` is not the same as @@ -38893,6 +39227,11 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#172 def possible_class_hierarchy_check?(lhs, rhs, method); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158 + def relational_comparison_with_safe_navigation?(node); end + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#185 def remove_end_parenthesis(corrector, node, method, method_call); end @@ -38944,12 +39283,14 @@ RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # foo unless x != y # foo unless x >= 10 # foo unless x.even? +# foo unless odd? # # # good # foo if bar # foo if x == y # foo if x < 10 # foo if x.odd? +# foo if even? # # # bad (complex condition) # foo unless x != y || x.even? @@ -38960,45 +39301,45 @@ RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # good (if) # foo if !condition # -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#51 +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#53 class RuboCop::Cop::Style::InvertibleUnlessCondition < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#58 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#128 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#133 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#141 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#146 def autocorrect_send_node(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#88 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#90 def inheritance_check?(node); end - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#149 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#154 def inverse_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#73 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#75 def invertible?(node); end - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#94 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#96 def preferred_condition(node); end - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#121 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#126 def preferred_logical_condition(node); end - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#102 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#104 def preferred_send_condition(node); end end -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#54 +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56 RuboCop::Cop::Style::InvertibleUnlessCondition::MSG = T.let(T.unsafe(nil), String) # Checks for hardcoded IP addresses, which can make code @@ -39504,7 +39845,7 @@ end # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#107 class RuboCop::Cop::Style::MagicCommentFormat::CommentRange - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [CommentRange] a new instance of CommentRange # @@ -39522,11 +39863,11 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 def directives; end - # source://forwardable/1.3.3/forwardable.rb#231 - def loc(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def loc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def text(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def text(*_arg0, **_arg1, &_arg2); end # A magic comment can contain one value (normal style) or # multiple directives (emacs style) @@ -39554,6 +39895,7 @@ RuboCop::Cop::Style::MagicCommentFormat::MSG_VALUE = T.let(T.unsafe(nil), String RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), String) # Prefer `select` or `reject` over `map { ... }.compact`. +# This cop also handles `filter_map { ... }`, similar to `map { ... }.compact`. # # @example # @@ -39561,6 +39903,9 @@ RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), # array.map { |e| some_condition? ? e : next }.compact # # # bad +# array.filter_map { |e| some_condition? ? e : next } +# +# # bad # array.map do |e| # if some_condition? # e @@ -39587,48 +39932,163 @@ RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), # # good # array.reject { |e| some_condition? } # -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#40 +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#44 class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#46 - def map_and_compact?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#51 + def conditional_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#76 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#126 - def range(node); end + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#148 + def current(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#162 + def filter_map_range(node); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 + def inspect(node, block_argument_node, condition_node, return_value_node, range); end + + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#158 + def map_with_compact_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#92 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#114 def returns_block_argument?(block_argument_node, return_value_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#118 def truthy_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#116 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#138 def truthy_branch_for_guard?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#106 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#128 def truthy_branch_for_if?(node); end end -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#43 +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#47 RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#48 +RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usages of `each` with `<<`, `push`, or `append` which +# can be replaced by `map`. +# +# If `PreferredMethods` is configured for `map` in `Style/CollectionMethods`, +# this cop uses the specified method for replacement. +# +# NOTE: The return value of `Enumerable#each` is `self`, whereas the +# return value of `Enumerable#map` is an `Array`. They are not autocorrected +# when a return value could be used because these types differ. +# +# NOTE: It only detects when the mapping destination is a local variable +# initialized as an empty array and referred to only by the pushing operation. +# This is because, if not, it's challenging to statically guarantee that the +# mapping destination variable remains an empty array: +# +# [source,ruby] +# ---- +# ret = [] +# src.each { |e| ret << e * 2 } # `<<` method may mutate `ret` +# +# dest = [] +# src.each { |e| dest << transform(e, dest) } # `transform` method may mutate `dest` +# ---- +# +# @example +# # bad +# dest = [] +# src.each { |e| dest << e * 2 } +# dest +# +# # good +# dest = src.map { |e| e * 2 } +# +# # good - contains another operation +# dest = [] +# src.each { |e| dest << e * 2; puts e } +# dest +# +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#50 +class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#84 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57 + def each_block_with_push?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66 + def empty_array_asgn?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#78 + def lvar_ref?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#88 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#88 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#162 + def correct_push_node(corrector, push_node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#170 + def correct_return_value_handling(corrector, block, dest_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#117 + def dest_used_only_for_mapping?(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#111 + def find_closest_assignment(block, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#103 + def find_dest_var(block); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#136 + def new_method_name; end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#125 + def register_offense(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 + def remove_assignment(corrector, asgn); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#142 + def return_value_used?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#80 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#54 +RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String) + # Looks for uses of `map.to_h` or `collect.to_h` that could be # written with just `to_h` in Ruby >= 2.6. # @@ -39721,7 +40181,7 @@ RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the presence (default) or absence of parentheses in -# method calls containing parameters. +# method calls containing arguments. # # In the default style (require_parentheses), macro methods are allowed. # Additional methods can be added to the `AllowedMethods` or @@ -39951,110 +40411,110 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#70 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 def allowed_camel_case_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#170 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 def allowed_string_interpolation_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#220 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#225 def assignment_in_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#32 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#156 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#144 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#149 def call_in_argument_with_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#100 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#105 def call_in_literals?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#111 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#116 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#157 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 def call_in_match_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#120 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#125 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#124 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#129 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#133 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#140 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#145 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#235 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#199 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#163 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168 def hash_literal_in_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#44 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#45 def inside_endless_method_def?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#216 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -40062,20 +40522,25 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#58 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#59 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#87 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#92 def legitimate_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#195 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 def logical_operator?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#67 + def method_call_before_constant_resolution?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#41 def offense_range(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 @@ -40083,42 +40548,42 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 def parentheses_at_the_end_of_multiline_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 def regexp_slash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#49 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 def require_parentheses_for_hash_value_omission?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192 def splat?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#66 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#71 def super_call_without_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#62 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#63 def syntax_like_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 def unary_literal?(node); end end @@ -40161,8 +40626,8 @@ RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_ # Checks for unwanted parentheses in parameterless method calls. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # NOTE: This cop allows the use of `it()` without arguments in blocks, # as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. @@ -40637,15 +41102,10 @@ class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/missing_else.rb#127 def check(node); end - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#181 + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#177 def empty_else_config; end - # @return [Boolean] - # # source://rubocop//lib/rubocop/cop/style/missing_else.rb#171 - def empty_else_cop_enabled?; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#175 def empty_else_style; end # @return [Boolean] @@ -41215,33 +41675,33 @@ class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#60 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#69 def arguments_range(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#41 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#42 def autocorrect(corrector, node, begin_of_arguments); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#72 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#81 def closing_line(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#76 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#85 def correction_exceeds_max_line_length?(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#84 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#93 def definition_width(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#80 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#89 def indentation_width(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#56 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#65 def last_line_source_of_arguments(arguments); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#88 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#97 def max_line_length; end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#68 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#77 def opening_line(node); end end @@ -41288,28 +41748,28 @@ class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#60 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#64 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#82 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#86 def comments_in_condition(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#88 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#92 def enforce_single_line_ternary_operator?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#56 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#60 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#68 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#72 def replacement(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#92 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#96 def use_assignment_method?(node); end end @@ -41357,11 +41817,6 @@ class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#58 - def accept_node_type?(node); end - # Requires `then` for write `when` and its body on the same line. # # @return [Boolean] @@ -41425,58 +41880,53 @@ class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62 def on_or(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#86 def simple_comparison_lhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#91 def simple_comparison_rhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#83 def simple_double_comparison?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#153 def allow_method_comparison?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#134 def comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#157 def comparisons_threshold; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#126 def nested_comparison?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#95 def nested_variable_comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#148 def reset_comparison; end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#138 def root_of_or_node(or_node); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150 - def switch_comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#122 def variable_name(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#101 def variables_in_node(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#109 def variables_in_simple_node(node); end end @@ -42321,17 +42771,17 @@ class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#65 + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#67 def message(_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#77 + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#79 def prefer_comparison?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#69 + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#71 def style_check?(node, &block); end end @@ -42818,8 +43268,8 @@ RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) # These can be replaced by their respective predicate methods. # This cop can also be configured to do the reverse. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # This cop disregards `#nonzero?` as its value is truthy or falsey, # but not `true` and `false`, and thus not always interchangeable with @@ -42882,16 +43332,16 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#166 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#174 def comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#171 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#179 def inverted_comparison(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#90 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#161 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#169 def predicate(param0 = T.unsafe(nil)); end private @@ -42904,23 +43354,28 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#111 def check(node); end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#152 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#154 def invert; end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#132 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#162 + def negated?(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#134 def parenthesized_source(node); end # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#124 - def replacement(numeric, operation); end + def replacement(node, numeric, operation); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#144 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#146 def replacement_supported?(operator); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#140 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#142 def require_parentheses?(node); end end @@ -42971,11 +43426,13 @@ class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/object_then.rb#48 def check_method_node(node); end - # source://rubocop//lib/rubocop/cop/style/object_then.rb#68 + # source://rubocop//lib/rubocop/cop/style/object_then.rb#70 def message(node); end - # source://rubocop//lib/rubocop/cop/style/object_then.rb#57 - def preferred_method(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/object_then.rb#59 + def preferred_method?(node); end end # source://rubocop//lib/rubocop/cop/style/object_then.rb#32 @@ -43494,14 +43951,14 @@ class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#234 def cop_config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#230 def extract_sources(node); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 - def source(node); end + def source(node, loc); end end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#29 @@ -43510,37 +43967,37 @@ RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) # An internal class for correcting parallel assignment # guarded by if, unless, while, or until # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#275 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#285 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#286 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#291 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#292 def modifier_range(node); end end # An internal class for correcting parallel assignment # protected by rescue # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#240 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#242 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#252 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#253 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#263 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#264 def begin_correction(rescue_result); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#258 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#259 def def_correction(rescue_result); end end @@ -43950,7 +44407,7 @@ RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) # # String interpolation is always kept in double quotes. # -# Note: `Lint/SymbolConversion` can be used in parallel to ensure that symbols +# NOTE: `Lint/SymbolConversion` can be used in parallel to ensure that symbols # are not quoted that don't need to be. This cop is for configuring the quoting # style to use for symbols that require quotes. # @@ -43983,7 +44440,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#108 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#106 def alternative_style; end # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#71 @@ -44004,7 +44461,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#112 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#110 def quoted?(sym_node); end # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#99 @@ -44012,7 +44469,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#116 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#114 def wrong_quotes?(node); end end @@ -44060,56 +44517,56 @@ RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) # raise MyCustomError.new(arg1, arg2, arg3) # fail 'message' # -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#44 +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#47 class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#53 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#56 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#129 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#132 def acceptable_exploded_args?(args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#143 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#146 def allowed_non_exploded_type?(arg); end - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#92 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#95 def check_compact(node); end - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#108 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#111 def check_exploded(node); end - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#66 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#69 def correction_compact_to_exploded(node); end - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#78 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#81 def correction_exploded_to_compact(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#149 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#152 def requires_parens?(parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#125 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#128 def use_new_method?(first_arg); end end -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#49 +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#52 RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#48 +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#51 RuboCop::Cop::Style::RaiseArgs::EXPLODED_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#51 +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#54 RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for the use of randomly generated numbers, @@ -44237,10 +44694,20 @@ class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#94 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#108 + def argument_matched?(target_argument, redundant_argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#100 def argument_range(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#87 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#120 + def exclude_cntrl_character?(target_argument, redundant_argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 def redundant_arg_for_method(method_name); end # @return [Boolean] @@ -44345,22 +44812,25 @@ class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#99 def check_begin_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#57 + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#58 def check_branch(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#71 + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#79 + def check_case_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#74 def check_case_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#87 + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#95 def check_ensure_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#76 + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#84 def check_if_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#83 + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 def check_rescue_node(node); end end @@ -44555,7 +45025,7 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # # # good # a = b || c -# @example +# # # bad # if b # b @@ -44573,7 +45043,7 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # c # end # -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#33 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#32 class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector @@ -44691,13 +45161,13 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base def without_argument_parentheses_method?(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#39 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#36 RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) # Checks for redundant returning of true/false in conditionals. @@ -44846,16 +45316,19 @@ class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Bas include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#23 + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#24 def on_send(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#22 RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20 RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant uses of double splat hash braces. # # @example @@ -45134,7 +45607,7 @@ RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of superfluous `.rb` extension in # the filename provided to `require` and `require_relative`. # -# Note: If the extension is omitted, Ruby tries adding '.rb', '.so', +# NOTE: If the extension is omitted, Ruby tries adding '.rb', '.so', # and so on to the name until found. If the file named cannot be found, # a `LoadError` will be raised. # There is an edge case where `foo.so` file is loaded instead of a `LoadError` @@ -45544,6 +46017,37 @@ end # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) +# Before Ruby 3.0, interpolated strings followed the frozen string literal +# magic comment which sometimes made it necessary to explicitly unfreeze them. +# Ruby 3.0 changed interpolated strings to always be unfrozen which makes +# unfreezing them redundant. +# +# @example +# # bad +# +"#{foo} bar" +# +# # bad +# "#{foo} bar".dup +# +# # good +# "#{foo} bar" +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#21 +class RuboCop::Cop::Style::RedundantInterpolationUnfreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#32 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#26 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#28 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Check for redundant line continuation. # # This cop marks a line continuation as redundant if removing the backslash @@ -45611,47 +46115,47 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base include ::RuboCop::Cop::MatchRange extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#78 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#79 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#175 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#183 def argument_is_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#143 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#147 def argument_newline?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#101 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#102 def ends_with_backslash_without_comment?(source_line); end - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#155 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 def find_node_for_line(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#131 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#132 def inside_string_literal?(range, token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#109 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#110 def inside_string_literal_or_method_with_argument?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#117 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#118 def leading_dot_method_chain_with_blank_line?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#182 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#190 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -45661,38 +46165,41 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#139 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#140 def method_with_argument?(current_token, next_token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#123 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124 def redundant_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#93 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#94 def require_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#161 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#186 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#194 def start_with_arithmetic_operator?(source_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#106 def string_concatenation?(source_line); end end # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#77 +RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TAKING_FLOW_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) @@ -46000,38 +46507,39 @@ RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.un # # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#65 def determinist_regexp?(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#69 def preferred_argument(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#84 def replacement(regexp_node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#42 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#40 RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#44 RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) # Checks for unnecessary single-element Regexp character classes. @@ -46200,13 +46708,10 @@ class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#92 def delimiter?(node, char); end - # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. - # It's for compatibility with regexp_parser 1.8 and will never be maintained. - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#99 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#98 def each_escape(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#126 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#110 def escape_range_at_index(node, index); end end @@ -46293,31 +46798,34 @@ class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#175 def allow_multiple_return_values?; end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#164 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#170 def check_begin_node(node); end # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#110 def check_branch(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#144 + def check_case_match_node(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#139 def check_case_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#159 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#165 def check_ensure_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#143 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#149 def check_if_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#155 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#161 def check_resbody_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#150 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#156 def check_rescue_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#126 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#127 def check_return_node(node); end # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#80 @@ -46331,7 +46839,7 @@ class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#95 def hash_without_braces?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#179 def message(node); end end @@ -47501,9 +48009,9 @@ RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe( # `foo&.bar` can start returning `nil` as well as what the method # returns. # -# The default for `MaxChainLength` is `2` +# The default for `MaxChainLength` is `2`. # We have limited the cop to not register an offense for method chains -# that exceed this option is set. +# that exceed this option's value. # # @example # # bad @@ -47711,13 +48219,13 @@ class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/sample.rb#124 + # source://rubocop//lib/rubocop/cop/style/sample.rb#122 def correction(shuffle_arg, method, method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#140 + # source://rubocop//lib/rubocop/cop/style/sample.rb#138 def extract_source(args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#118 + # source://rubocop//lib/rubocop/cop/style/sample.rb#116 def message(shuffle_arg, method, method_args, range); end # @return [Boolean] @@ -47728,7 +48236,7 @@ class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/sample.rb#96 def range_size(range_node); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#131 + # source://rubocop//lib/rubocop/cop/style/sample.rb#129 def sample_arg(method, method_args); end # source://rubocop//lib/rubocop/cop/style/sample.rb#70 @@ -48009,12 +48517,12 @@ RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) # # @example # # bad -# Foo.send(:bar) -# quuz.send(:fred) +# Foo.send(bar) +# quuz.send(fred) # # # good -# Foo.__send__(:bar) -# quuz.public_send(:fred) +# Foo.__send__(bar) +# quuz.public_send(fred) # # source://rubocop//lib/rubocop/cop/style/send.rb#16 class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base @@ -48031,6 +48539,83 @@ RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/send.rb#18 RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Detects the use of the `public_send` method with a literal method name argument. +# Since the `send` method can be used to call private methods, by default, +# only the `public_send` method is detected. +# +# NOTE: Writer methods with names ending in `=` are always permitted because their +# behavior differs as follows: +# +# [source,ruby] +# ---- +# def foo=(foo) +# @foo = foo +# 42 +# end +# +# self.foo = 1 # => 1 +# send(:foo=, 1) # => 42 +# ---- +# +# @example +# # bad +# obj.public_send(:method_name) +# obj.public_send('method_name') +# +# # good +# obj.method_name +# @example AllowSend: true (default) +# # good +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# @example AllowSend: false +# # bad +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# +# # good +# obj.method_name +# +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 +class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#68 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#90 + def allow_send?; end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#94 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#98 + def removal_argument_range(first_argument, second_argument); end +end + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#60 +RuboCop::Cop::Style::SendWithLiteralMethodName::METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#57 +RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#61 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#58 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#59 +RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array) + # Checks for uses of `fail` and `raise`. # # @example EnforcedStyle: only_raise (default) @@ -48553,10 +49138,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#261 def allow_modifier?; end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 def arguments_range(node); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 @@ -48574,25 +49159,25 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#145 def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#175 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#181 def correct_for_comment(corrector, node, if_branch); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#136 def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#165 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#171 def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#190 def correct_outer_condition(corrector, condition); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#203 def insert_bang(corrector, node, is_modify_form); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#216 def insert_bang_for_and(corrector, node); end # @return [Boolean] @@ -48602,15 +49187,18 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#265 def outer_condition_modify_form?(node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#254 + def parenthesized_method_arguments(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244 def replace_condition(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#228 def require_parentheses?(condition); end # @return [Boolean] @@ -48623,7 +49211,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#239 def wrap_condition?(node); end class << self @@ -48640,13 +49228,30 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # will add a require statement to the top of the file if # enabled by RequireEnglish config. # -# Like `use_perl_names` but allows builtin global vars. -# +# @example EnforcedStyle: use_english_names (default) # # good +# require 'English' # or this could be in another file. +# # puts $LOAD_PATH # puts $LOADED_FEATURES # puts $PROGRAM_NAME -# puts ARGV +# puts $ERROR_INFO +# puts $ERROR_POSITION +# puts $FIELD_SEPARATOR # or $FS +# puts $OUTPUT_FIELD_SEPARATOR # or $OFS +# puts $INPUT_RECORD_SEPARATOR # or $RS +# puts $OUTPUT_RECORD_SEPARATOR # or $ORS +# puts $INPUT_LINE_NUMBER # or $NR +# puts $LAST_READ_LINE +# puts $DEFAULT_OUTPUT +# puts $DEFAULT_INPUT +# puts $PROCESS_ID # or $PID +# puts $CHILD_STATUS +# puts $LAST_MATCH_INFO +# puts $IGNORECASE +# puts $ARGV # or ARGV +# @example EnforcedStyle: use_perl_names +# # good # puts $: # puts $" # puts $0 @@ -48665,31 +49270,14 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # puts $~ # puts $= # puts $* +# @example EnforcedStyle: use_builtin_english_names # -# @example EnforcedStyle: use_english_names (default) # # good -# require 'English' # or this could be in another file. -# +# # Like `use_perl_names` but allows builtin global vars. # puts $LOAD_PATH # puts $LOADED_FEATURES # puts $PROGRAM_NAME -# puts $ERROR_INFO -# puts $ERROR_POSITION -# puts $FIELD_SEPARATOR # or $FS -# puts $OUTPUT_FIELD_SEPARATOR # or $OFS -# puts $INPUT_RECORD_SEPARATOR # or $RS -# puts $OUTPUT_RECORD_SEPARATOR # or $ORS -# puts $INPUT_LINE_NUMBER # or $NR -# puts $LAST_READ_LINE -# puts $DEFAULT_OUTPUT -# puts $DEFAULT_INPUT -# puts $PROCESS_ID # or $PID -# puts $CHILD_STATUS -# puts $LAST_MATCH_INFO -# puts $IGNORECASE -# puts $ARGV # or ARGV -# @example EnforcedStyle: use_perl_names -# # good +# puts ARGV # puts $: # puts $" # puts $0 @@ -48708,90 +49296,89 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # puts $~ # puts $= # puts $* -# @example EnforcedStyle: use_builtin_english_names # -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#87 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#86 class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::RequireLibrary extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#176 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#175 def autocorrect(corrector, node, global_var); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#168 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#167 def message(global_var); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#152 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#151 def on_gvar(node); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#147 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#146 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#247 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#246 def add_require_english?; end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#241 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#240 def english_name_replacement(preferred_name, node); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#190 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#189 def format_english_message(global_var); end # For now, we assume that lists are 2 items or less. Easy grammar! # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#212 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#211 def format_list(items); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#198 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#197 def format_message(english, regular, global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#235 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#234 def matching_styles(global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#227 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#226 def preferred_names(global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#216 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#215 def replacement(node, global_var); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#251 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#250 def should_require_english?(global_var); end end -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#128 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#127 RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#100 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#99 RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#145 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#144 RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#93 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#92 RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#96 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#95 RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#98 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97 RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String) # Anything *not* in this set is provided by the English library. # -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#122 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#121 RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#124 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#123 RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#139 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#138 RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) # Check for parentheses around stabby lambda arguments. @@ -49393,6 +49980,118 @@ end # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) +# Checks for redundant argument forwarding when calling super with arguments identical to +# the method definition. +# +# Using zero arity `super` within a `define_method` block results in `RuntimeError`: +# +# [source,ruby] +# ---- +# def m +# define_method(:foo) { super() } # => OK +# end +# +# def m +# define_method(:foo) { super } # => RuntimeError +# end +# ---- +# +# Furthermore, any arguments accompanied by a block may potentially be delegating to +# `define_method`, therefore, `super` used within these blocks will be allowed. +# This approach might result in false negatives, yet ensuring safe detection takes precedence. +# +# @example +# # bad +# def method(*args, **kwargs) +# super(*args, **kwargs) +# end +# +# # good - implicitly passing all arguments +# def method(*args, **kwargs) +# super +# end +# +# # good - forwarding a subset of the arguments +# def method(*args, **kwargs) +# super(*args) +# end +# +# # good - forwarding no arguments +# def method(*args, **kwargs) +# super() +# end +# +# # good - assigning to the block variable before calling super +# def method(&block) +# # Assigning to the block variable would pass the old value to super, +# # under this circumstance the block must be referenced explicitly. +# block ||= proc { 'fallback behavior' } +# super(&block) +# end +# +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#54 +class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62 + def on_super(super_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#81 + def arguments_identical?(def_node, def_args, super_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#136 + def block_arg_same?(def_node, def_arg, super_arg); end + + # Reassigning the block argument will still pass along the original block to super + # https://bugs.ruby-lang.org/issues/20505 + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#147 + def block_reassigned?(def_node, block_arg_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#158 + def forward_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#116 + def keyword_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#126 + def keyword_rest_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#99 + def positional_arg_same?(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#106 + def positional_rest_arg_same(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#162 + def preprocess_super_args(super_args); end +end + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#58 +RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#57 +RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#60 +RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) + # Enforces the presence of parentheses in `super` containing arguments. # # `super` is a keyword and is provided as a distinct cop from those designed for method call. @@ -49616,9 +50315,11 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # `define_method?` methods are allowed by default. # These are customizable with `AllowedMethods` option. # -# @example AllowedPatterns: ['map'] (default) +# @example AllCops:ActiveSupportExtensionsEnabled: true # # good -# something.map { |s| s.upcase } +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } # @example AllowMethodsWithArguments: false (default) # # bad # something.do_something(foo) { |o| o.bar } @@ -49648,6 +50349,19 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # @example AllowedPatterns: [] (default) # # bad # something.map { |s| s.upcase } +# @example AllowedPatterns: ['map'] (default) +# # good +# something.map { |s| s.upcase } +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # bad +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } +# +# # good +# lambda(&:foo) +# proc(&:foo) +# Proc.new(&:foo) # @example # # bad # something.map { |s| s.upcase } @@ -49656,7 +50370,7 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # # good # something.map(&:upcase) # -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#123 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp include ::RuboCop::Cop::RangeHelp @@ -49666,117 +50380,123 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#172 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 def destructuring_block_argument?(argument_node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#134 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 def proc_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#158 def symbol_proc?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#137 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 def symbol_proc_receiver?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#274 def allow_comments?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#236 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#270 def allow_if_method_has_argument?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#187 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 def allowed_method_name?(name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#212 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#247 + def autocorrect_lambda_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#238 def autocorrect_with_args(corrector, node, args, method_name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225 def autocorrect_without_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#226 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#260 def begin_pos_for_replacement(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#221 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#255 def block_range_with_space(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#191 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 def register_offense(node, method_name, block_method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#183 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 def unsafe_array_usage?(node); end # See: https://github.com/rubocop/rubocop/issues/10864 # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#179 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#196 def unsafe_hash_usage?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#165 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#130 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#149 +RuboCop::Cop::Style::SymbolProc::LAMBDA_OR_PROC = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#131 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#148 RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#500 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#499 class RuboCop::Cop::Style::TernaryCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#505 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#504 def correct(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#509 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#508 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#523 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#522 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#536 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#535 def element_assignment?(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#540 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#539 def extract_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#553 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#552 def move_branch_inside_condition(corrector, branch, assignment); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#548 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#547 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#527 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#526 def ternary(node); end end end @@ -51018,7 +51738,6 @@ RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) # while x.any? # do_something(x.pop) # end -# @example # # # bad # until x.empty? do @@ -51030,18 +51749,18 @@ RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) # do_something(x.pop) # end # -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#31 +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#29 class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 def on_while(node); end end -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#32 RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # Checks for while and until statements that would fit on one line @@ -51056,7 +51775,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # # # good # x += 1 while x < 10 -# @example +# # # bad # until x > 10 # x += 1 @@ -51073,7 +51792,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # x += 100 # end # -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#36 +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#35 class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp @@ -51081,14 +51800,14 @@ class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 def on_while(node); end end -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#39 RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) # Checks for array literals made up of word-like @@ -51508,39 +52227,42 @@ class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base # implement `#size`, but not `#empty`. We ignore those to # reduce false positives. # - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#139 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#147 def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#109 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 def nonzero_length_comparison(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#51 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 - def other_receiver(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#138 + def other_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#106 def zero_length_comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#96 - def zero_length_predicate(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 + def zero_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#122 - def zero_length_receiver(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 + def zero_length_predicate?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#80 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#85 def check_nonzero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#65 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#70 def check_zero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#53 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#58 def check_zero_length_predicate(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#119 def replacement(node); end end @@ -51687,12 +52409,12 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#51 def errors; end - # source://rubocop//lib/rubocop/cop/team.rb#114 + # source://rubocop//lib/rubocop/cop/team.rb#122 def external_dependency_checksum; end # @deprecated # - # source://rubocop//lib/rubocop/cop/team.rb#110 + # source://rubocop//lib/rubocop/cop/team.rb#114 def forces; end # source://rubocop//lib/rubocop/cop/team.rb#76 @@ -51700,7 +52422,7 @@ class RuboCop::Cop::Team # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#81 + # source://rubocop//lib/rubocop/cop/team.rb#85 def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # Returns the value of attribute updated_source_file. @@ -51720,57 +52442,57 @@ class RuboCop::Cop::Team private - # source://rubocop//lib/rubocop/cop/team.rb#121 + # source://rubocop//lib/rubocop/cop/team.rb#133 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop//lib/rubocop/cop/team.rb#182 + # source://rubocop//lib/rubocop/cop/team.rb#197 def autocorrect_report(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#140 + # source://rubocop//lib/rubocop/cop/team.rb#152 def be_ready; end - # source://rubocop//lib/rubocop/cop/team.rb#188 + # source://rubocop//lib/rubocop/cop/team.rb#203 def collate_corrections(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#204 + # source://rubocop//lib/rubocop/cop/team.rb#219 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#254 + # source://rubocop//lib/rubocop/cop/team.rb#271 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#246 + # source://rubocop//lib/rubocop/cop/team.rb#263 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#154 + # source://rubocop//lib/rubocop/cop/team.rb#166 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#231 + # source://rubocop//lib/rubocop/cop/team.rb#246 def process_errors(file, errors); end - # source://rubocop//lib/rubocop/cop/team.rb#148 + # source://rubocop//lib/rubocop/cop/team.rb#160 def reset; end # @return [Array<cop>] # - # source://rubocop//lib/rubocop/cop/team.rb#160 + # source://rubocop//lib/rubocop/cop/team.rb#172 def roundup_relevant_cops(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#176 + # source://rubocop//lib/rubocop/cop/team.rb#188 def support_target_rails_version?(cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#170 + # source://rubocop//lib/rubocop/cop/team.rb#182 def support_target_ruby_version?(cop); end - # source://rubocop//lib/rubocop/cop/team.rb#219 + # source://rubocop//lib/rubocop/cop/team.rb#234 def suppress_clobbering; end - # source://rubocop//lib/rubocop/cop/team.rb#225 + # source://rubocop//lib/rubocop/cop/team.rb#240 def validate_config; end class << self @@ -52021,19 +52743,19 @@ module RuboCop::Cop::Util private - # source://rubocop//lib/rubocop/cop/util.rb#35 + # source://rubocop//lib/rubocop/cop/util.rb#39 def add_parentheses(node, corrector); end - # source://rubocop//lib/rubocop/cop/util.rb#56 + # source://rubocop//lib/rubocop/cop/util.rb#60 def any_descendant?(node, *types); end - # source://rubocop//lib/rubocop/cop/util.rb#71 + # source://rubocop//lib/rubocop/cop/util.rb#75 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/util.rb#83 + # source://rubocop//lib/rubocop/cop/util.rb#87 def args_end(node); end - # source://rubocop//lib/rubocop/cop/util.rb#104 + # source://rubocop//lib/rubocop/cop/util.rb#108 def begins_its_line?(range); end # This is a bad API @@ -52046,78 +52768,78 @@ module RuboCop::Cop::Util # source://rubocop//lib/rubocop/cop/util.rb#22 def comment_lines?(node); end - # source://rubocop//lib/rubocop/cop/util.rb#192 + # source://rubocop//lib/rubocop/cop/util.rb#198 def compatible_external_encoding_for?(src); end # If converting a string to Ruby string literal source code, must # double quotes be used? # - # source://rubocop//lib/rubocop/cop/util.rb#130 + # source://rubocop//lib/rubocop/cop/util.rb#134 def double_quotes_required?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#144 + # source://rubocop//lib/rubocop/cop/util.rb#148 def escape_string(string); end # Returns, for example, a bare `if` node if the given node is an `if` # with calls chained to the end of it. # - # source://rubocop//lib/rubocop/cop/util.rb#114 + # source://rubocop//lib/rubocop/cop/util.rb#118 def first_part_of_call_chain(node); end - # source://rubocop//lib/rubocop/cop/util.rb#197 + # source://rubocop//lib/rubocop/cop/util.rb#203 def include_or_equal?(source, target); end - # source://rubocop//lib/rubocop/cop/util.rb#179 + # source://rubocop//lib/rubocop/cop/util.rb#185 def indent(node, offset: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/util.rb#161 + # source://rubocop//lib/rubocop/cop/util.rb#165 def interpret_string_escapes(string); end - # source://rubocop//lib/rubocop/cop/util.rb#165 + # source://rubocop//lib/rubocop/cop/util.rb#169 def line(node_or_range); end - # source://rubocop//lib/rubocop/cop/util.rb#26 + # source://rubocop//lib/rubocop/cop/util.rb#30 def line_range(node); end - # source://rubocop//lib/rubocop/cop/util.rb#140 + # source://rubocop//lib/rubocop/cop/util.rb#144 def needs_escaping?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#87 + # source://rubocop//lib/rubocop/cop/util.rb#91 def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end - # source://rubocop//lib/rubocop/cop/util.rb#30 + # source://rubocop//lib/rubocop/cop/util.rb#34 def parentheses?(node); end - # source://rubocop//lib/rubocop/cop/util.rb#173 + # source://rubocop//lib/rubocop/cop/util.rb#177 def same_line?(node1, node2); end - # source://rubocop//lib/rubocop/cop/util.rb#148 + # source://rubocop//lib/rubocop/cop/util.rb#152 def to_string_literal(string); end - # source://rubocop//lib/rubocop/cop/util.rb#185 + # source://rubocop//lib/rubocop/cop/util.rb#191 def to_supported_styles(enforced_style); end - # source://rubocop//lib/rubocop/cop/util.rb#157 + # source://rubocop//lib/rubocop/cop/util.rb#161 def trim_string_interpolation_escape_character(str); end class << self - # source://rubocop//lib/rubocop/cop/util.rb#35 + # source://rubocop//lib/rubocop/cop/util.rb#39 def add_parentheses(node, corrector); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#56 + # source://rubocop//lib/rubocop/cop/util.rb#60 def any_descendant?(node, *types); end - # source://rubocop//lib/rubocop/cop/util.rb#71 + # source://rubocop//lib/rubocop/cop/util.rb#75 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/util.rb#83 + # source://rubocop//lib/rubocop/cop/util.rb#87 def args_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#104 + # source://rubocop//lib/rubocop/cop/util.rb#108 def begins_its_line?(range); end # This is a bad API @@ -52138,62 +52860,62 @@ module RuboCop::Cop::Util # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#130 + # source://rubocop//lib/rubocop/cop/util.rb#134 def double_quotes_required?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#144 + # source://rubocop//lib/rubocop/cop/util.rb#148 def escape_string(string); end # Returns, for example, a bare `if` node if the given node is an `if` # with calls chained to the end of it. # - # source://rubocop//lib/rubocop/cop/util.rb#114 + # source://rubocop//lib/rubocop/cop/util.rb#118 def first_part_of_call_chain(node); end - # source://rubocop//lib/rubocop/cop/util.rb#179 + # source://rubocop//lib/rubocop/cop/util.rb#185 def indent(node, offset: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/util.rb#161 + # source://rubocop//lib/rubocop/cop/util.rb#165 def interpret_string_escapes(string); end - # source://rubocop//lib/rubocop/cop/util.rb#165 + # source://rubocop//lib/rubocop/cop/util.rb#169 def line(node_or_range); end - # source://rubocop//lib/rubocop/cop/util.rb#26 + # source://rubocop//lib/rubocop/cop/util.rb#30 def line_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#140 + # source://rubocop//lib/rubocop/cop/util.rb#144 def needs_escaping?(string); end # @yield [sexp] # - # source://rubocop//lib/rubocop/cop/util.rb#87 + # source://rubocop//lib/rubocop/cop/util.rb#91 def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#30 + # source://rubocop//lib/rubocop/cop/util.rb#34 def parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#173 + # source://rubocop//lib/rubocop/cop/util.rb#177 def same_line?(node1, node2); end - # source://rubocop//lib/rubocop/cop/util.rb#148 + # source://rubocop//lib/rubocop/cop/util.rb#152 def to_string_literal(string); end - # source://rubocop//lib/rubocop/cop/util.rb#185 + # source://rubocop//lib/rubocop/cop/util.rb#191 def to_supported_styles(enforced_style); end - # source://rubocop//lib/rubocop/cop/util.rb#157 + # source://rubocop//lib/rubocop/cop/util.rb#161 def trim_string_interpolation_escape_character(str); end end end -# source://rubocop//lib/rubocop/cop/util.rb#99 +# source://rubocop//lib/rubocop/cop/util.rb#103 RuboCop::Cop::Util::LINE_BEGINS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) # Match literal regex characters, not including anchors, character @@ -52205,7 +52927,7 @@ RuboCop::Cop::Util::LITERAL_REGEX = T.let(T.unsafe(nil), Regexp) # Arbitrarily chosen value, should be enough to cover # the most nested source code in real world projects. # -# source://rubocop//lib/rubocop/cop/util.rb#98 +# source://rubocop//lib/rubocop/cop/util.rb#102 RuboCop::Cop::Util::MAX_LINE_BEGINS_REGEX_INDEX = T.let(T.unsafe(nil), Integer) # source://rubocop//lib/rubocop/cop/utils/format_string.rb#5 @@ -52438,59 +53160,59 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#76 + # source://rubocop//lib/rubocop/cop/variable_force.rb#79 def investigate(processed_source); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#85 + # source://rubocop//lib/rubocop/cop/variable_force.rb#88 def process_node(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#71 + # source://rubocop//lib/rubocop/cop/variable_force.rb#74 def variable_table; end private - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_leaving_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_leaving_scope(arg); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#339 + # source://rubocop//lib/rubocop/cop/variable_force.rb#351 def descendant_reference(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#329 + # source://rubocop//lib/rubocop/cop/variable_force.rb#341 def each_descendant_reference(loop_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#314 + # source://rubocop//lib/rubocop/cop/variable_force.rb#326 def find_variables_in_loop(loop_node); end # This is called for each scope recursively. # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#94 + # source://rubocop//lib/rubocop/cop/variable_force.rb#97 def inspect_variables_in_scope(scope_node); end # Mark all assignments which are referenced in the same loop @@ -52499,104 +53221,109 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#295 + # source://rubocop//lib/rubocop/cop/variable_force.rb#307 def mark_assignments_as_referenced_in_loop(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#126 + # source://rubocop//lib/rubocop/cop/variable_force.rb#130 def node_handler_method_name(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#100 + # source://rubocop//lib/rubocop/cop/variable_force.rb#103 def process_children(origin_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#231 + # source://rubocop//lib/rubocop/cop/variable_force.rb#243 def process_loop(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#160 + # source://rubocop//lib/rubocop/cop/variable_force.rb#182 + def process_pattern_match_variable(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#164 def process_regexp_named_captures(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#246 + # source://rubocop//lib/rubocop/cop/variable_force.rb#258 def process_rescue(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#265 + # source://rubocop//lib/rubocop/cop/variable_force.rb#277 def process_scope(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#284 + # source://rubocop//lib/rubocop/cop/variable_force.rb#296 def process_send(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#142 + # source://rubocop//lib/rubocop/cop/variable_force.rb#146 def process_variable_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#130 + # source://rubocop//lib/rubocop/cop/variable_force.rb#134 def process_variable_declaration(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#219 + # source://rubocop//lib/rubocop/cop/variable_force.rb#231 def process_variable_multiple_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#184 + # source://rubocop//lib/rubocop/cop/variable_force.rb#196 def process_variable_operator_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#226 + # source://rubocop//lib/rubocop/cop/variable_force.rb#238 def process_variable_referencing(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#257 + # source://rubocop//lib/rubocop/cop/variable_force.rb#269 def process_zero_arity_super(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#178 + # source://rubocop//lib/rubocop/cop/variable_force.rb#190 def regexp_captured_names(node); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#351 + # source://rubocop//lib/rubocop/cop/variable_force.rb#363 def scanned_node?(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#355 + # source://rubocop//lib/rubocop/cop/variable_force.rb#367 def scanned_nodes; end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#108 + # source://rubocop//lib/rubocop/cop/variable_force.rb#111 def skip_children!; end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#278 + # source://rubocop//lib/rubocop/cop/variable_force.rb#290 def twisted_nodes(node); end end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#32 +# source://rubocop//lib/rubocop/cop/variable_force.rb#35 RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) # This class represents each assignment of a variable. @@ -52708,12 +53435,12 @@ RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T. # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#65 +# source://rubocop//lib/rubocop/cop/variable_force.rb#68 class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#66 + # source://rubocop//lib/rubocop/cop/variable_force.rb#69 def assignment?; end # Returns the value of attribute node @@ -53153,32 +53880,37 @@ end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#39 +# source://rubocop//lib/rubocop/cop/variable_force.rb#42 RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#48 +# source://rubocop//lib/rubocop/cop/variable_force.rb#51 RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#42 +# source://rubocop//lib/rubocop/cop/variable_force.rb#45 RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#112 +# source://rubocop//lib/rubocop/cop/variable_force.rb#115 RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#40 +# source://rubocop//lib/rubocop/cop/variable_force.rb#43 RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#47 +# source://rubocop//lib/rubocop/cop/variable_force.rb#30 +RuboCop::Cop::VariableForce::PATTERN_MATCH_VARIABLE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#50 RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -53188,12 +53920,12 @@ RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Sy # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#50 +# source://rubocop//lib/rubocop/cop/variable_force.rb#53 RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#43 +# source://rubocop//lib/rubocop/cop/variable_force.rb#46 RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) # This class represents each reference of a variable. @@ -53243,12 +53975,12 @@ RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsaf # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#55 +# source://rubocop//lib/rubocop/cop/variable_force.rb#58 RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#57 +# source://rubocop//lib/rubocop/cop/variable_force.rb#60 RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) # A Scope represents a context of local variable visibility. @@ -53327,7 +54059,7 @@ RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(n # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#54 +# source://rubocop//lib/rubocop/cop/variable_force.rb#57 RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -53337,12 +54069,12 @@ RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Sym # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#30 +# source://rubocop//lib/rubocop/cop/variable_force.rb#31 RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#45 +# source://rubocop//lib/rubocop/cop/variable_force.rb#48 RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) # A Variable represents existence of a local variable. @@ -53459,12 +54191,12 @@ RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsa # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#59 +# source://rubocop//lib/rubocop/cop/variable_force.rb#62 class RuboCop::Cop::VariableForce::VariableReference < ::Struct # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#60 + # source://rubocop//lib/rubocop/cop/variable_force.rb#63 def assignment?; end # Returns the value of attribute name @@ -53546,7 +54278,7 @@ end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#52 +# source://rubocop//lib/rubocop/cop/variable_force.rb#55 RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) # Help methods for determining node visibility. @@ -53600,171 +54332,176 @@ RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set) class RuboCop::DirectiveComment # @return [DirectiveComment] a new instance of DirectiveComment # - # source://rubocop//lib/rubocop/directive_comment.rb#30 + # source://rubocop//lib/rubocop/directive_comment.rb#32 def initialize(comment, cop_registry = T.unsafe(nil)); end # Checks if all cops specified in this directive # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#80 + # source://rubocop//lib/rubocop/directive_comment.rb#82 def all_cops?; end # Returns the value of attribute comment. # - # source://rubocop//lib/rubocop/directive_comment.rb#28 + # source://rubocop//lib/rubocop/directive_comment.rb#30 def comment; end # Returns array of specified in this directive cop names # - # source://rubocop//lib/rubocop/directive_comment.rb#85 + # source://rubocop//lib/rubocop/directive_comment.rb#87 def cop_names; end # Returns the value of attribute cop_registry. # - # source://rubocop//lib/rubocop/directive_comment.rb#28 + # source://rubocop//lib/rubocop/directive_comment.rb#30 def cop_registry; end # Returns the value of attribute cops. # - # source://rubocop//lib/rubocop/directive_comment.rb#28 + # source://rubocop//lib/rubocop/directive_comment.rb#30 def cops; end # Returns array of specified in this directive department names # when all department disabled # - # source://rubocop//lib/rubocop/directive_comment.rb#91 + # source://rubocop//lib/rubocop/directive_comment.rb#93 def department_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#105 + # source://rubocop//lib/rubocop/directive_comment.rb#107 def directive_count; end # Checks if this directive disables cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#60 + # source://rubocop//lib/rubocop/directive_comment.rb#62 def disabled?; end # Checks if this directive disables all cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#75 + # source://rubocop//lib/rubocop/directive_comment.rb#77 def disabled_all?; end # Checks if this directive enables cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#65 + # source://rubocop//lib/rubocop/directive_comment.rb#67 def enabled?; end # Checks if this directive enables all cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#70 + # source://rubocop//lib/rubocop/directive_comment.rb#72 def enabled_all?; end # Checks if directive departments include cop # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#96 + # source://rubocop//lib/rubocop/directive_comment.rb#98 def in_directive_department?(cop); end # Returns line number for directive # - # source://rubocop//lib/rubocop/directive_comment.rb#110 + # source://rubocop//lib/rubocop/directive_comment.rb#112 def line_number; end # Checks if this directive contains all the given cop names # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#42 + # source://rubocop//lib/rubocop/directive_comment.rb#44 def match?(cop_names); end # Returns match captures to directive comment pattern # - # source://rubocop//lib/rubocop/directive_comment.rb#55 + # source://rubocop//lib/rubocop/directive_comment.rb#57 def match_captures; end # Returns the value of attribute mode. # - # source://rubocop//lib/rubocop/directive_comment.rb#28 + # source://rubocop//lib/rubocop/directive_comment.rb#30 def mode; end # Checks if cop department has already used in directive comment # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#101 + # source://rubocop//lib/rubocop/directive_comment.rb#103 def overridden_by_department?(cop); end - # source://rubocop//lib/rubocop/directive_comment.rb#46 + # source://rubocop//lib/rubocop/directive_comment.rb#48 def range; end # Checks if this directive relates to single line # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#37 + # source://rubocop//lib/rubocop/directive_comment.rb#39 def single_line?; end private - # source://rubocop//lib/rubocop/directive_comment.rb#130 + # source://rubocop//lib/rubocop/directive_comment.rb#133 def all_cop_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#134 + # source://rubocop//lib/rubocop/directive_comment.rb#137 def cop_names_for_department(department); end # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#126 + # source://rubocop//lib/rubocop/directive_comment.rb#129 def department?(name); end - # source://rubocop//lib/rubocop/directive_comment.rb#140 - def exclude_redundant_directive_cop(cops); end + # source://rubocop//lib/rubocop/directive_comment.rb#142 + def exclude_lint_department_cops(cops); end - # source://rubocop//lib/rubocop/directive_comment.rb#120 + # source://rubocop//lib/rubocop/directive_comment.rb#122 def parsed_cop_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#116 + # source://rubocop//lib/rubocop/directive_comment.rb#118 def splitted_cops_string; end class << self - # source://rubocop//lib/rubocop/directive_comment.rb#24 + # source://rubocop//lib/rubocop/directive_comment.rb#26 def before_comment(line); end end end # @api private # -# source://rubocop//lib/rubocop/directive_comment.rb#17 +# source://rubocop//lib/rubocop/directive_comment.rb#19 RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/directive_comment.rb#15 +# source://rubocop//lib/rubocop/directive_comment.rb#17 RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/directive_comment.rb#13 +# source://rubocop//lib/rubocop/directive_comment.rb#15 RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#9 +RuboCop::DirectiveComment::LINT_DEPARTMENT = T.let(T.unsafe(nil), String) + # @api private # # source://rubocop//lib/rubocop/directive_comment.rb#11 -RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) +RuboCop::DirectiveComment::LINT_REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/directive_comment.rb#9 -RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP_DEPARTMENT = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/directive_comment.rb#13 +RuboCop::DirectiveComment::LINT_SYNTAX_COP = T.let(T.unsafe(nil), String) # An Error exception is different from an Offense with severity 'error' # When this exception is raised, it means that RuboCop is unable to perform @@ -53886,13 +54623,10 @@ end # # source://rubocop//lib/rubocop/ext/regexp_node.rb#6 module RuboCop::Ext::RegexpNode - # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. - # It's for compatibility with regexp_parser 1.8 and will never be maintained. - # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#19 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#18 def assign_properties(*_arg0); end - # source://rubocop//lib/rubocop/ext/regexp_node.rb#53 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#31 def each_capture(named: T.unsafe(nil)); end # Note: we extend Regexp nodes to provide `loc` and `expression` @@ -53907,10 +54641,10 @@ module RuboCop::Ext::RegexpNode # @return [Boolean] # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#65 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#43 def named_capturing?(exp, event, named); end - # source://rubocop//lib/rubocop/ext/regexp_node.rb#73 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#51 def with_interpolations_blanked; end end @@ -53931,7 +54665,7 @@ module RuboCop::Ext::RegexpParser::Expression; end module RuboCop::Ext::RegexpParser::Expression::Base # Shortcut to `loc.expression` # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#27 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#26 def expression; end # E.g. @@ -53944,7 +54678,7 @@ module RuboCop::Ext::RegexpParser::Expression::Base # # Please open issue if you need other locations # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#61 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#44 def loc; end # Returns the value of attribute origin. @@ -53961,15 +54695,15 @@ module RuboCop::Ext::RegexpParser::Expression::Base private - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#67 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#50 def build_location; end end # Provide `CharacterSet` with `begin` and `end` locations. # -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#79 +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#62 module RuboCop::Ext::RegexpParser::Expression::CharacterSet - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#80 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#63 def build_location; end end @@ -54282,10 +55016,10 @@ class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleText private - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#51 + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#47 def report_highlighted_area(highlighted_area); end - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#41 + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 def report_line(location); end # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#17 @@ -54293,7 +55027,7 @@ class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleText # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#33 def valid_line?(offense); end end @@ -54368,16 +55102,16 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 def command; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#165 def cop_config_params(default_cfg, cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#181 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 def default_config(cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#225 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#229 def excludes(offending_files, cop_name, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#196 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#200 def filtered_config(cfg); end # Returns true if the given arr include the given elm or if any of the @@ -54385,38 +55119,38 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#273 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#277 def include_or_match?(arr, elm); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#246 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 def merge_mode_for_exclude?(cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#271 def no_exclude_limit?; end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#102 def output_cop(cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#133 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#137 def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#189 def output_cop_config(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#168 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#172 def output_cop_param_comments(output_buffer, params, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#215 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#219 def output_exclude_list(output_buffer, offending_files, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#254 def output_exclude_path(output_buffer, exclude_path, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#204 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#208 def output_offending_files(output_buffer, cfg, cop_name); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#96 @@ -54424,12 +55158,17 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#263 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 def safe_autocorrect?(config); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#116 def set_max(cfg, cop_name); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#125 + def should_set_max?(cop_name); end + # @return [Boolean] # # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#65 @@ -54442,12 +55181,12 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#153 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 def supports_safe_autocorrect?(cop_class, default_cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 def supports_unsafe_autocorrect?(cop_class, default_cfg); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 @@ -54520,43 +55259,46 @@ end class RuboCop::Formatter::FormatterSet < ::Array # @return [FormatterSet] a new instance of FormatterSet # - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#39 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#40 def initialize(options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#55 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#56 def add_formatter(formatter_type, output_path = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#67 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#68 def close_output_files; end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#50 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#51 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#44 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#45 def file_started(file, options); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 def finished(*args); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 def started(*args); end private - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#86 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#87 def builtin_formatter_class(specified_key); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#99 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#105 def custom_formatter_class(specified_class_name); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#75 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#76 def formatter_class(formatter_type); end end # source://rubocop//lib/rubocop/formatter/formatter_set.rb#11 RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#31 +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#30 +RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTER_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#32 RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) # This formatter displays a progress bar and shows details of offenses as @@ -54628,33 +55370,49 @@ RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Ha class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter # @return [HTMLFormatter] a new instance of HTMLFormatter # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#29 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#38 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#39 def file_finished(file, offenses); end # Returns the value of attribute files. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#26 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#43 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#44 def finished(inspected_files); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#49 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#50 def render_html; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#34 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#35 def started(target_files); end # Returns the value of attribute summary. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#26 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#27 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#13 +# This class provides helper methods used in the ERB CSS template. +# +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#137 +class RuboCop::Formatter::HTMLFormatter::CSSContext + # Make Kernel#binding public. + # + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#148 + def binding; end +end + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#138 +RuboCop::Formatter::HTMLFormatter::CSSContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 +RuboCop::Formatter::HTMLFormatter::CSS_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # Returns the value of attribute alpha # @@ -54678,7 +55436,7 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # @return [Object] the newly set value def blue=(_); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#18 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#19 def fade_out(amount); end # Returns the value of attribute green @@ -54703,7 +55461,7 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # @return [Object] the newly set value def red=(_); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 def to_s; end class << self @@ -54720,63 +55478,63 @@ RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) # This class provides helper methods used in the ERB template. # -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#60 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#63 class RuboCop::Formatter::HTMLFormatter::ERBContext include ::RuboCop::PathUtil include ::RuboCop::Formatter::TextUtil # @return [ERBContext] a new instance of ERBContext # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#71 def initialize(files, summary); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#123 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#118 def base64_encoded_logo_image; end # Make Kernel#binding public. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 def binding; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#88 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83 def decorated_message(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#119 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#114 def escape(string); end # Returns the value of attribute files. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#74 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#99 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 def highlight_source_tag(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#92 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#87 def highlighted_source_line(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#115 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110 def possible_ellipses(location); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110 - def source_after_highlight(offense); end + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#126 + def render_css; end # source://rubocop//lib/rubocop/formatter/html_formatter.rb#105 + def source_after_highlight(offense); end + + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#100 def source_before_highlight(offense); end # Returns the value of attribute summary. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#74 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#72 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#67 RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#64 -RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) - -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct # Returns the value of attribute offenses # @@ -54809,7 +55567,7 @@ class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#23 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct # Returns the value of attribute inspected_files # @@ -54901,40 +55659,92 @@ end # This formatter formats the report data in JUnit format. # -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#17 +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#15 class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter # @return [JUnitFormatter] a new instance of JUnitFormatter # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#18 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#24 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#55 - def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#64 - def classname_attribute_value(file); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#29 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#32 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#71 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 def finished(_inspected_files); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 + private + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#106 + def add_failure_to(testcase, offenses, cop_name); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#85 + def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#94 + def classname_attribute_value(file); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#81 def offenses_for_cop(all_offenses, cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#47 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#77 def relevant_for_output?(options, target_offenses); end - private + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#101 + def reset_count; end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#83 - def add_failure_to(testcase, offenses, cop_name); end + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#118 + def xml_escape(string); end +end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#78 - def reset_count; end +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#16 +RuboCop::Formatter::JUnitFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#132 +class RuboCop::Formatter::JUnitFormatter::FailureElement + # @return [FailureElement] a new instance of FailureElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#135 + def initialize(type:, message:, text:); end + + # Returns the value of attribute message. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def message; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def text; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def type; end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#122 +class RuboCop::Formatter::JUnitFormatter::TestCaseElement + # @return [TestCaseElement] a new instance of TestCaseElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#125 + def initialize(classname:, name:); end + + # Returns the value of attribute classname. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def classname; end + + # Returns the value of attribute failures. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def failures; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def name; end end # This formatter displays the report data in markdown @@ -55001,6 +55811,9 @@ end # # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#16 class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#81 + def cop_information(cop_name); end + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#42 def file_finished(_file, offenses); end @@ -55012,7 +55825,7 @@ class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseForm # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#17 def offense_counts; end - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#74 + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#73 def ordered_offense_counts(offense_counts); end # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#56 @@ -55021,7 +55834,7 @@ class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseForm # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#19 def started(target_files); end - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#78 + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#77 def total_offense_count(offense_counts); end end @@ -55217,10 +56030,10 @@ class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatt private - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#62 def annotate_message(msg); end - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#70 + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 def message(offense); end # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39 @@ -55287,50 +56100,63 @@ end # source://rubocop//lib/rubocop/options.rb#8 class RuboCop::IncorrectCopNameError < ::StandardError; end -# Encapsulation of a lockfile for use when checking for gems. -# Does not actually resolve gems, just parses the lockfile. -# -# @api private +# The RuboCop's built-in LSP module. # -# source://rubocop//lib/rubocop/lockfile.rb#7 -class RuboCop::Lockfile - # Gems that the bundle depends on +# source://rubocop//lib/rubocop/lsp.rb#5 +module RuboCop::LSP + private + + # Disable LSP. # - # @api private + # @return [void] # - # source://rubocop//lib/rubocop/lockfile.rb#9 - def dependencies; end + # source://rubocop//lib/rubocop/lsp.rb#25 + def disable(&block); end - # All activated gems, including transitive dependencies + # Enable LSP. # - # @api private + # @return [void] # - # source://rubocop//lib/rubocop/lockfile.rb#16 - def gems; end + # source://rubocop//lib/rubocop/lsp.rb#18 + def enable; end - # @api private + # Returns true when LSP is enabled, false when disabled. + # # @return [Boolean] # - # source://rubocop//lib/rubocop/lockfile.rb#24 - def includes_gem?(name); end + # source://rubocop//lib/rubocop/lsp.rb#11 + def enabled?; end - private + class << self + # Disable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#25 + def disable(&block); end - # @api private - # - # source://rubocop//lib/rubocop/lockfile.rb#30 - def parser; end -end + # Enable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#18 + def enable; end -# source://rubocop//lib/rubocop/lsp/logger.rb#13 -module RuboCop::Lsp; end + # Returns true when LSP is enabled, false when disabled. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lsp.rb#11 + def enabled?; end + end +end # Log for Language Server Protocol of RuboCop. # # @api private # # source://rubocop//lib/rubocop/lsp/logger.rb#16 -class RuboCop::Lsp::Logger +class RuboCop::LSP::Logger class << self # @api private # @@ -55344,7 +56170,7 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/routes.rb#18 -class RuboCop::Lsp::Routes +class RuboCop::LSP::Routes # @api private # @return [Routes] a new instance of Routes # @@ -55359,52 +56185,52 @@ class RuboCop::Lsp::Routes # source://rubocop//lib/rubocop/lsp/routes.rb#38 def handle_initialize(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#61 + # source://rubocop//lib/rubocop/lsp/routes.rb#57 def handle_initialized(_request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#170 + # source://rubocop//lib/rubocop/lsp/routes.rb#167 def handle_method_missing(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#67 + # source://rubocop//lib/rubocop/lsp/routes.rb#64 def handle_shutdown(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#159 + # source://rubocop//lib/rubocop/lsp/routes.rb#156 def handle_unsupported_method(request, method = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#208 + # source://rubocop//lib/rubocop/lsp/routes.rb#205 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#178 + # source://rubocop//lib/rubocop/lsp/routes.rb#175 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#188 + # source://rubocop//lib/rubocop/lsp/routes.rb#185 def format_file(file_uri, command: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#222 + # source://rubocop//lib/rubocop/lsp/routes.rb#219 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#226 + # source://rubocop//lib/rubocop/lsp/routes.rb#223 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#238 + # source://rubocop//lib/rubocop/lsp/routes.rb#235 def to_range(location); end class << self @@ -55422,7 +56248,7 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/runtime.rb#16 -class RuboCop::Lsp::Runtime +class RuboCop::LSP::Runtime # @api private # @return [Runtime] a new instance of Runtime # @@ -55488,42 +56314,42 @@ end # # @api private # -# source://rubocop//lib/rubocop/lsp/server.rb#21 -class RuboCop::Lsp::Server +# source://rubocop//lib/rubocop/lsp/server.rb#22 +class RuboCop::LSP::Server # @api private # @return [Server] a new instance of Server # - # source://rubocop//lib/rubocop/lsp/server.rb#22 + # source://rubocop//lib/rubocop/lsp/server.rb#23 def initialize(config_store); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#56 + # source://rubocop//lib/rubocop/lsp/server.rb#61 def configure(options); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#48 + # source://rubocop//lib/rubocop/lsp/server.rb#53 def format(path, text, command:); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#52 + # source://rubocop//lib/rubocop/lsp/server.rb#57 def offenses(path, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#29 + # source://rubocop//lib/rubocop/lsp/server.rb#34 def start; end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#62 + # source://rubocop//lib/rubocop/lsp/server.rb#67 def stop(&block); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#44 + # source://rubocop//lib/rubocop/lsp/server.rb#49 def write(response); end end @@ -55532,7 +56358,7 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/severity.rb#7 -class RuboCop::Lsp::Severity +class RuboCop::LSP::Severity class << self # @api private # @@ -55544,7 +56370,70 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/severity.rb#8 -RuboCop::Lsp::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) +RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# Encapsulation of a lockfile for use when checking for gems. +# Does not actually resolve gems, just parses the lockfile. +# +# @api private +# +# source://rubocop//lib/rubocop/lockfile.rb#15 +class RuboCop::Lockfile + # @api private + # @param lockfile_path [String, Pathname, nil] + # @return [Lockfile] a new instance of Lockfile + # + # source://rubocop//lib/rubocop/lockfile.rb#17 + def initialize(lockfile_path = T.unsafe(nil)); end + + # Gems that the bundle directly depends on. + # + # @api private + # @return [Array<Bundler::Dependency>, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#29 + def dependencies; end + + # Returns the locked versions of gems from this lockfile. + # + # @api private + # @param include_transitive_dependencies: [Boolean] When false, only direct dependencies + # are returned, i.e. those listed explicitly in the `Gemfile`. + # + # source://rubocop//lib/rubocop/lockfile.rb#49 + def gem_versions(include_transitive_dependencies: T.unsafe(nil)); end + + # All activated gems, including transitive dependencies. + # + # @api private + # @return [Array<Bundler::Dependency>, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#37 + def gems; end + + # Whether this lockfile includes the named gem, directly or indirectly. + # + # @api private + # @param name [String] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#65 + def includes_gem?(name); end + + private + + # @api private + # @return [Bundler::LockfileParser, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#72 + def parser; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#85 + def use_bundler_lock_parser?; end +end # Parse different formats of magic comments. # @@ -55903,7 +56792,7 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#228 + # source://rubocop//lib/rubocop/options.rb#229 def add_additional_modes(opts); end # the autocorrect command-line arguments map to the autocorrect @options values like so: @@ -55915,12 +56804,12 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#139 + # source://rubocop//lib/rubocop/options.rb#140 def add_autocorrection_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#204 + # source://rubocop//lib/rubocop/options.rb#205 def add_cache_options(opts); end # @api private @@ -55930,42 +56819,42 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#162 + # source://rubocop//lib/rubocop/options.rb#163 def add_config_generation_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#180 + # source://rubocop//lib/rubocop/options.rb#181 def add_cop_selection_csv_option(option, opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#240 + # source://rubocop//lib/rubocop/options.rb#241 def add_general_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#211 + # source://rubocop//lib/rubocop/options.rb#212 def add_lsp_option(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#104 + # source://rubocop//lib/rubocop/options.rb#105 def add_output_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#252 + # source://rubocop//lib/rubocop/options.rb#253 def add_profile_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#217 + # source://rubocop//lib/rubocop/options.rb#218 def add_server_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#195 + # source://rubocop//lib/rubocop/options.rb#196 def add_severity_option(opts); end # @api private @@ -55975,7 +56864,7 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#262 + # source://rubocop//lib/rubocop/options.rb#263 def handle_deprecated_option(old_option, new_option); end # Finds the option in `args` starting with -- and converts it to a symbol, @@ -55983,7 +56872,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#296 + # source://rubocop//lib/rubocop/options.rb#297 def long_opt_symbol(args); end # Sets a value in the @options hash, based on the given long option and its @@ -55991,17 +56880,17 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#285 + # source://rubocop//lib/rubocop/options.rb#286 def option(opts, *args); end # @api private # - # source://rubocop//lib/rubocop/options.rb#267 + # source://rubocop//lib/rubocop/options.rb#268 def rainbow; end # @api private # - # source://rubocop//lib/rubocop/options.rb#301 + # source://rubocop//lib/rubocop/options.rb#302 def require_feature(file); end # Creates a section of options in order to separate them visually when @@ -56009,7 +56898,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#277 + # source://rubocop//lib/rubocop/options.rb#278 def section(opts, heading, &_block); end end @@ -56032,135 +56921,141 @@ RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop//lib/rubocop/options.rb#489 +# source://rubocop//lib/rubocop/options.rb#498 module RuboCop::OptionsHelp; end # @api private # -# source://rubocop//lib/rubocop/options.rb#491 +# source://rubocop//lib/rubocop/options.rb#500 RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/options.rb#490 +# source://rubocop//lib/rubocop/options.rb#499 RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/options.rb#493 +# source://rubocop//lib/rubocop/options.rb#502 RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) # Validates option arguments and the options' compatibility with each other. # # @api private # -# source://rubocop//lib/rubocop/options.rb#311 +# source://rubocop//lib/rubocop/options.rb#312 class RuboCop::OptionsValidator # @api private # @return [OptionsValidator] a new instance of OptionsValidator # - # source://rubocop//lib/rubocop/options.rb#349 + # source://rubocop//lib/rubocop/options.rb#350 def initialize(options); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#463 + # source://rubocop//lib/rubocop/options.rb#472 def boolean_or_empty_cache?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#433 + # source://rubocop//lib/rubocop/options.rb#442 def disable_parallel_when_invalid_option_combo; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#459 + # source://rubocop//lib/rubocop/options.rb#468 def except_syntax?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#467 + # source://rubocop//lib/rubocop/options.rb#476 def incompatible_options; end # @api private # - # source://rubocop//lib/rubocop/options.rb#446 + # source://rubocop//lib/rubocop/options.rb#455 def invalid_arguments_for_parallel; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#454 + # source://rubocop//lib/rubocop/options.rb#463 def only_includes_redundant_disable?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#380 + # source://rubocop//lib/rubocop/options.rb#382 def validate_auto_gen_config; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#419 + # source://rubocop//lib/rubocop/options.rb#428 def validate_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#479 + # source://rubocop//lib/rubocop/options.rb#488 def validate_cache_enabled_for_cache_root; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#358 + # source://rubocop//lib/rubocop/options.rb#359 def validate_compatibility; end # @api private # - # source://rubocop//lib/rubocop/options.rb#353 + # source://rubocop//lib/rubocop/options.rb#354 def validate_cop_options; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#401 + # source://rubocop//lib/rubocop/options.rb#403 def validate_display_only_correctable_and_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#393 + # source://rubocop//lib/rubocop/options.rb#395 def validate_display_only_failed; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#410 + # source://rubocop//lib/rubocop/options.rb#412 def validate_display_only_failed_and_display_only_correctable; end # @api private # @raise [OptionParser::MissingArgument] # - # source://rubocop//lib/rubocop/options.rb#471 + # source://rubocop//lib/rubocop/options.rb#480 def validate_exclude_limit_option; end + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#421 + def validate_lsp_and_editor_mode; end + class << self # Cop name validation must be done later than option parsing, so it's not # called from within Options. # # @api private # - # source://rubocop//lib/rubocop/options.rb#318 + # source://rubocop//lib/rubocop/options.rb#319 def validate_cop_list(names); end private # @api private # - # source://rubocop//lib/rubocop/options.rb#335 + # source://rubocop//lib/rubocop/options.rb#336 def format_message_from(name, cop_names); end end end @@ -56173,21 +57068,21 @@ module RuboCop::PathUtil # Returns true for an absolute Unix or Windows path. # - # source://rubocop//lib/rubocop/path_util.rb#72 + # source://rubocop//lib/rubocop/path_util.rb#76 def absolute?(path); end # Returns true for a glob # - # source://rubocop//lib/rubocop/path_util.rb#77 + # source://rubocop//lib/rubocop/path_util.rb#81 def glob?(path); end - # source://rubocop//lib/rubocop/path_util.rb#107 + # source://rubocop//lib/rubocop/path_util.rb#111 def hidden_dir?(path); end - # source://rubocop//lib/rubocop/path_util.rb#90 + # source://rubocop//lib/rubocop/path_util.rb#94 def hidden_file?(path); end - # source://rubocop//lib/rubocop/path_util.rb#81 + # source://rubocop//lib/rubocop/path_util.rb#85 def hidden_file_in_not_hidden_dir?(pattern, path); end # source://rubocop//lib/rubocop/path_util.rb#48 @@ -56195,7 +57090,7 @@ module RuboCop::PathUtil # Loose check to reduce memory allocations # - # source://rubocop//lib/rubocop/path_util.rb#97 + # source://rubocop//lib/rubocop/path_util.rb#101 def maybe_hidden_file?(path); end # source://rubocop//lib/rubocop/path_util.rb#13 @@ -56209,29 +57104,29 @@ module RuboCop::PathUtil # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#72 + # source://rubocop//lib/rubocop/path_util.rb#76 def absolute?(path); end # Returns true for a glob # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#77 + # source://rubocop//lib/rubocop/path_util.rb#81 def glob?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#107 + # source://rubocop//lib/rubocop/path_util.rb#111 def hidden_dir?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#90 + # source://rubocop//lib/rubocop/path_util.rb#94 def hidden_file?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#81 + # source://rubocop//lib/rubocop/path_util.rb#85 def hidden_file_in_not_hidden_dir?(pattern, path); end # @return [Boolean] @@ -56243,7 +57138,7 @@ module RuboCop::PathUtil # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#97 + # source://rubocop//lib/rubocop/path_util.rb#101 def maybe_hidden_file?(path); end # source://rubocop//lib/rubocop/path_util.rb#13 @@ -56266,7 +57161,7 @@ module RuboCop::PathUtil end end -# source://rubocop//lib/rubocop/path_util.rb#94 +# source://rubocop//lib/rubocop/path_util.rb#98 RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/path_util.rb#31 @@ -56302,12 +57197,12 @@ class RuboCop::RemoteConfig # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#19 + # source://rubocop//lib/rubocop/remote_config.rb#23 def file; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#32 + # source://rubocop//lib/rubocop/remote_config.rb#36 def inherit_from_remote(file, path); end # @api private @@ -56319,46 +57214,46 @@ class RuboCop::RemoteConfig # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#95 + # source://rubocop//lib/rubocop/remote_config.rb#99 def cache_name_from_uri; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#78 + # source://rubocop//lib/rubocop/remote_config.rb#82 def cache_path; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/remote_config.rb#82 + # source://rubocop//lib/rubocop/remote_config.rb#86 def cache_path_exists?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/remote_config.rb#86 + # source://rubocop//lib/rubocop/remote_config.rb#90 def cache_path_expired?; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#101 + # source://rubocop//lib/rubocop/remote_config.rb#105 def cloned_url; end # @api private # @yield [request] # - # source://rubocop//lib/rubocop/remote_config.rb#53 + # source://rubocop//lib/rubocop/remote_config.rb#57 def generate_request(uri); end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#62 + # source://rubocop//lib/rubocop/remote_config.rb#66 def handle_response(response, limit, &block); end # @api private # @raise [ArgumentError] # - # source://rubocop//lib/rubocop/remote_config.rb#40 + # source://rubocop//lib/rubocop/remote_config.rb#44 def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end end @@ -56421,7 +57316,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#236 + # source://rubocop//lib/rubocop/result_cache.rb#229 def context_checksum(team, options); end # @api private @@ -56461,14 +57356,6 @@ class RuboCop::ResultCache # source://rubocop//lib/rubocop/result_cache.rb#142 def symlink_protection_triggered?(path); end - # The external dependency checksums are cached per RuboCop team so that - # the checksums don't need to be recomputed for each file. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#227 - def team_checksum(team); end - class << self # @api private # @return [Boolean] @@ -56560,145 +57447,145 @@ RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) class RuboCop::Runner # @return [Runner] a new instance of Runner # - # source://rubocop//lib/rubocop/runner.rb#59 + # source://rubocop//lib/rubocop/runner.rb#63 def initialize(options, config_store); end # Sets the attribute aborting # # @param value the value to set the attribute aborting to. # - # source://rubocop//lib/rubocop/runner.rb#57 + # source://rubocop//lib/rubocop/runner.rb#61 def aborting=(_arg0); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#83 + # source://rubocop//lib/rubocop/runner.rb#87 def aborting?; end # Returns the value of attribute errors. # - # source://rubocop//lib/rubocop/runner.rb#56 + # source://rubocop//lib/rubocop/runner.rb#60 def errors; end - # source://rubocop//lib/rubocop/runner.rb#67 + # source://rubocop//lib/rubocop/runner.rb#71 def run(paths); end # Returns the value of attribute warnings. # - # source://rubocop//lib/rubocop/runner.rb#56 + # source://rubocop//lib/rubocop/runner.rb#60 def warnings; end private - # source://rubocop//lib/rubocop/runner.rb#196 + # source://rubocop//lib/rubocop/runner.rb#200 def add_redundant_disables(file, offenses, source); end - # source://rubocop//lib/rubocop/runner.rb#170 + # source://rubocop//lib/rubocop/runner.rb#174 def cached_result(file, team); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#250 + # source://rubocop//lib/rubocop/runner.rb#254 def cached_run?; end # Check whether a run created source identical to a previous run, which # means that we definitely have an infinite loop. # - # source://rubocop//lib/rubocop/runner.rb#328 + # source://rubocop//lib/rubocop/runner.rb#332 def check_for_infinite_loop(processed_source, offenses_by_iteration); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#222 + # source://rubocop//lib/rubocop/runner.rb#226 def check_for_redundant_disables?(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#423 + # source://rubocop//lib/rubocop/runner.rb#427 def considered_failure?(offense); end - # source://rubocop//lib/rubocop/runner.rb#456 + # source://rubocop//lib/rubocop/runner.rb#460 def default_config(cop_name); end - # source://rubocop//lib/rubocop/runner.rb#272 + # source://rubocop//lib/rubocop/runner.rb#276 def do_inspection_loop(file); end - # source://rubocop//lib/rubocop/runner.rb#133 + # source://rubocop//lib/rubocop/runner.rb#137 def each_inspected_file(files); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#236 + # source://rubocop//lib/rubocop/runner.rb#240 def except_redundant_cop_disable_directive?; end - # source://rubocop//lib/rubocop/runner.rb#357 + # source://rubocop//lib/rubocop/runner.rb#361 def extract_ruby_sources(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#245 + # source://rubocop//lib/rubocop/runner.rb#249 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/runner.rb#174 + # source://rubocop//lib/rubocop/runner.rb#178 def file_offense_cache(file); end - # source://rubocop//lib/rubocop/runner.rb#162 + # source://rubocop//lib/rubocop/runner.rb#166 def file_offenses(file); end - # source://rubocop//lib/rubocop/runner.rb#240 + # source://rubocop//lib/rubocop/runner.rb#244 def file_started(file); end - # source://rubocop//lib/rubocop/runner.rb#403 + # source://rubocop//lib/rubocop/runner.rb#407 def filter_cop_classes(cop_classes, config); end - # source://rubocop//lib/rubocop/runner.rb#104 + # source://rubocop//lib/rubocop/runner.rb#108 def find_target_files(paths); end - # source://rubocop//lib/rubocop/runner.rb#414 + # source://rubocop//lib/rubocop/runner.rb#418 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#470 + # source://rubocop//lib/rubocop/runner.rb#475 def get_processed_source(file); end - # source://rubocop//lib/rubocop/runner.rb#342 + # source://rubocop//lib/rubocop/runner.rb#346 def inspect_file(processed_source, team = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/runner.rb#115 + # source://rubocop//lib/rubocop/runner.rb#119 def inspect_files(files); end - # source://rubocop//lib/rubocop/runner.rb#303 + # source://rubocop//lib/rubocop/runner.rb#307 def iterate_until_no_changes(source, offenses_by_iteration); end - # source://rubocop//lib/rubocop/runner.rb#148 + # source://rubocop//lib/rubocop/runner.rb#152 def list_files(paths); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#452 + # source://rubocop//lib/rubocop/runner.rb#456 def mark_as_safe_by_config?(config); end - # source://rubocop//lib/rubocop/runner.rb#460 + # source://rubocop//lib/rubocop/runner.rb#464 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/runner.rb#364 + # source://rubocop//lib/rubocop/runner.rb#368 def mobilize_team(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#369 + # source://rubocop//lib/rubocop/runner.rb#373 def mobilized_cop_classes(config); end - # source://rubocop//lib/rubocop/runner.rb#432 + # source://rubocop//lib/rubocop/runner.rb#436 def offenses_to_report(offenses); end - # source://rubocop//lib/rubocop/runner.rb#152 + # source://rubocop//lib/rubocop/runner.rb#156 def process_file(file); end - # source://rubocop//lib/rubocop/runner.rb#393 + # source://rubocop//lib/rubocop/runner.rb#397 def qualify_option_cop_names; end # @yield [cop] # - # source://rubocop//lib/rubocop/runner.rb#228 + # source://rubocop//lib/rubocop/runner.rb#232 def redundant_cop_disable_directive(file); end - # source://rubocop//lib/rubocop/runner.rb#262 + # source://rubocop//lib/rubocop/runner.rb#266 def save_in_cache(cache, offenses); end # A Cop::Team instance is stateful and may change when inspecting. @@ -56706,41 +57593,41 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#492 + # source://rubocop//lib/rubocop/runner.rb#503 def standby_team(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#410 + # source://rubocop//lib/rubocop/runner.rb#414 def style_guide_cops_only?(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#444 + # source://rubocop//lib/rubocop/runner.rb#448 def supports_safe_autocorrect?(offense); end # @yield [team] # - # source://rubocop//lib/rubocop/runner.rb#211 + # source://rubocop//lib/rubocop/runner.rb#215 def team_for_redundant_disables(file, offenses, source); end # Warms up the RuboCop cache by forking a suitable number of RuboCop # instances that each inspects its allotted group of files. # - # source://rubocop//lib/rubocop/runner.rb#91 + # source://rubocop//lib/rubocop/runner.rb#95 def warm_cache(target_files); end class << self # @return [Array<#call>] # - # source://rubocop//lib/rubocop/runner.rb#29 + # source://rubocop//lib/rubocop/runner.rb#33 def ruby_extractors; end private # @return [#call] # - # source://rubocop//lib/rubocop/runner.rb#36 + # source://rubocop//lib/rubocop/runner.rb#40 def default_ruby_extractor; end end end @@ -56763,12 +57650,12 @@ end # @api private # -# source://rubocop//lib/rubocop/runner.rb#49 +# source://rubocop//lib/rubocop/runner.rb#53 RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) # @api private # -# source://rubocop//lib/rubocop/runner.rb#52 +# source://rubocop//lib/rubocop/runner.rb#56 RuboCop::Runner::REDUNDANT_COP_DISABLE_DIRECTIVE_RULES = T.let(T.unsafe(nil), Array) # Take a string with embedded escapes, and convert the escapes as the Ruby @@ -56803,173 +57690,180 @@ RuboCop::StringInterpreter::STRING_ESCAPES = T.let(T.unsafe(nil), Hash) # source://rubocop//lib/rubocop/string_interpreter.rb#12 RuboCop::StringInterpreter::STRING_ESCAPE_REGEX = T.let(T.unsafe(nil), Regexp) -# This class finds target files to inspect by scanning the directory tree -# and picking ruby files. +# This class finds target files to inspect by scanning the directory tree and picking ruby files. # # @api private # -# source://rubocop//lib/rubocop/target_finder.rb#7 +# source://rubocop//lib/rubocop/target_finder.rb#6 class RuboCop::TargetFinder # @api private # @return [TargetFinder] a new instance of TargetFinder # - # source://rubocop//lib/rubocop/target_finder.rb#10 + # source://rubocop//lib/rubocop/target_finder.rb#9 def initialize(config_store, options = T.unsafe(nil)); end + # Generate a list of target files by expanding globbing patterns (if any). If args is empty, + # recursively find all Ruby source files under the current directory + # + # @api private + # @return [Array] array of file paths + # + # source://rubocop//lib/rubocop/target_finder.rb#17 + def find(args, mode); end + + # Search for files recursively starting at the given base directory using the given flags that + # determine how the match is made. Excluded files will be removed later by the caller, but as an + # optimization find_files removes the top level directories that are excluded in configuration + # in the normal way (dir/**/*). + # # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#149 - def all_cops_include; end + # source://rubocop//lib/rubocop/target_finder.rb#58 + def find_files(base_dir, flags); end + + # Finds all Ruby source files under the current or other supplied directory. A Ruby source file + # is defined as a file with the `.rb` extension or a file with no extension that has a ruby + # shebang line as its first line. + # It is possible to specify includes and excludes using the config file, so you can include + # other Ruby files like Rakefiles and gemspecs. + # + # @api private + # @param base_dir Root directory under which to search for + # ruby source files + # @return [Array] Array of filenames + # + # source://rubocop//lib/rubocop/target_finder.rb#41 + def target_files_in_dir(base_dir = T.unsafe(nil)); end + + private # @api private # # source://rubocop//lib/rubocop/target_finder.rb#120 + def all_cops_include; end + + # @api private + # + # source://rubocop//lib/rubocop/target_finder.rb#106 def combined_exclude_glob_patterns(base_dir); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#176 + # source://rubocop//lib/rubocop/target_finder.rb#172 def configured_include?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#19 + # source://rubocop//lib/rubocop/target_finder.rb#208 def debug?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#23 + # source://rubocop//lib/rubocop/target_finder.rb#212 def fail_fast?; end - # Generate a list of target files by expanding globbing patterns - # (if any). If args is empty, recursively find all Ruby source - # files under the current directory - # # @api private - # @return [Array] array of file paths + # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#31 - def find(args, mode); end + # source://rubocop//lib/rubocop/target_finder.rb#200 + def force_exclusion?; end - # Search for files recursively starting at the given base directory using - # the given flags that determine how the match is made. Excluded files will - # be removed later by the caller, but as an optimization find_files removes - # the top level directories that are excluded in configuration in the - # normal way (dir/**/*). - # # @api private + # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#83 - def find_files(base_dir, flags); end + # source://rubocop//lib/rubocop/target_finder.rb#204 + def ignore_parent_exclusion?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#15 - def force_exclusion?; end + # source://rubocop//lib/rubocop/target_finder.rb#145 + def included_file?(file); end # @api private - # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#180 - def included_file?(file); end + # source://rubocop//lib/rubocop/target_finder.rb#191 + def order; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#184 + # source://rubocop//lib/rubocop/target_finder.rb#124 def process_explicit_path(path, mode); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#153 + # source://rubocop//lib/rubocop/target_finder.rb#176 def ruby_executable?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#127 + # source://rubocop//lib/rubocop/target_finder.rb#157 def ruby_extension?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#131 + # source://rubocop//lib/rubocop/target_finder.rb#161 def ruby_extensions; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#172 + # source://rubocop//lib/rubocop/target_finder.rb#149 def ruby_file?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#138 + # source://rubocop//lib/rubocop/target_finder.rb#168 def ruby_filename?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#142 + # source://rubocop//lib/rubocop/target_finder.rb#113 def ruby_filenames; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#164 + # source://rubocop//lib/rubocop/target_finder.rb#187 def ruby_interpreters(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#168 + # source://rubocop//lib/rubocop/target_finder.rb#153 def stdin?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#112 + # source://rubocop//lib/rubocop/target_finder.rb#98 def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end - # Finds all Ruby source files under the current or other supplied - # directory. A Ruby source file is defined as a file with the `.rb` - # extension or a file with no extension that has a ruby shebang line - # as its first line. - # It is possible to specify includes and excludes using the config file, - # so you can include other Ruby files like Rakefiles and gemspecs. - # - # @api private - # @param base_dir Root directory under which to search for - # ruby source files - # @return [Array] Array of filenames - # - # source://rubocop//lib/rubocop/target_finder.rb#56 - def target_files_in_dir(base_dir = T.unsafe(nil)); end - # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#69 + # source://rubocop//lib/rubocop/target_finder.rb#73 def to_inspect?(file, hidden_files, base_dir_config); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#96 + # source://rubocop//lib/rubocop/target_finder.rb#82 def wanted_dir_patterns(base_dir, exclude_pattern, flags); end - private - # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#201 - def order; end + # source://rubocop//lib/rubocop/target_finder.rb#134 + def without_excluded(files); end end # @api private # -# source://rubocop//lib/rubocop/target_finder.rb#8 +# source://rubocop//lib/rubocop/target_finder.rb#7 RuboCop::TargetFinder::HIDDEN_PATH_SUBSTRING = T.let(T.unsafe(nil), String) # The kind of Ruby that code inspected by RuboCop is written in. @@ -56981,34 +57875,34 @@ class RuboCop::TargetRuby # @api private # @return [TargetRuby] a new instance of TargetRuby # - # source://rubocop//lib/rubocop/target_ruby.rb#252 + # source://rubocop//lib/rubocop/target_ruby.rb#258 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#268 + # source://rubocop//lib/rubocop/target_ruby.rb#274 def rubocop_version_with_support; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#256 + # source://rubocop//lib/rubocop/target_ruby.rb#262 def source; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_ruby.rb#264 + # source://rubocop//lib/rubocop/target_ruby.rb#270 def supported?; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#260 + # source://rubocop//lib/rubocop/target_ruby.rb#266 def version; end class << self # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#238 + # source://rubocop//lib/rubocop/target_ruby.rb#244 def supported_versions; end end end @@ -57017,23 +57911,23 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#107 +# source://rubocop//lib/rubocop/target_ruby.rb#191 class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#108 + # source://rubocop//lib/rubocop/target_ruby.rb#192 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#141 + # source://rubocop//lib/rubocop/target_ruby.rb#225 def bundler_lock_file_path; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#114 + # source://rubocop//lib/rubocop/target_ruby.rb#198 def find_version; end end @@ -57046,18 +57940,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#226 +# source://rubocop//lib/rubocop/target_ruby.rb#232 class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#227 + # source://rubocop//lib/rubocop/target_ruby.rb#233 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#233 + # source://rubocop//lib/rubocop/target_ruby.rb#239 def find_version; end end @@ -57065,62 +57959,62 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#148 +# source://rubocop//lib/rubocop/target_ruby.rb#53 class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop//lib/rubocop/target_ruby.rb#159 + # source://rubocop//lib/rubocop/target_ruby.rb#64 def gem_requirement_versions(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#165 + # source://rubocop//lib/rubocop/target_ruby.rb#70 def name; end - # source://rubocop//lib/rubocop/target_ruby.rb#154 + # source://rubocop//lib/rubocop/target_ruby.rb#59 def required_ruby_version(param0); end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#214 - def find_default_minimal_known_ruby(right_hand_side); end + # source://rubocop//lib/rubocop/target_ruby.rb#123 + def find_minimal_known_ruby(right_hand_side); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#171 + # source://rubocop//lib/rubocop/target_ruby.rb#76 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#181 + # source://rubocop//lib/rubocop/target_ruby.rb#86 def gemspec_filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#188 + # source://rubocop//lib/rubocop/target_ruby.rb#93 def gemspec_filepath; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#210 + # source://rubocop//lib/rubocop/target_ruby.rb#119 def version_from_array(array); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#193 + # source://rubocop//lib/rubocop/target_ruby.rb#98 def version_from_gemspec_file(file); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#198 + # source://rubocop//lib/rubocop/target_ruby.rb#107 def version_from_right_hand_side(right_hand_side); end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#151 +# source://rubocop//lib/rubocop/target_ruby.rb#56 RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) # @api private @@ -57156,49 +58050,49 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#53 +# source://rubocop//lib/rubocop/target_ruby.rb#137 class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#57 + # source://rubocop//lib/rubocop/target_ruby.rb#141 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#63 + # source://rubocop//lib/rubocop/target_ruby.rb#147 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#71 + # source://rubocop//lib/rubocop/target_ruby.rb#155 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#67 + # source://rubocop//lib/rubocop/target_ruby.rb#151 def pattern; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#78 + # source://rubocop//lib/rubocop/target_ruby.rb#162 def version_file; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#54 +# source://rubocop//lib/rubocop/target_ruby.rb#138 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#55 +# source://rubocop//lib/rubocop/target_ruby.rb#139 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#242 +# source://rubocop//lib/rubocop/target_ruby.rb#248 RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) # A place where information about a target ruby version is found. @@ -57234,34 +58128,34 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#86 +# source://rubocop//lib/rubocop/target_ruby.rb#170 class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#90 + # source://rubocop//lib/rubocop/target_ruby.rb#174 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#96 + # source://rubocop//lib/rubocop/target_ruby.rb#180 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#100 + # source://rubocop//lib/rubocop/target_ruby.rb#184 def pattern; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#87 +# source://rubocop//lib/rubocop/target_ruby.rb#171 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#88 +# source://rubocop//lib/rubocop/target_ruby.rb#172 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rubocop//lib/rubocop/ast_aliases.rb#7 @@ -57287,12 +58181,12 @@ module RuboCop::Version class << self # @api private # - # source://rubocop//lib/rubocop/version.rb#93 + # source://rubocop//lib/rubocop/version.rb#108 def document_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#43 + # source://rubocop//lib/rubocop/version.rb#58 def extension_versions(env); end # Returns feature version in one of two ways: @@ -57302,12 +58196,17 @@ module RuboCop::Version # # @api private # - # source://rubocop//lib/rubocop/version.rb#77 + # source://rubocop//lib/rubocop/version.rb#92 def feature_version(feature); end # @api private # - # source://rubocop//lib/rubocop/version.rb#98 + # source://rubocop//lib/rubocop/version.rb#43 + def parser_version; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#113 def server_mode; end # @api private @@ -57354,7 +58253,7 @@ module RuboCop::YAMLDuplicationChecker # @api private # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#21 + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#22 def traverse(tree, &on_duplicated); end end end @@ -57369,13 +58268,11 @@ class String # is either empty or contains only whitespace characters. # # @example - # ''.blank? #=> true - # @example - # ' '.blank? #=> true - # @example + # ''.blank? #=> true + # ' '.blank? #=> true # ' test'.blank? #=> false # @return [Boolean] true is the string is blank, false otherwise # - # source://rubocop//lib/rubocop/core_ext/string.rb#19 + # source://rubocop//lib/rubocop/core_ext/string.rb#15 def blank?; end end diff --git a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi index fe14ff9..f832ab1 100644 --- a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +++ b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `ruby-progressbar` gem. # Please instead update this file by running `bin/tapioca gem ruby-progressbar`. + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#4 class ProgressBar class << self diff --git a/sorbet/rbi/gems/spoom@1.2.4.rbi b/sorbet/rbi/gems/spoom@1.5.0.rbi similarity index 59% rename from sorbet/rbi/gems/spoom@1.2.4.rbi rename to sorbet/rbi/gems/spoom@1.5.0.rbi index 4268222..58d82bd 100644 --- a/sorbet/rbi/gems/spoom@1.2.4.rbi +++ b/sorbet/rbi/gems/spoom@1.5.0.rbi @@ -4,130 +4,91 @@ # This is an autogenerated file for types exported from the `spoom` gem. # Please instead update this file by running `bin/tapioca gem spoom`. + # source://spoom//lib/spoom.rb#7 -module Spoom; end +module Spoom + class << self + # source://spoom//lib/spoom/parse.rb#13 + sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } + def parse_ruby(ruby, file:); end + end +end # source://spoom//lib/spoom/cli/helper.rb#9 module Spoom::Cli; end -# source://spoom//lib/spoom/cli/bump.rb#9 -class Spoom::Cli::Bump < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/bump.rb#49 - sig { params(directory: ::String).void } - def bump(directory = T.unsafe(nil)); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#170 - def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#192 - def undo_changes(files, from_strictness); end -end - -# source://spoom//lib/spoom/cli/config.rb#9 -class Spoom::Cli::Config < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/config.rb#15 - def show; end -end - -# source://spoom//lib/spoom/cli/coverage.rb#9 -class Spoom::Cli::Coverage < ::Thor +# source://spoom//lib/spoom/cli/deadcode.rb#8 +class Spoom::Cli::Deadcode < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # source://spoom//lib/spoom/cli/coverage.rb#198 - def bundle_install(path, sha); end + # source://spoom//lib/spoom/cli/deadcode.rb#52 + sig { params(paths: ::String).void } + def deadcode(*paths); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/coverage.rb#210 - def message_no_data(file); end - - # source://spoom//lib/spoom/cli/coverage.rb#173 - def open(file = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/coverage.rb#189 - def parse_time(string, option); end - - # source://spoom//lib/spoom/cli/coverage.rb#142 - def report; end - - # source://spoom//lib/spoom/cli/coverage.rb#20 - def snapshot; end - - # source://spoom//lib/spoom/cli/coverage.rb#42 - def timeline; end + # source://spoom//lib/spoom/cli/deadcode.rb#154 + def remove(location_string); end end -# source://spoom//lib/spoom/cli/coverage.rb#12 -Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) - # source://spoom//lib/spoom/cli/helper.rb#10 module Spoom::Cli::Helper include ::Spoom::Colorize requires_ancestor { Thor } - # source://spoom//lib/spoom/cli/helper.rb#119 + # source://spoom//lib/spoom/cli/helper.rb#139 sig { params(string: ::String).returns(::String) } def blue(string); end # Is the `--color` option true? # - # source://spoom//lib/spoom/cli/helper.rb#83 + # source://spoom//lib/spoom/cli/helper.rb#103 sig { returns(T::Boolean) } def color?; end # Colorize a string if `color?` # - # source://spoom//lib/spoom/cli/helper.rb#112 + # source://spoom//lib/spoom/cli/helper.rb#132 sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } def colorize(string, *color); end # Returns the context at `--path` (by default the current working directory) # - # source://spoom//lib/spoom/cli/helper.rb#51 + # source://spoom//lib/spoom/cli/helper.rb#71 sig { returns(::Spoom::Context) } def context; end # Raise if `spoom` is not ran inside a context with a `sorbet/config` file # - # source://spoom//lib/spoom/cli/helper.rb#57 + # source://spoom//lib/spoom/cli/helper.rb#77 sig { returns(::Spoom::Context) } def context_requiring_sorbet!; end - # source://spoom//lib/spoom/cli/helper.rb#124 + # source://spoom//lib/spoom/cli/helper.rb#144 sig { params(string: ::String).returns(::String) } def cyan(string); end # Return the path specified through `--path` # - # source://spoom//lib/spoom/cli/helper.rb#72 + # source://spoom//lib/spoom/cli/helper.rb#92 sig { returns(::String) } def exec_path; end - # source://spoom//lib/spoom/cli/helper.rb#129 + # source://spoom//lib/spoom/cli/helper.rb#149 sig { params(string: ::String).returns(::String) } def gray(string); end - # source://spoom//lib/spoom/cli/helper.rb#134 + # source://spoom//lib/spoom/cli/helper.rb#154 sig { params(string: ::String).returns(::String) } def green(string); end - # source://spoom//lib/spoom/cli/helper.rb#88 + # source://spoom//lib/spoom/cli/helper.rb#108 sig { params(string: ::String).returns(::String) } def highlight(string); end - # source://spoom//lib/spoom/cli/helper.rb#139 + # source://spoom//lib/spoom/cli/helper.rb#159 sig { params(string: ::String).returns(::String) } def red(string); end @@ -145,158 +106,243 @@ module Spoom::Cli::Helper sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/helper.rb#144 + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Warning`). + # + # source://spoom//lib/spoom/cli/helper.rb#59 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_warning(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/helper.rb#164 sig { params(string: ::String).returns(::String) } def yellow(string); end end -# source://spoom//lib/spoom/cli/lsp.rb#10 -class Spoom::Cli::LSP < ::Thor +# source://spoom//lib/spoom/cli.rb#12 +class Spoom::Cli::Main < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli.rb#101 + def __print_version; end + + # source://spoom//lib/spoom/cli.rb#58 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli.rb#65 + def coverage(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def deadcode(*args); end + + # source://spoom//lib/spoom/cli.rb#75 + def lsp(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def srb(*args); end + + # source://spoom//lib/spoom/cli.rb#94 + def tc(*paths_to_select); end + + class << self + # @return [Boolean] + # + # source://spoom//lib/spoom/cli.rb#108 + def exit_on_failure?; end + end +end + +# source://spoom//lib/spoom/cli.rb#81 +Spoom::Cli::Main::SORT_CODE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli.rb#83 +Spoom::Cli::Main::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/cli.rb#82 +Spoom::Cli::Main::SORT_LOC = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/bump.rb#9 +module Spoom::Cli::Srb; end + +# source://spoom//lib/spoom/cli/srb/bump.rb#10 +class Spoom::Cli::Srb::Bump < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/bump.rb#50 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/bump.rb#171 + def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/bump.rb#193 + def undo_changes(files, from_strictness); end +end + +# source://spoom//lib/spoom/cli/srb/coverage.rb#10 +class Spoom::Cli::Srb::Coverage < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/coverage.rb#199 + def bundle_install(path, sha); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#211 + def message_no_data(file); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#174 + def open(file = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#190 + def parse_time(string, option); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#143 + def report; end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#21 + def snapshot; end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#43 + def timeline; end +end + +# source://spoom//lib/spoom/cli/srb/coverage.rb#13 +Spoom::Cli::Srb::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/lsp.rb#11 +class Spoom::Cli::Srb::LSP < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#55 + # source://spoom//lib/spoom/cli/srb/lsp.rb#45 def defs(file, line, col); end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#65 + # source://spoom//lib/spoom/cli/srb/lsp.rb#55 def find(query); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#41 + # source://spoom//lib/spoom/cli/srb/lsp.rb#31 def hover(file, line, col); end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#26 + # source://spoom//lib/spoom/cli/srb/lsp.rb#16 def list; end - # source://spoom//lib/spoom/cli/lsp.rb#114 + # source://spoom//lib/spoom/cli/srb/lsp.rb#104 def lsp_client; end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#85 + # source://spoom//lib/spoom/cli/srb/lsp.rb#75 def refs(file, line, col); end - # source://spoom//lib/spoom/cli/lsp.rb#137 + # source://spoom//lib/spoom/cli/srb/lsp.rb#127 def run(&block); end - # source://spoom//lib/spoom/cli/lsp.rb#16 - def show; end - # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#95 + # source://spoom//lib/spoom/cli/srb/lsp.rb#85 def sigs(file, line, col); end - # source://spoom//lib/spoom/cli/lsp.rb#129 + # source://spoom//lib/spoom/cli/srb/lsp.rb#119 def symbol_printer; end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#75 + # source://spoom//lib/spoom/cli/srb/lsp.rb#65 def symbols(file); end - # source://spoom//lib/spoom/cli/lsp.rb#162 + # source://spoom//lib/spoom/cli/srb/lsp.rb#152 def to_uri(path); end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#105 + # source://spoom//lib/spoom/cli/srb/lsp.rb#95 def types(file, line, col); end end -# source://spoom//lib/spoom/cli.rb#16 -class Spoom::Cli::Main < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli.rb#61 - def __print_version; end - - # source://thor/1.3.0/lib/thor.rb#334 +# source://spoom//lib/spoom/cli/srb.rb#12 +class Spoom::Cli::Srb::Main < ::Thor + # source://thor/1.3.2/lib/thor.rb#334 def bump(*args); end - # source://thor/1.3.0/lib/thor.rb#334 - def config(*args); end - - # source://thor/1.3.0/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def coverage(*args); end - # source://spoom//lib/spoom/cli.rb#43 - def files; end + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor/1.3.0/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def lsp(*args); end - # source://thor/1.3.0/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def tc(*args); end - - class << self - # @return [Boolean] - # - # source://spoom//lib/spoom/cli.rb#68 - def exit_on_failure?; end - end end -# source://spoom//lib/spoom/cli/run.rb#6 -class Spoom::Cli::Run < ::Thor +# source://spoom//lib/spoom/cli/srb/tc.rb#7 +class Spoom::Cli::Srb::Tc < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # source://spoom//lib/spoom/cli/run.rb#131 + # source://spoom//lib/spoom/cli/srb/tc.rb#132 def colorize_message(message); end - # source://spoom//lib/spoom/cli/run.rb#122 + # source://spoom//lib/spoom/cli/srb/tc.rb#123 def format_error(error, format); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/run.rb#26 + # source://spoom//lib/spoom/cli/srb/tc.rb#27 def tc(*paths_to_select); end end -# source://spoom//lib/spoom/cli/run.rb#15 -Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) +# source://spoom//lib/spoom/cli/srb/tc.rb#16 +Spoom::Cli::Srb::Tc::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/cli/run.rb#11 -Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String) +# source://spoom//lib/spoom/cli/srb/tc.rb#12 +Spoom::Cli::Srb::Tc::SORT_CODE = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/cli/run.rb#13 -Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array) +# source://spoom//lib/spoom/cli/srb/tc.rb#14 +Spoom::Cli::Srb::Tc::SORT_ENUM = T.let(T.unsafe(nil), Array) -# source://spoom//lib/spoom/cli/run.rb#12 -Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String) +# source://spoom//lib/spoom/cli/srb/tc.rb#13 +Spoom::Cli::Srb::Tc::SORT_LOC = T.let(T.unsafe(nil), String) # source://spoom//lib/spoom/colors.rb#5 class Spoom::Color < ::T::Enum enums do - CLEAR = new - BOLD = new BLACK = new - RED = new - GREEN = new - YELLOW = new BLUE = new - MAGENTA = new + BOLD = new + CLEAR = new CYAN = new - WHITE = new + GREEN = new LIGHT_BLACK = new - LIGHT_RED = new - LIGHT_GREEN = new - LIGHT_YELLOW = new LIGHT_BLUE = new - LIGHT_MAGENTA = new LIGHT_CYAN = new + LIGHT_GREEN = new + LIGHT_MAGENTA = new + LIGHT_RED = new LIGHT_WHITE = new + LIGHT_YELLOW = new + MAGENTA = new + RED = new + WHITE = new + YELLOW = new end # source://spoom//lib/spoom/colors.rb#32 @@ -380,7 +426,7 @@ module Spoom::Context::Bundle # Returns `nil` if `gem` cannot be found in the Gemfile. # # source://spoom//lib/spoom/context/bundle.rb#62 - sig { params(gem: ::String).returns(T.nilable(::String)) } + sig { params(gem: ::String).returns(T.nilable(::Gem::Version)) } def gem_version_from_gemfile_lock(gem); end # source://spoom//lib/spoom/context/bundle.rb#51 @@ -579,7 +625,7 @@ module Spoom::Context::Git sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_show(*arg); end - # Is there uncommited changes in this context directory? + # Is there uncommitted changes in this context directory? # # source://spoom//lib/spoom/context/git.rb#132 sig { params(path: ::String).returns(T::Boolean) } @@ -958,7 +1004,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -1298,7 +1344,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -1353,42 +1399,20 @@ end # source://spoom//lib/spoom/deadcode/erb.rb#27 module Spoom::Deadcode class << self - # source://spoom//lib/spoom/deadcode.rb#51 - sig do - params( - index: ::Spoom::Deadcode::Index, - erb: ::String, - file: ::String, - plugins: T::Array[::Spoom::Deadcode::Plugins::Base] - ).void - end - def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode.rb#40 - sig do - params( - index: ::Spoom::Deadcode::Index, - ruby: ::String, - file: ::String, - plugins: T::Array[::Spoom::Deadcode::Plugins::Base] - ).void - end - def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode/plugins.rb#74 - sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + # source://spoom//lib/spoom/deadcode/plugins.rb#75 + sig { params(context: ::Spoom::Context).returns(T::Array[T.class_of(Spoom::Deadcode::Plugins::Base)]) } def load_custom_plugins(context); end - # source://spoom//lib/spoom/deadcode/plugins.rb#60 - sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + # source://spoom//lib/spoom/deadcode/plugins.rb#61 + sig { params(context: ::Spoom::Context).returns(T::Set[T.class_of(Spoom::Deadcode::Plugins::Base)]) } def plugins_from_gemfile_lock(context); end end end -# source://spoom//lib/spoom/deadcode/plugins.rb#25 +# source://spoom//lib/spoom/deadcode/plugins.rb#26 Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/deadcode/plugins.rb#27 +# source://spoom//lib/spoom/deadcode/plugins.rb#28 Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set) # A definition is a class, module, method, constant, etc. being defined in the code @@ -1398,7 +1422,7 @@ class Spoom::Deadcode::Definition < ::T::Struct const :kind, ::Spoom::Deadcode::Definition::Kind const :name, ::String const :full_name, ::String - const :location, ::Spoom::Deadcode::Location + const :location, ::Spoom::Location const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) # source://spoom//lib/spoom/deadcode/definition.rb#78 @@ -1449,8 +1473,14 @@ class Spoom::Deadcode::Definition < ::T::Struct sig { returns(T::Boolean) } def module?; end + # Utils + # + # source://spoom//lib/spoom/deadcode/definition.rb#100 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end + class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -1510,44 +1540,35 @@ end # source://spoom//lib/spoom/deadcode/erb.rb#63 Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/deadcode.rb#20 -class Spoom::Deadcode::Error < ::Spoom::Error - abstract! - - # source://spoom//lib/spoom/deadcode.rb#27 - sig { params(message: ::String, parent: ::Exception).void } - def initialize(message, parent:); end -end - # source://spoom//lib/spoom/deadcode/index.rb#6 class Spoom::Deadcode::Index - # source://spoom//lib/spoom/deadcode/index.rb#16 - sig { void } - def initialize; end + # source://spoom//lib/spoom/deadcode/index.rb#29 + sig { params(model: ::Spoom::Model).void } + def initialize(model); end - # source://spoom//lib/spoom/deadcode/index.rb#51 + # source://spoom//lib/spoom/deadcode/index.rb#219 sig { returns(T::Array[::Spoom::Deadcode::Definition]) } def all_definitions; end - # source://spoom//lib/spoom/deadcode/index.rb#56 - sig { returns(T::Array[::Spoom::Deadcode::Reference]) } + # source://spoom//lib/spoom/deadcode/index.rb#224 + sig { returns(T::Array[::Spoom::Model::Reference]) } def all_references; end - # Indexing - # - # source://spoom//lib/spoom/deadcode/index.rb#24 + # source://spoom//lib/spoom/deadcode/index.rb#99 + sig { params(plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def apply_plugins!(plugins); end + + # source://spoom//lib/spoom/deadcode/index.rb#79 sig { params(definition: ::Spoom::Deadcode::Definition).void } def define(definition); end - # source://spoom//lib/spoom/deadcode/index.rb#10 + # source://spoom//lib/spoom/deadcode/index.rb#23 sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } def definitions; end # Utils # - # source://spoom//lib/spoom/deadcode/index.rb#46 + # source://spoom//lib/spoom/deadcode/index.rb#214 sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } def definitions_for_name(name); end @@ -1555,398 +1576,192 @@ class Spoom::Deadcode::Index # # To be called once all the files have been indexed and all the definitions and references discovered. # - # source://spoom//lib/spoom/deadcode/index.rb#37 + # source://spoom//lib/spoom/deadcode/index.rb#122 sig { void } def finalize!; end - # source://spoom//lib/spoom/deadcode/index.rb#29 - sig { params(reference: ::Spoom::Deadcode::Reference).void } - def reference(reference); end + # source://spoom//lib/spoom/deadcode/index.rb#94 + sig { params(symbol_def: ::Spoom::Model::SymbolDef).void } + def ignore(symbol_def); end - # source://spoom//lib/spoom/deadcode/index.rb#13 - sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) } + # source://spoom//lib/spoom/deadcode/index.rb#50 + sig { params(erb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_erb(erb, file:, plugins: T.unsafe(nil)); end + + # Indexing + # + # source://spoom//lib/spoom/deadcode/index.rb#39 + sig { params(file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_file(file, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/index.rb#55 + sig { params(rb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_ruby(rb, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/index.rb#20 + sig { returns(::Spoom::Model) } + def model; end + + # source://spoom//lib/spoom/deadcode/index.rb#84 + sig { params(name: ::String, location: ::Spoom::Location).void } + def reference_constant(name, location); end + + # source://spoom//lib/spoom/deadcode/index.rb#89 + sig { params(name: ::String, location: ::Spoom::Location).void } + def reference_method(name, location); end + + # source://spoom//lib/spoom/deadcode/index.rb#26 + sig { returns(T::Hash[::String, T::Array[::Spoom::Model::Reference]]) } def references; end end +# source://spoom//lib/spoom/deadcode/index.rb#9 +class Spoom::Deadcode::Index::Error < ::Spoom::Error + # source://spoom//lib/spoom/deadcode/index.rb#13 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end + # source://spoom//lib/spoom/deadcode/indexer.rb#6 -class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor +class Spoom::Deadcode::Indexer < ::Spoom::Visitor # source://spoom//lib/spoom/deadcode/indexer.rb#16 sig do params( path: ::String, - source: ::String, index: ::Spoom::Deadcode::Index, plugins: T::Array[::Spoom::Deadcode::Plugins::Base] ).void end - def initialize(path, source, index, plugins: T.unsafe(nil)); end + def initialize(path, index, plugins: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/indexer.rb#459 - sig do - params( - node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward)) - ).returns(T::Array[::SyntaxTree::Node]) - end - def call_args(node); end + # source://spoom//lib/spoom/deadcode/indexer.rb#13 + sig { returns(::Spoom::Deadcode::Index) } + def index; end - # Context - # - # source://spoom//lib/spoom/deadcode/indexer.rb#367 - sig { returns(::SyntaxTree::Node) } - def current_node; end + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + sig { returns(::String) } + def path; end - # Definition indexing + # Visit # - # source://spoom//lib/spoom/deadcode/indexer.rb#281 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_attr_reader(name, full_name, node); end + # source://spoom//lib/spoom/deadcode/indexer.rb#27 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#293 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_attr_writer(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins.rb#36 +Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) - # source://spoom//lib/spoom/deadcode/indexer.rb#305 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_class(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins/base.rb#8 +module Spoom::Deadcode::Plugins; end - # source://spoom//lib/spoom/deadcode/indexer.rb#317 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_constant(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7 +class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#329 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_method(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#7 +class Spoom::Deadcode::Plugins::ActionMailerPreview < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#13 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#341 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_module(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7 +class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end - # @return [String] - # - # source://spoom//lib/spoom/deadcode/indexer.rb#10 - def file_name; end + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#39 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#13 - sig { returns(::Spoom::Deadcode::Index) } - def index; end +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#12 +Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#426 - sig { returns(T.nilable(::String)) } - def last_sig; end +# source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7 +class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end - # source://spoom//lib/spoom/deadcode/indexer.rb#386 - sig { returns(T.nilable(::SyntaxTree::BlockNode)) } - def nesting_block; end +# source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7 +class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#391 - sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) } - def nesting_block_call; end +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7 +class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#396 - sig { returns(T.nilable(::String)) } - def nesting_block_call_name; end +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64 +Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#381 - sig { returns(T.nilable(::SyntaxTree::ClassDeclaration)) } - def nesting_class; end +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20 +Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#410 - sig { returns(T.nilable(::String)) } - def nesting_class_name; end +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49 +Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#418 - sig { returns(T.nilable(::String)) } - def nesting_class_superclass_name; end +# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7 +class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#22 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#372 - sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) } - def nesting_node(type); end +# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#19 +Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#445 - sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } - def node_location(node); end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode/plugins/base.rb#9 +class Spoom::Deadcode::Plugins::Base + abstract! - # Node utils - # - # source://spoom//lib/spoom/deadcode/indexer.rb#435 - sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } - def node_string(node); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#132 + sig { params(index: ::Spoom::Deadcode::Index).void } + def initialize(index); end - # source://spoom//lib/spoom/deadcode/indexer.rb#10 - sig { returns(::String) } - def path; end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#129 + sig { returns(::Spoom::Deadcode::Index) } + def index; end - # Reference indexing + # Do not override this method, use `on_define_accessor` instead. # - # source://spoom//lib/spoom/deadcode/indexer.rb#355 - sig { params(name: ::String, node: ::SyntaxTree::Node).void } - def reference_constant(name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#360 - sig { params(name: ::String, node: ::SyntaxTree::Node).void } - def reference_method(name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#450 - sig { params(node: ::SyntaxTree::Node).returns(::String) } - def symbol_string(node); end - - # Visit - # - # source://spoom//lib/spoom/deadcode/indexer.rb#35 - sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } - def visit(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#45 - sig { override.params(node: ::SyntaxTree::AliasNode).void } - def visit_alias(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#50 - sig { override.params(node: ::SyntaxTree::ARef).void } - def visit_aref(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#57 - sig { override.params(node: ::SyntaxTree::ARefField).void } - def visit_aref_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#64 - sig { override.params(node: ::SyntaxTree::ArgBlock).void } - def visit_arg_block(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#78 - sig { override.params(node: ::SyntaxTree::Binary).void } - def visit_binary(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#94 - sig { override.params(node: ::SyntaxTree::CallNode).void } - def visit_call(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#106 - sig { override.params(node: ::SyntaxTree::ClassDeclaration).void } - def visit_class(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#119 - sig { override.params(node: ::SyntaxTree::Command).void } - def visit_command(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#131 - sig { override.params(node: ::SyntaxTree::CommandCall).void } - def visit_command_call(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#144 - sig { override.params(node: ::SyntaxTree::Const).void } - def visit_const(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#149 - sig { override.params(node: ::SyntaxTree::ConstPathField).void } - def visit_const_path_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#159 - sig { override.params(node: ::SyntaxTree::DefNode).void } - def visit_def(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#167 - sig { override.params(node: ::SyntaxTree::Field).void } - def visit_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#183 - sig { override.params(node: ::SyntaxTree::ModuleDeclaration).void } - def visit_module(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#195 - sig { override.params(node: ::SyntaxTree::OpAssign).void } - def visit_opassign(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#204 - sig { params(send: ::Spoom::Deadcode::Send).void } - def visit_send(send); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#243 - sig { override.params(node: ::SyntaxTree::SymbolLiteral).void } - def visit_symbol_literal(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#252 - sig { override.params(node: ::SyntaxTree::TopConstField).void } - def visit_top_const_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#257 - sig { override.params(node: ::SyntaxTree::VarField).void } - def visit_var_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#274 - sig { override.params(node: ::SyntaxTree::VCall).void } - def visit_vcall(node); end -end - -# source://spoom//lib/spoom/deadcode.rb#34 -class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error; end - -# source://spoom//lib/spoom/deadcode/location.rb#6 -class Spoom::Deadcode::Location - include ::Comparable - - # source://spoom//lib/spoom/deadcode/location.rb#54 - sig do - params( - file: ::String, - start_line: ::Integer, - start_column: ::Integer, - end_line: ::Integer, - end_column: ::Integer - ).void - end - def initialize(file, start_line, start_column, end_line, end_column); end - - # source://spoom//lib/spoom/deadcode/location.rb#74 - sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } - def <=>(other); end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def end_column; end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def end_line; end - - # source://spoom//lib/spoom/deadcode/location.rb#40 - sig { returns(::String) } - def file; end - - # source://spoom//lib/spoom/deadcode/location.rb#63 - sig { params(other: ::Spoom::Deadcode::Location).returns(T::Boolean) } - def include?(other); end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def start_column; end - - # source://spoom//lib/spoom/deadcode/location.rb#43 - sig { returns(::Integer) } - def start_line; end - - # source://spoom//lib/spoom/deadcode/location.rb#81 - sig { returns(::String) } - def to_s; end - - class << self - # @raise [LocationError] - # - # source://spoom//lib/spoom/deadcode/location.rb#17 - sig { params(location_string: ::String).returns(::Spoom::Deadcode::Location) } - def from_string(location_string); end - - # source://spoom//lib/spoom/deadcode/location.rb#34 - sig { params(file: ::String, location: ::SyntaxTree::Location).returns(::Spoom::Deadcode::Location) } - def from_syntax_tree(file, location); end - end -end - -# source://spoom//lib/spoom/deadcode/location.rb#11 -class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end - -# source://spoom//lib/spoom/deadcode/plugins.rb#35 -Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) - -# source://spoom//lib/spoom/deadcode.rb#33 -class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end - -# source://spoom//lib/spoom/deadcode/plugins/base.rb#8 -module Spoom::Deadcode::Plugins; end - -# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7 -class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base - # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7 -class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base - # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end - - # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#10 -Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7 -class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end - -# source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7 -class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base - # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7 -class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base - # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64 -Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20 -Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49 -Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7 -class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base; end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/deadcode/plugins/base.rb#9 -class Spoom::Deadcode::Plugins::Base - abstract! - - # Do not override this method, use `on_define_accessor` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#150 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_accessor(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#158 + sig { params(definition: ::Spoom::Model::Attr).void } + def internal_on_define_accessor(definition); end # Do not override this method, use `on_define_class` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#174 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_class(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#182 + sig { params(definition: ::Spoom::Model::Class).void } + def internal_on_define_class(definition); end # Do not override this method, use `on_define_constant` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#204 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_constant(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#212 + sig { params(definition: ::Spoom::Model::Constant).void } + def internal_on_define_constant(definition); end # Do not override this method, use `on_define_method` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_method(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#238 + sig { params(definition: ::Spoom::Model::Method).void } + def internal_on_define_method(definition); end # Do not override this method, use `on_define_module` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_module(indexer, definition); end - - # Do not override this method, use `on_send` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def internal_on_send(indexer, send); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#264 + sig { params(definition: ::Spoom::Model::Module).void } + def internal_on_define_module(definition); end # Called when an accessor is defined. # @@ -1956,15 +1771,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_accessor(indexer, definition) - # definition.ignored! if definition.name == "foo" + # def on_define_accessor(definition) + # @index.ignore(definition) if symbol_def.name == "foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#144 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_accessor(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#152 + sig { params(definition: ::Spoom::Model::Attr).void } + def on_define_accessor(definition); end # Called when a class is defined. # @@ -1974,15 +1789,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_class(indexer, definition) - # definition.ignored! if definition.name == "Foo" + # def on_define_class(definition) + # @index.ignore(definition) if definition.name == "Foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#168 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#176 + sig { params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # Called when a constant is defined. # @@ -1992,15 +1807,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_constant(indexer, definition) - # definition.ignored! if definition.name == "FOO" + # def on_define_constant(definition) + # @index.ignore(definition) if definition.name == "FOO" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#198 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#206 + sig { params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end # Called when a method is defined. # @@ -2010,17 +1825,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_method(indexer, definition) - # super # So the `ignore_method_names` DSL is still applied - # - # definition.ignored! if definition.name == "foo" + # def on_define_method(definition) + # @index.ignore(definition) if definition.name == "foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#226 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 + sig { params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end # Called when a module is defined. # @@ -2030,76 +1843,80 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_module(indexer, definition) - # definition.ignored! if definition.name == "Foo" + # def on_define_module(definition) + # @index.ignore(definition) if definition.name == "Foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#252 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 + sig { params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end # Called when a send is being processed # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_send(indexer, send) + # def on_send(send) # return unless send.name == "dsl_method" # return if send.args.empty? # - # method_name = indexer.node_string(send.args.first).delete_prefix(":") - # indexer.reference_method(method_name, send.node) + # method_name = send.args.first.slice.delete_prefix(":") + # @index.reference_method(method_name, send.node, send.loc) # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#278 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 + sig { params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end private # Plugin utils # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#339 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#352 sig { params(name: ::String).returns(::String) } def camelize(name); end - # DSL support - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#301 sig { params(name: T.nilable(::String)).returns(T::Boolean) } def ignored_class_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#307 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#320 sig { params(name: ::String).returns(T::Boolean) } def ignored_constant_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#312 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#325 sig { params(name: ::String).returns(T::Boolean) } def ignored_method_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#317 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#330 sig { params(name: ::String).returns(T::Boolean) } def ignored_module_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#322 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#335 sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) } def ignored_name?(name, names_variable, patterns_variable); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#300 - sig { params(superclass_name: T.nilable(::String)).returns(T::Boolean) } - def ignored_subclass?(superclass_name); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#308 + sig { params(definition: ::Spoom::Model::Class).returns(T::Boolean) } + def ignored_subclass?(definition); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#327 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#340 sig { params(const: ::Symbol).returns(T::Set[::String]) } def names(const); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#332 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#345 sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } def patterns(const); end + # DSL support + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + sig { params(definition: ::Spoom::Model::Namespace, superclass_name: ::String).returns(T::Boolean) } + def subclass_of?(definition, superclass_name); end + class << self # Mark classes directly subclassing a class matching `names` as ignored. # @@ -2208,32 +2025,36 @@ end # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#7 class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#28 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#7 class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end + + # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#28 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7 class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end private # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23 - sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } - def used_as_namespace?(indexer); end + sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } + def used_as_namespace?(symbol_def); end end # source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7 @@ -2242,18 +2063,18 @@ class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end # source://spoom//lib/spoom/deadcode/plugins/rails.rb#7 class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/rails.rb#13 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # source://spoom//lib/spoom/deadcode/plugins/rails.rb#18 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end private # source://spoom//lib/spoom/deadcode/plugins/rails.rb#25 - sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } - def file_is_helper?(indexer); end + sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } + def file_is_helper?(symbol_def); end end # source://spoom//lib/spoom/deadcode/plugins/rake.rb#7 @@ -2262,22 +2083,12 @@ class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#7 class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#18 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end - - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#23 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end - - private + sig { override.params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#30 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def rubocop_constant?(indexer, definition); end - - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#35 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def rubocop_method?(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#26 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end end # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10 @@ -2286,74 +2097,42 @@ Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set) # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7 class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end private - # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#50 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::SyntaxTree::Node).void } - def reference_symbol_as_constant(indexer, send, node); end + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#46 + sig { params(send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } + def reference_symbol_as_constant(send, node); end end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7 class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end private - # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#40 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def sorbet_enum_constant?(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#28 + sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } + def sorbet_enum_constant?(definition); end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def sorbet_type_member?(indexer, definition); end + sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } + def sorbet_type_member?(definition); end end # source://spoom//lib/spoom/deadcode/plugins/thor.rb#7 class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/thor.rb#13 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end -end - -# A reference is a call to a method or a constant -# -# source://spoom//lib/spoom/deadcode/reference.rb#7 -class Spoom::Deadcode::Reference < ::T::Struct - const :kind, ::Spoom::Deadcode::Reference::Kind - const :name, ::String - const :location, ::Spoom::Deadcode::Location - - # Kind - # - # source://spoom//lib/spoom/deadcode/reference.rb#24 - sig { returns(T::Boolean) } - def constant?; end - - # source://spoom//lib/spoom/deadcode/reference.rb#29 - sig { returns(T::Boolean) } - def method?; end - - class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/deadcode/reference.rb#10 -class Spoom::Deadcode::Reference::Kind < ::T::Enum - enums do - Constant = new - Method = new - end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end end # source://spoom//lib/spoom/deadcode/remover.rb#6 @@ -2363,135 +2142,135 @@ class Spoom::Deadcode::Remover def initialize(context); end # source://spoom//lib/spoom/deadcode/remover.rb#17 - sig { params(kind: ::Spoom::Deadcode::Definition::Kind, location: ::Spoom::Deadcode::Location).void } + sig { params(kind: T.nilable(::Spoom::Deadcode::Definition::Kind), location: ::Spoom::Location).returns(::String) } def remove_location(kind, location); end end # source://spoom//lib/spoom/deadcode/remover.rb#9 class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end -# source://spoom//lib/spoom/deadcode/remover.rb#348 +# source://spoom//lib/spoom/deadcode/remover.rb#372 class Spoom::Deadcode::Remover::NodeContext - # source://spoom//lib/spoom/deadcode/remover.rb#358 - sig { params(source: ::String, node: ::SyntaxTree::Node, nesting: T::Array[::SyntaxTree::Node]).void } - def initialize(source, node, nesting); end + # source://spoom//lib/spoom/deadcode/remover.rb#392 + sig do + params( + source: ::String, + comments: T::Hash[::Integer, ::Prism::Comment], + node: ::Prism::Node, + nesting: T::Array[::Prism::Node] + ).void + end + def initialize(source, comments, node, nesting); end - # source://spoom//lib/spoom/deadcode/remover.rb#467 - sig { returns(T::Array[::SyntaxTree::Node]) } - def attached_comments_and_sigs; end + # source://spoom//lib/spoom/deadcode/remover.rb#506 + sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) } + def attached_comments(node); end - # source://spoom//lib/spoom/deadcode/remover.rb#480 - sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) } + # source://spoom//lib/spoom/deadcode/remover.rb#534 + sig { returns(T.nilable(::Prism::CallNode)) } def attached_sig; end - # source://spoom//lib/spoom/deadcode/remover.rb#460 - sig { params(comment: ::SyntaxTree::Node, node: ::SyntaxTree::Node).returns(T::Boolean) } - def comment_for_node?(comment, node); end + # source://spoom//lib/spoom/deadcode/remover.rb#521 + sig { returns(T::Array[::Prism::Node]) } + def attached_sigs; end + + # source://spoom//lib/spoom/deadcode/remover.rb#376 + sig { returns(T::Hash[::Integer, ::Prism::Comment]) } + def comments; end - # source://spoom//lib/spoom/deadcode/remover.rb#355 - sig { returns(T::Array[::SyntaxTree::Node]) } + # source://spoom//lib/spoom/deadcode/remover.rb#494 + sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) } + def comments_between_lines(start_line, end_line); end + + # source://spoom//lib/spoom/deadcode/remover.rb#382 + sig { returns(T::Array[::Prism::Node]) } def nesting; end - # @return [Array<SyntaxTree::Node>] + # @return [Array<Prism::Node>] # - # source://spoom//lib/spoom/deadcode/remover.rb#355 + # source://spoom//lib/spoom/deadcode/remover.rb#382 def nesting=(_arg0); end - # source://spoom//lib/spoom/deadcode/remover.rb#407 - sig { returns(T.nilable(::SyntaxTree::Node)) } + # source://spoom//lib/spoom/deadcode/remover.rb#444 + sig { returns(T.nilable(::Prism::Node)) } def next_node; end - # source://spoom//lib/spoom/deadcode/remover.rb#397 - sig { returns(T::Array[::SyntaxTree::Node]) } + # @raise [Error] + # + # source://spoom//lib/spoom/deadcode/remover.rb#433 + sig { returns(T::Array[::Prism::Node]) } def next_nodes; end - # source://spoom//lib/spoom/deadcode/remover.rb#352 - sig { returns(::SyntaxTree::Node) } + # source://spoom//lib/spoom/deadcode/remover.rb#379 + sig { returns(::Prism::Node) } def node; end - # source://spoom//lib/spoom/deadcode/remover.rb#495 - sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } - def node_string(node); end - - # source://spoom//lib/spoom/deadcode/remover.rb#373 + # @raise [Error] + # + # source://spoom//lib/spoom/deadcode/remover.rb#408 sig { returns(::Spoom::Deadcode::Remover::NodeContext) } def parent_context; end - # source://spoom//lib/spoom/deadcode/remover.rb#365 - sig { returns(::SyntaxTree::Node) } + # @raise [Error] + # + # source://spoom//lib/spoom/deadcode/remover.rb#400 + sig { returns(::Prism::Node) } def parent_node; end - # source://spoom//lib/spoom/deadcode/remover.rb#392 - sig { returns(T.nilable(::SyntaxTree::Node)) } + # source://spoom//lib/spoom/deadcode/remover.rb#428 + sig { returns(T.nilable(::Prism::Node)) } def previous_node; end - # source://spoom//lib/spoom/deadcode/remover.rb#382 - sig { returns(T::Array[::SyntaxTree::Node]) } + # @raise [Error] + # + # source://spoom//lib/spoom/deadcode/remover.rb#417 + sig { returns(T::Array[::Prism::Node]) } def previous_nodes; end - # source://spoom//lib/spoom/deadcode/remover.rb#412 + # source://spoom//lib/spoom/deadcode/remover.rb#449 sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } def sclass_context; end - # source://spoom//lib/spoom/deadcode/remover.rb#451 - sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) } + # source://spoom//lib/spoom/deadcode/remover.rb#482 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def sorbet_extend_sig?(node); end - # source://spoom//lib/spoom/deadcode/remover.rb#438 - sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) } + # source://spoom//lib/spoom/deadcode/remover.rb#477 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def sorbet_signature?(node); end end -# source://spoom//lib/spoom/deadcode/remover.rb#505 -class Spoom::Deadcode::Remover::NodeFinder < ::SyntaxTree::Visitor - # source://spoom//lib/spoom/deadcode/remover.rb#554 - sig { params(location: ::Spoom::Deadcode::Location).void } - def initialize(location); end +# source://spoom//lib/spoom/deadcode/remover.rb#549 +class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor + # source://spoom//lib/spoom/deadcode/remover.rb#621 + sig { params(location: ::Spoom::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } + def initialize(location, kind); end - # source://spoom//lib/spoom/deadcode/remover.rb#548 - sig { returns(T.nilable(::SyntaxTree::Node)) } + # source://spoom//lib/spoom/deadcode/remover.rb#615 + sig { returns(T.nilable(::Prism::Node)) } def node; end - # source://spoom//lib/spoom/deadcode/remover.rb#551 - sig { returns(T::Array[::SyntaxTree::Node]) } + # source://spoom//lib/spoom/deadcode/remover.rb#618 + sig { returns(T::Array[::Prism::Node]) } def nodes_nesting; end - # @return [Array<SyntaxTree::Node>] - # - # source://spoom//lib/spoom/deadcode/remover.rb#551 - def nodes_nesting=(_arg0); end - - # source://spoom//lib/spoom/deadcode/remover.rb#562 - sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } + # source://spoom//lib/spoom/deadcode/remover.rb#630 + sig { override.params(node: T.nilable(::Prism::Node)).void } def visit(node); end - private - - # TODO: remove once SyntaxTree location are fixed - # - # source://spoom//lib/spoom/deadcode/remover.rb#601 - sig { params(node: ::SyntaxTree::Node, nodes: T::Array[::SyntaxTree::Node]).returns(::Spoom::Deadcode::Location) } - def location_from_children(node, nodes); end - - # TODO: remove once SyntaxTree location are fixed - # - # source://spoom//lib/spoom/deadcode/remover.rb#586 - sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } - def location_from_node(node); end - class << self - # source://spoom//lib/spoom/deadcode/remover.rb#512 + # source://spoom//lib/spoom/deadcode/remover.rb#556 sig do params( source: ::String, - location: ::Spoom::Deadcode::Location, - kind: ::Spoom::Deadcode::Definition::Kind + location: ::Spoom::Location, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) ).returns(::Spoom::Deadcode::Remover::NodeContext) end def find(source, location, kind); end - # source://spoom//lib/spoom/deadcode/remover.rb#531 - sig { params(node: ::SyntaxTree::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } + # source://spoom//lib/spoom/deadcode/remover.rb#590 + sig { params(node: ::Prism::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } def node_match_kind?(node, kind); end end end @@ -2502,8 +2281,8 @@ class Spoom::Deadcode::Remover::NodeRemover sig do params( source: ::String, - kind: ::Spoom::Deadcode::Definition::Kind, - location: ::Spoom::Deadcode::Location + kind: T.nilable(::Spoom::Deadcode::Definition::Kind), + location: ::Spoom::Location ).void end def initialize(source, kind, location); end @@ -2518,65 +2297,61 @@ class Spoom::Deadcode::Remover::NodeRemover private - # source://spoom//lib/spoom/deadcode/remover.rb#142 + # source://spoom//lib/spoom/deadcode/remover.rb#153 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_attr_accessor(context); end - # source://spoom//lib/spoom/deadcode/remover.rb#290 + # source://spoom//lib/spoom/deadcode/remover.rb#331 sig { params(start_char: ::Integer, end_char: ::Integer).void } def delete_chars(start_char, end_char); end - # source://spoom//lib/spoom/deadcode/remover.rb#69 + # source://spoom//lib/spoom/deadcode/remover.rb#73 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_constant_assignment(context); end - # source://spoom//lib/spoom/deadcode/remover.rb#300 - sig { params(line_number: ::Integer, start_column: ::Integer, end_column: ::Integer).void } - def delete_line_part(line_number, start_column, end_column); end - - # source://spoom//lib/spoom/deadcode/remover.rb#283 + # source://spoom//lib/spoom/deadcode/remover.rb#324 sig { params(start_line: ::Integer, end_line: ::Integer).void } def delete_lines(start_line, end_line); end - # source://spoom//lib/spoom/deadcode/remover.rb#250 + # source://spoom//lib/spoom/deadcode/remover.rb#261 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_node_and_comments_and_sigs(context); end - # source://spoom//lib/spoom/deadcode/remover.rb#207 + # source://spoom//lib/spoom/deadcode/remover.rb#218 sig do params( - node: ::SyntaxTree::Node, + node: ::Prism::Node, send_context: ::Spoom::Deadcode::Remover::NodeContext, was_removed: T::Boolean ).void end def insert_accessor(node, send_context, was_removed:); end - # source://spoom//lib/spoom/deadcode/remover.rb#295 + # source://spoom//lib/spoom/deadcode/remover.rb#336 sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void } def replace_chars(start_char, end_char, replacement); end - # source://spoom//lib/spoom/deadcode/remover.rb#315 + # source://spoom//lib/spoom/deadcode/remover.rb#341 sig do params( - node: ::SyntaxTree::MethodAddBlock, + node: ::Prism::CallNode, name: ::String, - kind: ::Spoom::Deadcode::Definition::Kind + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) ).returns(::String) end def transform_sig(node, name:, kind:); end end -# An abstraction to simplify handling of SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall and -# SyntaxTree::VCall nodes. +# An abstraction to simplify handling of Prism::CallNode nodes. # -# source://spoom//lib/spoom/deadcode/send.rb#8 +# source://spoom//lib/spoom/deadcode/send.rb#7 class Spoom::Deadcode::Send < ::T::Struct - const :node, ::SyntaxTree::Node + const :node, ::Prism::CallNode const :name, ::String - const :recv, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) - const :args, T::Array[::SyntaxTree::Node], default: T.unsafe(nil) - const :block, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + const :recv, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :args, T::Array[::Prism::Node], default: T.unsafe(nil) + const :block, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :location, ::Spoom::Location # source://spoom//lib/spoom/deadcode/send.rb#22 sig do @@ -2589,11 +2364,11 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg(arg_type, &block); end # source://spoom//lib/spoom/deadcode/send.rb#29 - sig { params(block: T.proc.params(key: ::SyntaxTree::Node, value: T.nilable(::SyntaxTree::Node)).void).void } + sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void } def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -2613,7 +2388,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -2708,16 +2483,10 @@ class Spoom::FileTree # Return a map of typing scores for each node in the tree # - # source://spoom//lib/spoom/file_tree.rb#67 + # source://spoom//lib/spoom/file_tree.rb#59 sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } def nodes_strictness_scores(context); end - # Return a map of strictnesses for each node in the tree - # - # source://spoom//lib/spoom/file_tree.rb#59 - sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } - def nodes_strictnesses(context); end - # All the paths in this tree # # source://spoom//lib/spoom/file_tree.rb#53 @@ -2726,18 +2495,14 @@ class Spoom::FileTree # Return a map of typing scores for each path in the tree # - # source://spoom//lib/spoom/file_tree.rb#75 + # source://spoom//lib/spoom/file_tree.rb#67 sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } def paths_strictness_scores(context); end - # source://spoom//lib/spoom/file_tree.rb#80 + # source://spoom//lib/spoom/file_tree.rb#72 sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end - # source://spoom//lib/spoom/file_tree.rb#86 - sig { params(context: ::Spoom::Context, out: T.any(::IO, ::StringIO), colors: T::Boolean).void } - def print_with_strictnesses(context, out: T.unsafe(nil), colors: T.unsafe(nil)); end - # All root nodes # # source://spoom//lib/spoom/file_tree.rb#39 @@ -2747,68 +2512,68 @@ end # A visitor that collects all the nodes in a tree # -# source://spoom//lib/spoom/file_tree.rb#140 +# source://spoom//lib/spoom/file_tree.rb#124 class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#147 + # source://spoom//lib/spoom/file_tree.rb#131 sig { void } def initialize; end - # source://spoom//lib/spoom/file_tree.rb#144 + # source://spoom//lib/spoom/file_tree.rb#128 sig { returns(T::Array[::Spoom::FileTree::Node]) } def nodes; end - # source://spoom//lib/spoom/file_tree.rb#153 + # source://spoom//lib/spoom/file_tree.rb#137 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end end # A visitor that collects the typing score of each node in a tree # -# source://spoom//lib/spoom/file_tree.rb#183 +# source://spoom//lib/spoom/file_tree.rb#167 class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses - # source://spoom//lib/spoom/file_tree.rb#190 + # source://spoom//lib/spoom/file_tree.rb#174 sig { params(context: ::Spoom::Context).void } def initialize(context); end - # source://spoom//lib/spoom/file_tree.rb#187 + # source://spoom//lib/spoom/file_tree.rb#171 sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } def scores; end - # source://spoom//lib/spoom/file_tree.rb#197 + # source://spoom//lib/spoom/file_tree.rb#181 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end private - # source://spoom//lib/spoom/file_tree.rb#206 + # source://spoom//lib/spoom/file_tree.rb#190 sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } def node_score(node); end - # source://spoom//lib/spoom/file_tree.rb#215 + # source://spoom//lib/spoom/file_tree.rb#199 sig { params(strictness: T.nilable(::String)).returns(::Float) } def strictness_score(strictness); end end # A visitor that collects the strictness of each node in a tree # -# source://spoom//lib/spoom/file_tree.rb#160 +# source://spoom//lib/spoom/file_tree.rb#144 class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#167 + # source://spoom//lib/spoom/file_tree.rb#151 sig { params(context: ::Spoom::Context).void } def initialize(context); end - # source://spoom//lib/spoom/file_tree.rb#164 + # source://spoom//lib/spoom/file_tree.rb#148 sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } def strictnesses; end - # source://spoom//lib/spoom/file_tree.rb#174 + # source://spoom//lib/spoom/file_tree.rb#158 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end end # A node representing either a file or a directory inside a FileTree # -# source://spoom//lib/spoom/file_tree.rb#94 +# source://spoom//lib/spoom/file_tree.rb#78 class Spoom::FileTree::Node < ::T::Struct const :parent, T.nilable(::Spoom::FileTree::Node) const :name, ::String @@ -2816,12 +2581,12 @@ class Spoom::FileTree::Node < ::T::Struct # Full path to this node from root # - # source://spoom//lib/spoom/file_tree.rb#108 + # source://spoom//lib/spoom/file_tree.rb#92 sig { returns(::String) } def path; end class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -2830,9 +2595,9 @@ end # # See `FileTree#print` # -# source://spoom//lib/spoom/file_tree.rb#228 +# source://spoom//lib/spoom/file_tree.rb#212 class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#238 + # source://spoom//lib/spoom/file_tree.rb#222 sig do params( strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], @@ -2842,13 +2607,13 @@ class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor end def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end - # source://spoom//lib/spoom/file_tree.rb#246 + # source://spoom//lib/spoom/file_tree.rb#230 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end private - # source://spoom//lib/spoom/file_tree.rb#271 + # source://spoom//lib/spoom/file_tree.rb#255 sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } def strictness_color(strictness); end end @@ -2857,19 +2622,19 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://spoom//lib/spoom/file_tree.rb#117 +# source://spoom//lib/spoom/file_tree.rb#101 class Spoom::FileTree::Visitor abstract! - # source://spoom//lib/spoom/file_tree.rb#129 + # source://spoom//lib/spoom/file_tree.rb#113 sig { params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end - # source://spoom//lib/spoom/file_tree.rb#134 + # source://spoom//lib/spoom/file_tree.rb#118 sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } def visit_nodes(nodes); end - # source://spoom//lib/spoom/file_tree.rb#124 + # source://spoom//lib/spoom/file_tree.rb#108 sig { params(tree: ::Spoom::FileTree).void } def visit_tree(tree); end end @@ -2887,10 +2652,10 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end - # Parse a line formated as `%h %at` into a `Commit` + # Parse a line formatted as `%h %at` into a `Commit` # # source://spoom//lib/spoom/context/git.rb#14 sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } @@ -2984,7 +2749,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct const :range, ::Spoom::LSP::Range const :code, ::Integer const :message, ::String - const :informations, ::Object + const :information, ::Object # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } @@ -2999,7 +2764,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -3032,7 +2797,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -3041,7 +2806,7 @@ end Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) # source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 -class Spoom::LSP::Error < ::StandardError; end +class Spoom::LSP::Error < ::Spoom::Error; end # source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end @@ -3090,7 +2855,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -3115,7 +2880,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -3178,7 +2943,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -3216,7 +2981,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -3282,7 +3047,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -3330,49 +3095,831 @@ class Spoom::LSP::SymbolPrinter < ::Spoom::Printer def seen; end end -# source://spoom//lib/spoom/printer.rb#7 -class Spoom::Printer - include ::Spoom::Colorize - - # source://spoom//lib/spoom/printer.rb#17 - sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } - def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end +# source://spoom//lib/spoom/location.rb#5 +class Spoom::Location + include ::Comparable - # Colorize `string` with color if `@colors` + # @raise [LocationError] # - # source://spoom//lib/spoom/printer.rb#78 - sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } - def colorize(string, *color); end + # source://spoom//lib/spoom/location.rb#73 + sig do + params( + file: ::String, + start_line: T.nilable(::Integer), + start_column: T.nilable(::Integer), + end_line: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file, start_line: T.unsafe(nil), start_column: T.unsafe(nil), end_line: T.unsafe(nil), end_column: T.unsafe(nil)); end - # Decrease indent level + # source://spoom//lib/spoom/location.rb#106 + sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } + def <=>(other); end + + # @return [Integer, nil] # - # source://spoom//lib/spoom/printer.rb#31 - sig { void } - def dedent; end + # source://spoom//lib/spoom/location.rb#62 + def end_column; end - # Increase indent level + # @return [Integer, nil] # - # source://spoom//lib/spoom/printer.rb#25 - sig { void } - def indent; end + # source://spoom//lib/spoom/location.rb#62 + def end_line; end - # source://spoom//lib/spoom/printer.rb#14 - sig { returns(T.any(::IO, ::StringIO)) } - def out; end + # source://spoom//lib/spoom/location.rb#59 + sig { returns(::String) } + def file; end - # @return [IO, StringIO] - # - # source://spoom//lib/spoom/printer.rb#14 - def out=(_arg0); end + # source://spoom//lib/spoom/location.rb#93 + sig { params(other: ::Spoom::Location).returns(T::Boolean) } + def include?(other); end - # Print `string` into `out` + # @return [Integer, nil] # - # source://spoom//lib/spoom/printer.rb#37 - sig { params(string: T.nilable(::String)).void } - def print(string); end + # source://spoom//lib/spoom/location.rb#62 + def start_column; end - # Print `string` colored with `color` into `out` - # + # source://spoom//lib/spoom/location.rb#62 + sig { returns(T.nilable(::Integer)) } + def start_line; end + + # source://spoom//lib/spoom/location.rb#129 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/location.rb#47 + sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Location) } + def from_prism(file, location); end + + # @raise [LocationError] + # + # source://spoom//lib/spoom/location.rb#16 + sig { params(location_string: ::String).returns(::Spoom::Location) } + def from_string(location_string); end + end +end + +# source://spoom//lib/spoom/location.rb#10 +class Spoom::Location::LocationError < ::Spoom::Error; end + +# source://spoom//lib/spoom/model/model.rb#5 +class Spoom::Model + # source://spoom//lib/spoom/model/model.rb#238 + sig { void } + def initialize; end + + # Get a symbol by it's full name + # + # Raises an error if the symbol is not found + # + # @raise [Error] + # + # source://spoom//lib/spoom/model/model.rb#247 + sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } + def [](full_name); end + + # source://spoom//lib/spoom/model/model.rb#296 + sig { void } + def finalize!; end + + # Register a new symbol by it's full name + # + # If the symbol already exists, it will be returned. + # + # source://spoom//lib/spoom/model/model.rb#258 + sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } + def register_symbol(full_name); end + + # source://spoom//lib/spoom/model/model.rb#263 + sig { params(full_name: ::String, context: ::Spoom::Model::Symbol).returns(::Spoom::Model::Symbol) } + def resolve_symbol(full_name, context:); end + + # source://spoom//lib/spoom/model/model.rb#290 + sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } + def subtypes(symbol); end + + # source://spoom//lib/spoom/model/model.rb#284 + sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } + def supertypes(symbol); end + + # All the symbols registered in this model + # + # source://spoom//lib/spoom/model/model.rb#232 + sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) } + def symbols; end + + # source://spoom//lib/spoom/model/model.rb#235 + sig { returns(Spoom::Poset[::Spoom::Model::Symbol]) } + def symbols_hierarchy; end + + private + + # source://spoom//lib/spoom/model/model.rb#303 + sig { void } + def compute_symbols_hierarchy!; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#179 +class Spoom::Model::Attr < ::Spoom::Model::Property + abstract! +end + +# source://spoom//lib/spoom/model/model.rb#185 +class Spoom::Model::AttrAccessor < ::Spoom::Model::Attr; end + +# source://spoom//lib/spoom/model/model.rb#183 +class Spoom::Model::AttrReader < ::Spoom::Model::Attr; end + +# source://spoom//lib/spoom/model/model.rb#184 +class Spoom::Model::AttrWriter < ::Spoom::Model::Attr; end + +# Populate a Model by visiting the nodes from a Ruby file +# +# source://spoom//lib/spoom/model/builder.rb#7 +class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor + # source://spoom//lib/spoom/model/builder.rb#11 + sig { params(model: ::Spoom::Model, file: ::String).void } + def initialize(model, file); end + + # Accessors + # + # source://spoom//lib/spoom/model/builder.rb#146 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # Classes + # + # source://spoom//lib/spoom/model/builder.rb#24 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # Constants + # + # source://spoom//lib/spoom/model/builder.rb#71 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/model/builder.rb#92 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Methods + # + # source://spoom//lib/spoom/model/builder.rb#127 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # Modules + # + # source://spoom//lib/spoom/model/builder.rb#55 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/model/builder.rb#106 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/model/builder.rb#39 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # source://spoom//lib/spoom/model/builder.rb#234 + sig { returns(T::Array[::Spoom::Model::Sig]) } + def collect_sigs; end + + # source://spoom//lib/spoom/model/builder.rb#229 + sig { returns(::Spoom::Model::Visibility) } + def current_visibility; end + + # source://spoom//lib/spoom/model/builder.rb#241 + sig { params(node: ::Prism::Node).returns(::Spoom::Location) } + def node_location(node); end +end + +# source://spoom//lib/spoom/model/model.rb#117 +class Spoom::Model::Class < ::Spoom::Model::Namespace + # source://spoom//lib/spoom/model/model.rb#129 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + superclass_name: T.nilable(::String) + ).void + end + def initialize(symbol, owner:, location:, superclass_name: T.unsafe(nil)); end + + # source://spoom//lib/spoom/model/model.rb#119 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/model/model.rb#119 + def superclass_name=(_arg0); end +end + +# source://spoom//lib/spoom/model/model.rb#138 +class Spoom::Model::Constant < ::Spoom::Model::SymbolDef + # source://spoom//lib/spoom/model/model.rb#143 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + value: ::String + ).void + end + def initialize(symbol, owner:, location:, value:); end + + # source://spoom//lib/spoom/model/model.rb#140 + sig { returns(::String) } + def value; end +end + +# source://spoom//lib/spoom/model/model.rb#8 +class Spoom::Model::Error < ::Spoom::Error; end + +# source://spoom//lib/spoom/model/model.rb#213 +class Spoom::Model::Extend < ::Spoom::Model::Mixin; end + +# source://spoom//lib/spoom/model/model.rb#211 +class Spoom::Model::Include < ::Spoom::Model::Mixin; end + +# source://spoom//lib/spoom/model/model.rb#177 +class Spoom::Model::Method < ::Spoom::Model::Property; end + +# A mixin (include, prepend, extend) to a namespace +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#196 +class Spoom::Model::Mixin + abstract! + + # source://spoom//lib/spoom/model/model.rb#206 + sig { params(name: ::String).void } + def initialize(name); end + + # source://spoom//lib/spoom/model/model.rb#203 + sig { returns(::String) } + def name; end +end + +# source://spoom//lib/spoom/model/model.rb#136 +class Spoom::Model::Module < ::Spoom::Model::Namespace; end + +# A class or module +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#97 +class Spoom::Model::Namespace < ::Spoom::Model::SymbolDef + abstract! + + # source://spoom//lib/spoom/model/model.rb#107 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location + ).void + end + def initialize(symbol, owner:, location:); end + + # source://spoom//lib/spoom/model/model.rb#101 + sig { returns(T::Array[::Spoom::Model::SymbolDef]) } + def children; end + + # source://spoom//lib/spoom/model/model.rb#104 + sig { returns(T::Array[::Spoom::Model::Mixin]) } + def mixins; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/namespace_visitor.rb#6 +class Spoom::Model::NamespaceVisitor < ::Spoom::Visitor + abstract! + + # source://spoom//lib/spoom/model/namespace_visitor.rb#12 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/model/namespace_visitor.rb#19 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end +end + +# source://spoom//lib/spoom/model/model.rb#212 +class Spoom::Model::Prepend < ::Spoom::Model::Mixin; end + +# A method or an attribute accessor +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#151 +class Spoom::Model::Property < ::Spoom::Model::SymbolDef + abstract! + + # source://spoom//lib/spoom/model/model.rb#169 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + visibility: ::Spoom::Model::Visibility, + sigs: T::Array[::Spoom::Model::Sig] + ).void + end + def initialize(symbol, owner:, location:, visibility:, sigs: T.unsafe(nil)); end + + # source://spoom//lib/spoom/model/model.rb#158 + sig { returns(T::Array[::Spoom::Model::Sig]) } + def sigs; end + + # source://spoom//lib/spoom/model/model.rb#155 + sig { returns(::Spoom::Model::Visibility) } + def visibility; end +end + +# A reference to something that looks like a constant or a method +# +# Constants could be classes, modules, or actual constants. +# Methods could be accessors, instance or class methods, aliases, etc. +# +# source://spoom//lib/spoom/model/reference.rb#10 +class Spoom::Model::Reference < ::T::Struct + const :kind, ::Spoom::Model::Reference::Kind + const :name, ::String + const :location, ::Spoom::Location + + # source://spoom//lib/spoom/model/reference.rb#39 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/model/reference.rb#44 + sig { returns(T::Boolean) } + def method?; end + + class << self + # source://spoom//lib/spoom/model/reference.rb#24 + sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } + def constant(name, location); end + + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 + def inherited(s); end + + # source://spoom//lib/spoom/model/reference.rb#29 + sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } + def method(name, location); end + end +end + +# source://spoom//lib/spoom/model/reference.rb#13 +class Spoom::Model::Reference::Kind < ::T::Enum + enums do + Constant = new + Method = new + end +end + +# Visit a file to collect all the references to constants and methods +# +# source://spoom//lib/spoom/model/references_visitor.rb#7 +class Spoom::Model::ReferencesVisitor < ::Spoom::Visitor + # source://spoom//lib/spoom/model/references_visitor.rb#14 + sig { params(file: ::String).void } + def initialize(file); end + + # source://spoom//lib/spoom/model/references_visitor.rb#11 + sig { returns(T::Array[::Spoom::Model::Reference]) } + def references; end + + # source://spoom//lib/spoom/model/references_visitor.rb#22 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#27 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#33 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#44 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#68 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#52 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#60 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#85 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#91 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#97 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#103 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#109 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#115 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#121 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#126 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#131 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#139 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#147 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#155 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#161 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#166 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#177 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + private + + # source://spoom//lib/spoom/model/references_visitor.rb#195 + sig { params(node: ::Prism::Node).returns(::Spoom::Location) } + def node_location(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#185 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_constant(name, node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#190 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_method(name, node); end +end + +# A Sorbet signature (sig block) +# +# source://spoom//lib/spoom/model/model.rb#216 +class Spoom::Model::Sig + # source://spoom//lib/spoom/model/model.rb#223 + sig { params(string: ::String).void } + def initialize(string); end + + # source://spoom//lib/spoom/model/model.rb#220 + sig { returns(::String) } + def string; end +end + +# source://spoom//lib/spoom/model/model.rb#115 +class Spoom::Model::SingletonClass < ::Spoom::Model::Namespace; end + +# A Symbol is a uniquely named entity in the Ruby codebase +# +# A symbol can have multiple definitions, e.g. a class can be reopened. +# Sometimes a symbol can have multiple definitions of different types, +# e.g. `foo` method can be defined both as a method and as an attribute accessor. +# +# source://spoom//lib/spoom/model/model.rb#15 +class Spoom::Model::Symbol + # source://spoom//lib/spoom/model/model.rb#27 + sig { params(full_name: ::String).void } + def initialize(full_name); end + + # The definitions of this symbol (where it exists in the code) + # + # source://spoom//lib/spoom/model/model.rb#24 + sig { returns(T::Array[::Spoom::Model::SymbolDef]) } + def definitions; end + + # The full, unique name of this symbol + # + # source://spoom//lib/spoom/model/model.rb#20 + sig { returns(::String) } + def full_name; end + + # The short name of this symbol + # + # source://spoom//lib/spoom/model/model.rb#34 + sig { returns(::String) } + def name; end + + # source://spoom//lib/spoom/model/model.rb#39 + sig { returns(::String) } + def to_s; end +end + +# A SymbolDef is a definition of a Symbol +# +# It can be a class, module, constant, method, etc. +# A SymbolDef has a location pointing to the actual code that defines the symbol. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#55 +class Spoom::Model::SymbolDef + abstract! + + # source://spoom//lib/spoom/model/model.rb#74 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location + ).void + end + def initialize(symbol, owner:, location:); end + + # The full name of the symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#85 + sig { returns(::String) } + def full_name; end + + # The actual code location of this definition + # + # source://spoom//lib/spoom/model/model.rb#71 + sig { returns(::Spoom::Location) } + def location; end + + # The short name of the symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#91 + sig { returns(::String) } + def name; end + + # The enclosing namespace this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#67 + sig { returns(T.nilable(::Spoom::Model::Namespace)) } + def owner; end + + # The symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#63 + sig { returns(::Spoom::Model::Symbol) } + def symbol; end +end + +# source://spoom//lib/spoom/model/model.rb#44 +class Spoom::Model::UnresolvedSymbol < ::Spoom::Model::Symbol + # source://spoom//lib/spoom/model/model.rb#46 + sig { override.returns(::String) } + def to_s; end +end + +# source://spoom//lib/spoom/model/model.rb#187 +class Spoom::Model::Visibility < ::T::Enum + enums do + Private = new + Protected = new + Public = new + end +end + +# source://spoom//lib/spoom/parse.rb#7 +class Spoom::ParseError < ::Spoom::Error; end + +# A Poset is a set of elements with a partial order relation. +# +# The partial order relation is a binary relation that is reflexive, antisymmetric, and transitive. +# It can be used to represent a hierarchy of classes or modules, the dependencies between gems, etc. +# +# source://spoom//lib/spoom/poset.rb#9 +class Spoom::Poset + extend T::Generic + + E = type_member { { upper: Object } } + + # source://spoom//lib/spoom/poset.rb#18 + sig { void } + def initialize; end + + # Get the POSet element for a given value + # + # Raises if the element is not found + # + # @raise [Error] + # + # source://spoom//lib/spoom/poset.rb#26 + sig { params(value: E).returns(Spoom::Poset::Element[E]) } + def [](value); end + + # Add a direct edge from one element to another + # + # Transitive edges (transitive closure) are automatically computed. + # Adds the elements if they don't exist. + # If the direct edge already exists, nothing is done. + # + # source://spoom//lib/spoom/poset.rb#54 + sig { params(from: E, to: E).void } + def add_direct_edge(from, to); end + + # Add an element to the POSet + # + # source://spoom//lib/spoom/poset.rb#35 + sig { params(value: E).returns(Spoom::Poset::Element[E]) } + def add_element(value); end + + # Is there a direct edge from `from` to `to`? + # + # source://spoom//lib/spoom/poset.rb#101 + sig { params(from: E, to: E).returns(T::Boolean) } + def direct_edge?(from, to); end + + # Is there an edge (direct or indirect) from `from` to `to`? + # + # source://spoom//lib/spoom/poset.rb#92 + sig { params(from: E, to: E).returns(T::Boolean) } + def edge?(from, to); end + + # Is the given value a element in the POSet? + # + # source://spoom//lib/spoom/poset.rb#44 + sig { params(value: E).returns(T::Boolean) } + def element?(value); end + + # Show the POSet as a DOT graph using xdot (used for debugging) + # + # source://spoom//lib/spoom/poset.rb#107 + sig { params(direct: T::Boolean, transitive: T::Boolean).void } + def show_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end + + # Return the POSet as a DOT graph + # + # source://spoom//lib/spoom/poset.rb#116 + sig { params(direct: T::Boolean, transitive: T::Boolean).returns(::String) } + def to_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end +end + +# An element in a POSet +# +# source://spoom//lib/spoom/poset.rb#136 +class Spoom::Poset::Element + extend T::Generic + include ::Comparable + + E = type_member { { upper: Object } } + + # source://spoom//lib/spoom/poset.rb#152 + sig { params(value: E).void } + def initialize(value); end + + # source://spoom//lib/spoom/poset.rb#161 + sig { params(other: T.untyped).returns(T.nilable(::Integer)) } + def <=>(other); end + + # Direct and indirect ancestors of this element + # + # source://spoom//lib/spoom/poset.rb#180 + sig { returns(T::Array[E]) } + def ancestors; end + + # Direct children of this element + # + # source://spoom//lib/spoom/poset.rb#186 + sig { returns(T::Array[E]) } + def children; end + + # Direct and indirect descendants of this element + # + # source://spoom//lib/spoom/poset.rb#192 + sig { returns(T::Array[E]) } + def descendants; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # @return [Set<Element[E]>] + # + # source://spoom//lib/spoom/poset.rb#149 + def dfroms; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # source://spoom//lib/spoom/poset.rb#149 + sig { returns(T::Set[Spoom::Poset::Element[E]]) } + def dtos; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # @return [Set<Element[E]>] + # + # source://spoom//lib/spoom/poset.rb#149 + def froms; end + + # Direct parents of this element + # + # source://spoom//lib/spoom/poset.rb#174 + sig { returns(T::Array[E]) } + def parents; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # @return [Set<Element[E]>] + # + # source://spoom//lib/spoom/poset.rb#149 + def tos; end + + # The value held by this element + # + # source://spoom//lib/spoom/poset.rb#145 + sig { returns(E) } + def value; end +end + +# source://spoom//lib/spoom/poset.rb#13 +class Spoom::Poset::Error < ::Spoom::Error; end + +# source://spoom//lib/spoom/printer.rb#7 +class Spoom::Printer + include ::Spoom::Colorize + + # source://spoom//lib/spoom/printer.rb#17 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end + + # Colorize `string` with color if `@colors` + # + # source://spoom//lib/spoom/printer.rb#78 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Decrease indent level + # + # source://spoom//lib/spoom/printer.rb#31 + sig { void } + def dedent; end + + # Increase indent level + # + # source://spoom//lib/spoom/printer.rb#25 + sig { void } + def indent; end + + # source://spoom//lib/spoom/printer.rb#14 + sig { returns(T.any(::IO, ::StringIO)) } + def out; end + + # @return [IO, StringIO] + # + # source://spoom//lib/spoom/printer.rb#14 + def out=(_arg0); end + + # Print `string` into `out` + # + # source://spoom//lib/spoom/printer.rb#37 + sig { params(string: T.nilable(::String)).void } + def print(string); end + + # Print `string` colored with `color` into `out` + # # Does not use colors unless `@colors`. # # source://spoom//lib/spoom/printer.rb#47 @@ -3517,7 +4064,7 @@ end Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) # source://spoom//lib/spoom/sorbet.rb#14 -class Spoom::Sorbet::Error < ::StandardError +class Spoom::Sorbet::Error < ::Spoom::Error # source://spoom//lib/spoom/sorbet.rb#29 sig { params(message: ::String, result: ::Spoom::ExecResult).void } def initialize(message, result); end @@ -3545,11 +4092,11 @@ end # source://spoom//lib/spoom/sorbet/errors.rb#7 Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/sorbet/errors.rb#125 +# source://spoom//lib/spoom/sorbet/errors.rb#127 class Spoom::Sorbet::Errors::Error include ::Comparable - # source://spoom//lib/spoom/sorbet/errors.rb#151 + # source://spoom//lib/spoom/sorbet/errors.rb#153 sig do params( file: T.nilable(::String), @@ -3563,39 +4110,39 @@ class Spoom::Sorbet::Errors::Error # By default errors are sorted by location # - # source://spoom//lib/spoom/sorbet/errors.rb#162 + # source://spoom//lib/spoom/sorbet/errors.rb#164 sig { params(other: T.untyped).returns(::Integer) } def <=>(other); end # @return [Integer, nil] # - # source://spoom//lib/spoom/sorbet/errors.rb#133 + # source://spoom//lib/spoom/sorbet/errors.rb#135 def code; end - # source://spoom//lib/spoom/sorbet/errors.rb#130 + # source://spoom//lib/spoom/sorbet/errors.rb#132 sig { returns(T.nilable(::String)) } def file; end # Other files associated with the error # - # source://spoom//lib/spoom/sorbet/errors.rb#140 + # source://spoom//lib/spoom/sorbet/errors.rb#142 sig { returns(T::Set[::String]) } def files_from_error_sections; end - # source://spoom//lib/spoom/sorbet/errors.rb#133 + # source://spoom//lib/spoom/sorbet/errors.rb#135 sig { returns(T.nilable(::Integer)) } def line; end # @return [String, nil] # - # source://spoom//lib/spoom/sorbet/errors.rb#130 + # source://spoom//lib/spoom/sorbet/errors.rb#132 def message; end - # source://spoom//lib/spoom/sorbet/errors.rb#136 + # source://spoom//lib/spoom/sorbet/errors.rb#138 sig { returns(T::Array[::String]) } def more; end - # source://spoom//lib/spoom/sorbet/errors.rb#169 + # source://spoom//lib/spoom/sorbet/errors.rb#171 sig { returns(::String) } def to_s; end end @@ -3604,46 +4151,55 @@ end # # source://spoom//lib/spoom/sorbet/errors.rb#18 class Spoom::Sorbet::Errors::Parser - # source://spoom//lib/spoom/sorbet/errors.rb#43 + # source://spoom//lib/spoom/sorbet/errors.rb#45 sig { params(error_url_base: ::String).void } def initialize(error_url_base: T.unsafe(nil)); end - # source://spoom//lib/spoom/sorbet/errors.rb#50 + # source://spoom//lib/spoom/sorbet/errors.rb#52 sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } def parse(output); end private - # source://spoom//lib/spoom/sorbet/errors.rb#114 + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#116 sig { params(line: ::String).void } def append_error(line); end - # source://spoom//lib/spoom/sorbet/errors.rb#106 + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#108 sig { void } def close_error; end - # source://spoom//lib/spoom/sorbet/errors.rb#73 + # source://spoom//lib/spoom/sorbet/errors.rb#75 sig { params(error_url_base: ::String).returns(::Regexp) } def error_line_match_regexp(error_url_base); end - # source://spoom//lib/spoom/sorbet/errors.rb#90 + # source://spoom//lib/spoom/sorbet/errors.rb#92 sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } def match_error_line(line); end - # source://spoom//lib/spoom/sorbet/errors.rb#99 + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#101 sig { params(error: ::Spoom::Sorbet::Errors::Error).void } def open_error(error); end class << self - # source://spoom//lib/spoom/sorbet/errors.rb#36 + # source://spoom//lib/spoom/sorbet/errors.rb#38 sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } def parse_string(output, error_url_base: T.unsafe(nil)); end end end -# source://spoom//lib/spoom/sorbet/errors.rb#21 +# source://spoom//lib/spoom/sorbet/errors.rb#23 Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) +# source://spoom//lib/spoom/sorbet/errors.rb#21 +class Spoom::Sorbet::Errors::Parser::ParseError < ::Spoom::Error; end + # source://spoom//lib/spoom/sorbet.rb#37 Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) @@ -3775,3 +4331,602 @@ end # source://spoom//lib/spoom/version.rb#5 Spoom::VERSION = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/visitor.rb#7 +class Spoom::Visitor < ::Prism::Visitor + # source://spoom//lib/spoom/visitor.rb#16 + sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#21 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/visitor.rb#26 + sig { override.params(node: ::Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#31 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/visitor.rb#36 + sig { override.params(node: ::Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # source://spoom//lib/spoom/visitor.rb#41 + sig { override.params(node: ::Prism::ArrayNode).void } + def visit_array_node(node); end + + # source://spoom//lib/spoom/visitor.rb#46 + sig { override.params(node: ::Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#51 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://spoom//lib/spoom/visitor.rb#56 + sig { override.params(node: ::Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # source://spoom//lib/spoom/visitor.rb#61 + sig { override.params(node: ::Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#66 + sig { override.params(node: ::Prism::BeginNode).void } + def visit_begin_node(node); end + + # source://spoom//lib/spoom/visitor.rb#71 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/visitor.rb#76 + sig { override.params(node: ::Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#81 + sig { override.params(node: ::Prism::BlockNode).void } + def visit_block_node(node); end + + # source://spoom//lib/spoom/visitor.rb#86 + sig { override.params(node: ::Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#91 + sig { override.params(node: ::Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # source://spoom//lib/spoom/visitor.rb#96 + sig { override.params(node: ::Prism::BreakNode).void } + def visit_break_node(node); end + + # source://spoom//lib/spoom/visitor.rb#101 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#106 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/visitor.rb#111 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#116 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#121 + sig { override.params(node: ::Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#126 + sig { override.params(node: ::Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#131 + sig { override.params(node: ::Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # source://spoom//lib/spoom/visitor.rb#136 + sig { override.params(node: ::Prism::CaseNode).void } + def visit_case_node(node); end + + # source://spoom//lib/spoom/visitor.rb#11 + sig { override.params(node: ::Prism::Node).void } + def visit_child_nodes(node); end + + # source://spoom//lib/spoom/visitor.rb#141 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/visitor.rb#146 + sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#151 + sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#156 + sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#161 + sig { override.params(node: ::Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#166 + sig { override.params(node: ::Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#171 + sig { override.params(node: ::Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#176 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#181 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#186 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#191 + sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#196 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # source://spoom//lib/spoom/visitor.rb#201 + sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#206 + sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#211 + sig { override.params(node: ::Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#216 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#221 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#226 + sig { override.params(node: ::Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#231 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#236 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://spoom//lib/spoom/visitor.rb#241 + sig { override.params(node: ::Prism::DefinedNode).void } + def visit_defined_node(node); end + + # source://spoom//lib/spoom/visitor.rb#246 + sig { override.params(node: ::Prism::ElseNode).void } + def visit_else_node(node); end + + # source://spoom//lib/spoom/visitor.rb#251 + sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # source://spoom//lib/spoom/visitor.rb#256 + sig { override.params(node: ::Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#261 + sig { override.params(node: ::Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # source://spoom//lib/spoom/visitor.rb#266 + sig { override.params(node: ::Prism::FalseNode).void } + def visit_false_node(node); end + + # source://spoom//lib/spoom/visitor.rb#271 + sig { override.params(node: ::Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#276 + sig { override.params(node: ::Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # source://spoom//lib/spoom/visitor.rb#281 + sig { override.params(node: ::Prism::FloatNode).void } + def visit_float_node(node); end + + # source://spoom//lib/spoom/visitor.rb#286 + sig { override.params(node: ::Prism::ForNode).void } + def visit_for_node(node); end + + # source://spoom//lib/spoom/visitor.rb#291 + sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # source://spoom//lib/spoom/visitor.rb#296 + sig { override.params(node: ::Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#301 + sig { override.params(node: ::Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # source://spoom//lib/spoom/visitor.rb#306 + sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#311 + sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#316 + sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#321 + sig { override.params(node: ::Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#326 + sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#331 + sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#336 + sig { override.params(node: ::Prism::HashNode).void } + def visit_hash_node(node); end + + # source://spoom//lib/spoom/visitor.rb#341 + sig { override.params(node: ::Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#346 + sig { override.params(node: ::Prism::IfNode).void } + def visit_if_node(node); end + + # source://spoom//lib/spoom/visitor.rb#351 + sig { override.params(node: ::Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # source://spoom//lib/spoom/visitor.rb#356 + sig { override.params(node: ::Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # source://spoom//lib/spoom/visitor.rb#361 + sig { override.params(node: ::Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # source://spoom//lib/spoom/visitor.rb#366 + sig { override.params(node: ::Prism::InNode).void } + def visit_in_node(node); end + + # source://spoom//lib/spoom/visitor.rb#371 + sig { override.params(node: ::Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#376 + sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#381 + sig { override.params(node: ::Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#386 + sig { override.params(node: ::Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#391 + sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#396 + sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#401 + sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#406 + sig { override.params(node: ::Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#411 + sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#416 + sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#421 + sig { override.params(node: ::Prism::IntegerNode).void } + def visit_integer_node(node); end + + # source://spoom//lib/spoom/visitor.rb#426 + sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # source://spoom//lib/spoom/visitor.rb#431 + sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # source://spoom//lib/spoom/visitor.rb#436 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#441 + sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # source://spoom//lib/spoom/visitor.rb#446 + sig { override.params(node: ::Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#451 + sig { override.params(node: ::Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # source://spoom//lib/spoom/visitor.rb#456 + sig { override.params(node: ::Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#461 + sig { override.params(node: ::Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # source://spoom//lib/spoom/visitor.rb#466 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#471 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#476 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#481 + sig { override.params(node: ::Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#486 + sig { override.params(node: ::Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#491 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#496 + sig { override.params(node: ::Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # source://spoom//lib/spoom/visitor.rb#501 + sig { override.params(node: ::Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # source://spoom//lib/spoom/visitor.rb#506 + sig { override.params(node: ::Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # source://spoom//lib/spoom/visitor.rb#511 + sig { override.params(node: ::Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#516 + sig { override.params(node: ::Prism::MissingNode).void } + def visit_missing_node(node); end + + # source://spoom//lib/spoom/visitor.rb#521 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/visitor.rb#526 + sig { override.params(node: ::Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#531 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#536 + sig { override.params(node: ::Prism::NextNode).void } + def visit_next_node(node); end + + # source://spoom//lib/spoom/visitor.rb#541 + sig { override.params(node: ::Prism::NilNode).void } + def visit_nil_node(node); end + + # source://spoom//lib/spoom/visitor.rb#546 + sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#551 + sig { override.params(node: ::Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # source://spoom//lib/spoom/visitor.rb#556 + sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#561 + sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#566 + sig { override.params(node: ::Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#571 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + # source://spoom//lib/spoom/visitor.rb#576 + sig { override.params(node: ::Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # source://spoom//lib/spoom/visitor.rb#581 + sig { override.params(node: ::Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # source://spoom//lib/spoom/visitor.rb#586 + sig { override.params(node: ::Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # source://spoom//lib/spoom/visitor.rb#591 + sig { override.params(node: ::Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#596 + sig { override.params(node: ::Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # source://spoom//lib/spoom/visitor.rb#601 + sig { override.params(node: ::Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # source://spoom//lib/spoom/visitor.rb#606 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://spoom//lib/spoom/visitor.rb#611 + sig { override.params(node: ::Prism::RangeNode).void } + def visit_range_node(node); end + + # source://spoom//lib/spoom/visitor.rb#616 + sig { override.params(node: ::Prism::RationalNode).void } + def visit_rational_node(node); end + + # source://spoom//lib/spoom/visitor.rb#621 + sig { override.params(node: ::Prism::RedoNode).void } + def visit_redo_node(node); end + + # source://spoom//lib/spoom/visitor.rb#626 + sig { override.params(node: ::Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # source://spoom//lib/spoom/visitor.rb#631 + sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#636 + sig { override.params(node: ::Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#641 + sig { override.params(node: ::Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # source://spoom//lib/spoom/visitor.rb#646 + sig { override.params(node: ::Prism::RescueNode).void } + def visit_rescue_node(node); end + + # source://spoom//lib/spoom/visitor.rb#651 + sig { override.params(node: ::Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#656 + sig { override.params(node: ::Prism::RetryNode).void } + def visit_retry_node(node); end + + # source://spoom//lib/spoom/visitor.rb#661 + sig { override.params(node: ::Prism::ReturnNode).void } + def visit_return_node(node); end + + # source://spoom//lib/spoom/visitor.rb#666 + sig { override.params(node: ::Prism::SelfNode).void } + def visit_self_node(node); end + + # source://spoom//lib/spoom/visitor.rb#671 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # source://spoom//lib/spoom/visitor.rb#676 + sig { override.params(node: ::Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # source://spoom//lib/spoom/visitor.rb#681 + sig { override.params(node: ::Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # source://spoom//lib/spoom/visitor.rb#686 + sig { override.params(node: ::Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # source://spoom//lib/spoom/visitor.rb#691 + sig { override.params(node: ::Prism::SplatNode).void } + def visit_splat_node(node); end + + # source://spoom//lib/spoom/visitor.rb#696 + sig { override.params(node: ::Prism::StatementsNode).void } + def visit_statements_node(node); end + + # source://spoom//lib/spoom/visitor.rb#701 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#706 + sig { override.params(node: ::Prism::SuperNode).void } + def visit_super_node(node); end + + # source://spoom//lib/spoom/visitor.rb#711 + sig { override.params(node: ::Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # source://spoom//lib/spoom/visitor.rb#716 + sig { override.params(node: ::Prism::TrueNode).void } + def visit_true_node(node); end + + # source://spoom//lib/spoom/visitor.rb#721 + sig { override.params(node: ::Prism::UndefNode).void } + def visit_undef_node(node); end + + # source://spoom//lib/spoom/visitor.rb#726 + sig { override.params(node: ::Prism::UnlessNode).void } + def visit_unless_node(node); end + + # source://spoom//lib/spoom/visitor.rb#731 + sig { override.params(node: ::Prism::UntilNode).void } + def visit_until_node(node); end + + # source://spoom//lib/spoom/visitor.rb#736 + sig { override.params(node: ::Prism::WhenNode).void } + def visit_when_node(node); end + + # source://spoom//lib/spoom/visitor.rb#741 + sig { override.params(node: ::Prism::WhileNode).void } + def visit_while_node(node); end + + # source://spoom//lib/spoom/visitor.rb#746 + sig { override.params(node: ::Prism::XStringNode).void } + def visit_x_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#751 + sig { override.params(node: ::Prism::YieldNode).void } + def visit_yield_node(node); end +end diff --git a/sorbet/rbi/gems/standard-custom@1.0.2.rbi b/sorbet/rbi/gems/standard-custom@1.0.2.rbi index bf1213b..92187ab 100644 --- a/sorbet/rbi/gems/standard-custom@1.0.2.rbi +++ b/sorbet/rbi/gems/standard-custom@1.0.2.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `standard-custom` gem. # Please instead update this file by running `bin/tapioca gem standard-custom`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/standard-performance@1.3.1.rbi b/sorbet/rbi/gems/standard-performance@1.5.0.rbi similarity index 99% rename from sorbet/rbi/gems/standard-performance@1.3.1.rbi rename to sorbet/rbi/gems/standard-performance@1.5.0.rbi index ef43ff2..075414b 100644 --- a/sorbet/rbi/gems/standard-performance@1.3.1.rbi +++ b/sorbet/rbi/gems/standard-performance@1.5.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `standard-performance` gem. # Please instead update this file by running `bin/tapioca gem standard-performance`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi b/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi index 7e48b70..9898ded 100644 --- a/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi +++ b/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `standard-sorbet` gem. # Please instead update this file by running `bin/tapioca gem standard-sorbet`. + # source://standard-sorbet//lib/standard/sorbet/version.rb#1 module Standard; end diff --git a/sorbet/rbi/gems/standard@1.34.0.rbi b/sorbet/rbi/gems/standard@1.41.1.rbi similarity index 74% rename from sorbet/rbi/gems/standard@1.34.0.rbi rename to sorbet/rbi/gems/standard@1.41.1.rbi index 2c252ed..a4e9b9f 100644 --- a/sorbet/rbi/gems/standard@1.34.0.rbi +++ b/sorbet/rbi/gems/standard@1.41.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `standard` gem. # Please instead update this file by running `bin/tapioca gem standard`. + # source://standard//lib/standard/rubocop/ext.rb#1 module RuboCop; end @@ -14,75 +15,75 @@ class RuboCop::CommentConfig # source://standard//lib/standard/rubocop/ext.rb#20 def initialize(processed_source); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#63 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://forwardable/1.3.3/forwardable.rb#231 - def config(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#51 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#51 def cop_disabled_line_ranges; end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#39 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#39 def cop_enabled_at_line?(cop, line_number); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#47 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#47 def cop_opted_in?(cop); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#55 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#55 def extra_enabled_comments; end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#30 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#30 def processed_source; end - # source://forwardable/1.3.3/forwardable.rb#231 - def registry(*args, **_arg1, &block); end + # source://rubocop-ast/1.33.1/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end private - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#96 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#96 def analyze; end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#124 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#124 def analyze_cop(analysis, directive); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#144 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#144 def analyze_disabled(analysis, directive); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#155 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#155 def analyze_rest(analysis, directive); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#135 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#135 def analyze_single_line(analysis, directive); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#164 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#164 def cop_line_ranges(analysis); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#170 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#170 def each_directive; end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#69 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#69 def extra_enabled_comments_with_names(extras:, names:); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#190 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#190 def handle_enable_all(directive, names, extras); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#204 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#204 def handle_switch(directive, names, extras); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#115 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#115 def inject_disabled_cops_directives(analyses); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#183 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#183 def non_comment_token_line_numbers; end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#34 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#34 def old_initialize(processed_source); end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#83 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#83 def opt_in_cops; end - # source://rubocop/1.60.2/lib/rubocop/comment_config.rb#179 + # source://rubocop/1.66.1/lib/rubocop/comment_config.rb#179 def qualified_cop_name(cop_name); end end @@ -94,114 +95,114 @@ class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base # source://standard//lib/standard/rubocop/ext.rb#4 def message(_); end - # source://rubocop/1.60.2/lib/rubocop/cop/lint/assignment_in_condition.rb#55 + # source://rubocop/1.66.1/lib/rubocop/cop/lint/assignment_in_condition.rb#55 def on_if(node); end - # source://rubocop/1.60.2/lib/rubocop/cop/lint/assignment_in_condition.rb#55 + # source://rubocop/1.66.1/lib/rubocop/cop/lint/assignment_in_condition.rb#55 def on_until(node); end - # source://rubocop/1.60.2/lib/rubocop/cop/lint/assignment_in_condition.rb#55 + # source://rubocop/1.66.1/lib/rubocop/cop/lint/assignment_in_condition.rb#55 def on_while(node); end private - # source://rubocop/1.60.2/lib/rubocop/cop/lint/assignment_in_condition.rb#82 + # source://rubocop/1.66.1/lib/rubocop/cop/lint/assignment_in_condition.rb#82 def allowed_construct?(asgn_node); end - # source://rubocop/1.60.2/lib/rubocop/cop/lint/assignment_in_condition.rb#86 + # source://rubocop/1.66.1/lib/rubocop/cop/lint/assignment_in_condition.rb#86 def conditional_assignment?(asgn_node); end - # source://rubocop/1.60.2/lib/rubocop/cop/lint/assignment_in_condition.rb#90 + # source://rubocop/1.66.1/lib/rubocop/cop/lint/assignment_in_condition.rb#90 def skip_children?(asgn_node); end - # source://rubocop/1.60.2/lib/rubocop/cop/lint/assignment_in_condition.rb#96 + # source://rubocop/1.66.1/lib/rubocop/cop/lint/assignment_in_condition.rb#96 def traverse_node(node, &block); end end # source://standard//lib/standard/rubocop/ext.rb#9 class RuboCop::DirectiveComment - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#30 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#32 def initialize(comment, cop_registry = T.unsafe(nil)); end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#80 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#82 def all_cops?; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#28 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#30 def comment; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#85 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#87 def cop_names; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#28 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#30 def cop_registry; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#28 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#30 def cops; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#91 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#93 def department_names; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#105 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#107 def directive_count; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#60 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#62 def disabled?; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#75 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#77 def disabled_all?; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#65 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#67 def enabled?; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#70 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#72 def enabled_all?; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#96 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#98 def in_directive_department?(cop); end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#110 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#112 def line_number; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#42 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#44 def match?(cop_names); end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#55 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#57 def match_captures; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#28 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#30 def mode; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#101 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#103 def overridden_by_department?(cop); end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#46 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#48 def range; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#37 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#39 def single_line?; end private - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#130 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#133 def all_cop_names; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#134 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#137 def cop_names_for_department(department); end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#126 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#129 def department?(name); end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#140 - def exclude_redundant_directive_cop(cops); end + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#142 + def exclude_lint_department_cops(cops); end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#120 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#122 def parsed_cop_names; end - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#116 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#118 def splitted_cops_string; end class << self - # source://rubocop/1.60.2/lib/rubocop/directive_comment.rb#24 + # source://rubocop/1.66.1/lib/rubocop/directive_comment.rb#26 def before_comment(line); end end end @@ -460,9 +461,66 @@ class Standard::LoadsYamlConfig def normalized_ruby_version(version); end end -# source://standard//lib/standard/lsp/standardizer.rb#4 +# source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#2 module Standard::Lsp; end +# source://standard//lib/standard/lsp/diagnostic.rb#3 +class Standard::Lsp::Diagnostic + # @return [Diagnostic] a new instance of Diagnostic + # + # source://standard//lib/standard/lsp/diagnostic.rb#16 + def initialize(document_encoding, offense, uri, cop_class); end + + # source://standard//lib/standard/lsp/diagnostic.rb#23 + def to_lsp_code_actions; end + + # source://standard//lib/standard/lsp/diagnostic.rb#32 + def to_lsp_diagnostic(config); end + + private + + # source://standard//lib/standard/lsp/diagnostic.rb#77 + def autocorrect_action; end + + # source://standard//lib/standard/lsp/diagnostic.rb#69 + def code_description(config); end + + # @return [Boolean] + # + # source://standard//lib/standard/lsp/diagnostic.rb#163 + def correctable?; end + + # source://standard//lib/standard/lsp/diagnostic.rb#108 + def disable_line_action; end + + # source://standard//lib/standard/lsp/diagnostic.rb#167 + def ensure_uri_scheme(uri); end + + # source://standard//lib/standard/lsp/diagnostic.rb#148 + def length_of_line(line); end + + # source://standard//lib/standard/lsp/diagnostic.rb#126 + def line_disable_comment; end + + # source://standard//lib/standard/lsp/diagnostic.rb#59 + def message; end + + # source://standard//lib/standard/lsp/diagnostic.rb#96 + def offense_replacements; end + + # source://standard//lib/standard/lsp/diagnostic.rb#65 + def severity; end +end + +# source://standard//lib/standard/lsp/diagnostic.rb#4 +Standard::Lsp::Diagnostic::Constant = LanguageServer::Protocol::Constant + +# source://standard//lib/standard/lsp/diagnostic.rb#5 +Standard::Lsp::Diagnostic::Interface = LanguageServer::Protocol::Interface + +# source://standard//lib/standard/lsp/diagnostic.rb#7 +Standard::Lsp::Diagnostic::RUBOCOP_TO_LSP_SEVERITY = T.let(T.unsafe(nil), Hash) + # source://standard//lib/standard/lsp/kills_server.rb#3 class Standard::Lsp::KillsServer # source://standard//lib/standard/lsp/kills_server.rb#4 @@ -474,12 +532,12 @@ class Standard::Lsp::Logger # @return [Logger] a new instance of Logger # # source://standard//lib/standard/lsp/logger.rb#4 - def initialize; end + def initialize(prefix: T.unsafe(nil)); end - # source://standard//lib/standard/lsp/logger.rb#8 + # source://standard//lib/standard/lsp/logger.rb#9 def puts(message); end - # source://standard//lib/standard/lsp/logger.rb#12 + # source://standard//lib/standard/lsp/logger.rb#13 def puts_once(message); end end @@ -499,27 +557,27 @@ class Standard::Lsp::Routes # source://standard//lib/standard/lsp/routes.rb#26 def handle_initialize(request); end - # source://standard//lib/standard/lsp/routes.rb#42 + # source://standard//lib/standard/lsp/routes.rb#38 def handle_initialized(request); end - # source://standard//lib/standard/lsp/routes.rb#132 + # source://standard//lib/standard/lsp/routes.rb#129 def handle_method_missing(request); end - # source://standard//lib/standard/lsp/routes.rb#46 + # source://standard//lib/standard/lsp/routes.rb#42 def handle_shutdown(request); end - # source://standard//lib/standard/lsp/routes.rb#124 + # source://standard//lib/standard/lsp/routes.rb#121 def handle_unsupported_method(request, method = T.unsafe(nil)); end private - # source://standard//lib/standard/lsp/routes.rb#165 + # source://standard//lib/standard/lsp/routes.rb#162 def diagnostic(file_uri, text); end - # source://standard//lib/standard/lsp/routes.rb#144 + # source://standard//lib/standard/lsp/routes.rb#141 def format_file(file_uri); end - # source://standard//lib/standard/lsp/routes.rb#140 + # source://standard//lib/standard/lsp/routes.rb#137 def uri_to_path(uri); end class << self @@ -528,6 +586,9 @@ class Standard::Lsp::Routes end end +# source://standard//lib/standard/lsp/routes.rb#75 +Standard::Lsp::Routes::CONFIGURATION_FILE_PATTERNS = T.let(T.unsafe(nil), Array) + # source://standard//lib/standard/lsp/server.rb#9 Standard::Lsp::SEV = LanguageServer::Protocol::Constant::DiagnosticSeverity @@ -542,42 +603,57 @@ class Standard::Lsp::Server def start; end end -# source://standard//lib/standard/lsp/standardizer.rb#5 +# source://standard//lib/standard/lsp/standardizer.rb#6 class Standard::Lsp::Standardizer # @return [Standardizer] a new instance of Standardizer # - # source://standard//lib/standard/lsp/standardizer.rb#6 - def initialize(config, logger); end + # source://standard//lib/standard/lsp/standardizer.rb#7 + def initialize(config); end + + # source://standard//lib/standard/lsp/standardizer.rb#15 + def format(path, text); end + + # source://standard//lib/standard/lsp/standardizer.rb#20 + def offenses(path, text, document_encoding = T.unsafe(nil)); end +end + +# Originally lifted from: +# https://github.com/Shopify/ruby-lsp/blob/8d4c17efce4e8ecc8e7c557ab2981db6b22c0b6d/lib/ruby_lsp/requests/support/rubocop_runner.rb#L20 +# +# source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#5 +class Standard::Lsp::StdinRubocopRunner < ::RuboCop::Runner + # @return [StdinRubocopRunner] a new instance of StdinRubocopRunner + # + # source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#21 + def initialize(config); end - # This abuses the --stdin option of rubocop and reads the formatted text - # from the options[:stdin] that rubocop mutates. This depends on - # parallel: false as well as the fact that rubocop doesn't otherwise dup - # or reassign that options object. Risky business! + # Returns the value of attribute config_for_working_directory. # - # Reassigning options[:stdin] is done here: - # https://github.com/rubocop/rubocop/blob/master/lib/rubocop/cop/team.rb#L131 - # Printing options[:stdin] - # https://github.com/rubocop/rubocop/blob/master/lib/rubocop/cli/command/execute_runner.rb#L95 - # Setting `parallel: true` would break this here: - # https://github.com/rubocop/rubocop/blob/master/lib/rubocop/runner.rb#L72 + # source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#10 + def config_for_working_directory; end + + # source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#60 + def formatted_source; end + + # Returns the value of attribute offenses. # - # source://standard//lib/standard/lsp/standardizer.rb#23 - def format(path, text); end + # source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#8 + def offenses; end - # source://standard//lib/standard/lsp/standardizer.rb#29 - def offenses(path, text); end + # source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#35 + def run(path, contents); end private - # source://standard//lib/standard/lsp/standardizer.rb#59 - def capture_rubocop_stdout(config); end - - # source://standard//lib/standard/lsp/standardizer.rb#50 - def fork_config(path, text, format:); end + # source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#66 + def file_finished(_file, offenses); end end -# source://standard//lib/standard/lsp/standardizer.rb#44 -Standard::Lsp::Standardizer::BASE_OPTIONS = T.let(T.unsafe(nil), Hash) +# source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#6 +class Standard::Lsp::StdinRubocopRunner::ConfigurationError < ::StandardError; end + +# source://standard//lib/standard/lsp/stdin_rubocop_runner.rb#12 +Standard::Lsp::StdinRubocopRunner::DEFAULT_RUBOCOP_OPTIONS = T.let(T.unsafe(nil), Hash) # source://standard//lib/standard/merges_settings.rb#4 class Standard::MergesSettings diff --git a/sorbet/rbi/gems/stringio@3.1.0.rbi b/sorbet/rbi/gems/stringio@3.1.1.rbi similarity index 99% rename from sorbet/rbi/gems/stringio@3.1.0.rbi rename to sorbet/rbi/gems/stringio@3.1.1.rbi index 01a26ea..0b17e91 100644 --- a/sorbet/rbi/gems/stringio@3.1.0.rbi +++ b/sorbet/rbi/gems/stringio@3.1.1.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `stringio` gem. # Please instead update this file by running `bin/tapioca gem stringio`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/syntax_tree@6.2.0.rbi b/sorbet/rbi/gems/syntax_tree@6.2.0.rbi deleted file mode 100644 index 597be4c..0000000 --- a/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +++ /dev/null @@ -1,23133 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `syntax_tree` gem. -# Please instead update this file by running `bin/tapioca gem syntax_tree`. - -# Syntax Tree is a suite of tools built on top of the internal CRuby parser. It -# provides the ability to generate a syntax tree from source, as well as the -# tools necessary to inspect and manipulate that syntax tree. It can be used to -# build formatters, linters, language servers, and more. -# -# source://syntax_tree//lib/syntax_tree/node.rb#3 -module SyntaxTree - class << self - # Parses the given source and returns the formatted source. - # - # source://syntax_tree//lib/syntax_tree.rb#60 - def format(source, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end - - # Parses the given file and returns the formatted source. - # - # source://syntax_tree//lib/syntax_tree.rb#76 - def format_file(filepath, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end - - # Accepts a node in the tree and returns the formatted source. - # - # source://syntax_tree//lib/syntax_tree.rb#86 - def format_node(source, node, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end - - # Indexes the given source code to return a list of all class, module, and - # method definitions. Used to quickly provide indexing capability for IDEs or - # documentation generation. - # - # source://syntax_tree//lib/syntax_tree.rb#103 - def index(source); end - - # Indexes the given file to return a list of all class, module, and method - # definitions. Used to quickly provide indexing capability for IDEs or - # documentation generation. - # - # source://syntax_tree//lib/syntax_tree.rb#110 - def index_file(filepath); end - - # A convenience method for creating a new mutation visitor. - # - # @yield [visitor] - # - # source://syntax_tree//lib/syntax_tree.rb#115 - def mutation; end - - # Parses the given source and returns the syntax tree. - # - # source://syntax_tree//lib/syntax_tree.rb#122 - def parse(source); end - - # Parses the given file and returns the syntax tree. - # - # source://syntax_tree//lib/syntax_tree.rb#129 - def parse_file(filepath); end - - # Returns the source from the given filepath taking into account any potential - # magic encoding comments. - # - # source://syntax_tree//lib/syntax_tree.rb#135 - def read(filepath); end - - # This is a hook provided so that plugins can register themselves as the - # handler for a particular file type. - # - # source://syntax_tree//lib/syntax_tree.rb#150 - def register_handler(extension, handler); end - - # Searches through the given source using the given pattern and yields each - # node in the tree that matches the pattern to the given block. - # - # source://syntax_tree//lib/syntax_tree.rb#156 - def search(source, query, &block); end - - # Searches through the given file using the given pattern and yields each - # node in the tree that matches the pattern to the given block. - # - # source://syntax_tree//lib/syntax_tree.rb#165 - def search_file(filepath, query, &block); end - end -end - -# ARef represents when you're pulling a value out of a collection at a -# specific index. Put another way, it's any time you're calling the method -# #[]. -# -# collection[index] -# -# The nodes usually contains two children, the collection and the index. In -# some cases, you don't necessarily have the second child node, because you -# can call procs with a pretty esoteric syntax. In the following example, you -# wouldn't have a second child node: -# -# collection[] -# -# source://syntax_tree//lib/syntax_tree/node.rb#567 -class SyntaxTree::ARef < ::SyntaxTree::Node - # @return [ARef] a new instance of ARef - # - # source://syntax_tree//lib/syntax_tree/node.rb#577 - def initialize(collection:, index:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#632 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#584 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#588 - def child_nodes; end - - # [Node] the value being indexed - # - # source://syntax_tree//lib/syntax_tree/node.rb#569 - def collection; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#575 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#592 - def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#588 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#606 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#615 - def format(q); end - - # [nil | Args] the value being passed within the brackets - # - # source://syntax_tree//lib/syntax_tree/node.rb#572 - def index; end -end - -# ARefField represents assigning values into collections at specific indices. -# Put another way, it's any time you're calling the method #[]=. The -# ARefField node itself is just the left side of the assignment, and they're -# always wrapped in assign nodes. -# -# collection[index] = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#645 -class SyntaxTree::ARefField < ::SyntaxTree::Node - # @return [ARefField] a new instance of ARefField - # - # source://syntax_tree//lib/syntax_tree/node.rb#655 - def initialize(collection:, index:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#710 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#662 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#666 - def child_nodes; end - - # [Node] the value being indexed - # - # source://syntax_tree//lib/syntax_tree/node.rb#647 - def collection; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#653 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#670 - def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#666 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#684 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#693 - def format(q); end - - # [nil | Args] the value being passed within the brackets - # - # source://syntax_tree//lib/syntax_tree/node.rb#650 - def index; end -end - -# Alias represents the use of the +alias+ keyword with regular arguments (not -# global variables). The +alias+ keyword is used to make a method respond to -# another name as well as the current one. -# -# alias aliased_name name -# -# For the example above, in the current context you can now call aliased_name -# and it will execute the name method. When you're aliasing two methods, you -# can either provide bare words (like the example above) or you can provide -# symbols (note that this includes dynamic symbols like -# :"left-#{middle}-right"). -# -# source://syntax_tree//lib/syntax_tree/node.rb#458 -class SyntaxTree::AliasNode < ::SyntaxTree::Node - # @return [AliasNode] a new instance of AliasNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#496 - def initialize(left:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#545 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#503 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#507 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#494 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#511 - def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#507 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#525 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#529 - def format(q); end - - # [DynaSymbol | GVar | SymbolLiteral] the new name of the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#488 - def left; end - - # [Backref | DynaSymbol | GVar | SymbolLiteral] the old name of the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#491 - def right; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#549 - def var_alias?; end -end - -# Formats an argument to the alias keyword. For symbol literals it uses the -# value of the symbol directly to look like bare words. -# -# source://syntax_tree//lib/syntax_tree/node.rb#461 -class SyntaxTree::AliasNode::AliasArgumentFormatter - # @return [AliasArgumentFormatter] a new instance of AliasArgumentFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#466 - def initialize(argument); end - - # [Backref | DynaSymbol | GVar | SymbolLiteral] the argument being passed - # to alias - # - # source://syntax_tree//lib/syntax_tree/node.rb#464 - def argument; end - - # source://syntax_tree//lib/syntax_tree/node.rb#470 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#478 - def format(q); end -end - -# ArgBlock represents using a block operator on an expression. -# -# method(&expression) -# -# source://syntax_tree//lib/syntax_tree/node.rb#887 -class SyntaxTree::ArgBlock < ::SyntaxTree::Node - # @return [ArgBlock] a new instance of ArgBlock - # - # source://syntax_tree//lib/syntax_tree/node.rb#894 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#930 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#900 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#904 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#892 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#908 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#904 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#921 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#925 - def format(q); end - - # [nil | Node] the expression being turned into a block - # - # source://syntax_tree//lib/syntax_tree/node.rb#889 - def value; end -end - -# ArgParen represents wrapping arguments to a method inside a set of -# parentheses. -# -# method(argument) -# -# In the example above, there would be an ArgParen node around the Args node -# that represents the set of arguments being sent to the method method. The -# argument child node can be +nil+ if no arguments were passed, as in: -# -# method() -# -# source://syntax_tree//lib/syntax_tree/node.rb#727 -class SyntaxTree::ArgParen < ::SyntaxTree::Node - # @return [ArgParen] a new instance of ArgParen - # - # source://syntax_tree//lib/syntax_tree/node.rb#735 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#784 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#741 - def accept(visitor); end - - # [nil | Args | ArgsForward] the arguments inside the - # parentheses - # - # source://syntax_tree//lib/syntax_tree/node.rb#730 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#788 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#745 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#733 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#749 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#745 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#762 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#766 - def format(q); end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#794 - def trailing_comma?; end -end - -# Star represents using a splat operator on an expression. -# -# method(*arguments) -# -# source://syntax_tree//lib/syntax_tree/node.rb#939 -class SyntaxTree::ArgStar < ::SyntaxTree::Node - # @return [ArgStar] a new instance of ArgStar - # - # source://syntax_tree//lib/syntax_tree/node.rb#946 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#982 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#952 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#956 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#944 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#960 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#956 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#973 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#977 - def format(q); end - - # [nil | Node] the expression being splatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#941 - def value; end -end - -# Args represents a list of arguments being passed to a method call or array -# literal. -# -# method(first, second, third) -# -# source://syntax_tree//lib/syntax_tree/node.rb#821 -class SyntaxTree::Args < ::SyntaxTree::Node - # @return [Args] a new instance of Args - # - # source://syntax_tree//lib/syntax_tree/node.rb#828 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#863 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#834 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#867 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#838 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#826 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#842 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#838 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#855 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#859 - def format(q); end - - # [Array[ Node ]] the arguments that this node wraps - # - # source://syntax_tree//lib/syntax_tree/node.rb#823 - def parts; end -end - -# ArgsForward represents forwarding all kinds of arguments onto another method -# call. -# -# def request(method, path, **headers, &block); end -# -# def get(...) -# request(:GET, ...) -# end -# -# def post(...) -# request(:POST, ...) -# end -# -# In the example above, both the get and post methods are forwarding all of -# their arguments (positional, keyword, and block) on to the request method. -# The ArgsForward node appears in both the caller (the request method calls) -# and the callee (the get and post definitions). -# -# source://syntax_tree//lib/syntax_tree/node.rb#1004 -class SyntaxTree::ArgsForward < ::SyntaxTree::Node - # @return [ArgsForward] a new instance of ArgsForward - # - # source://syntax_tree//lib/syntax_tree/node.rb#1008 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1038 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1013 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1042 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1017 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1006 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1021 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1017 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1030 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1034 - def format(q); end -end - -# ArrayLiteral represents an array literal, which can optionally contain -# elements. -# -# [] -# [one, two, three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#1053 -class SyntaxTree::ArrayLiteral < ::SyntaxTree::Node - # @return [ArrayLiteral] a new instance of ArrayLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#1153 - def initialize(lbracket:, contents:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1229 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1160 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1164 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1151 - def comments; end - - # [nil | Args] the contents of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#1148 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1168 - def copy(lbracket: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1164 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1182 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1191 - def format(q); end - - # [nil | LBracket | QSymbolsBeg | QWordsBeg | SymbolsBeg | WordsBeg] the - # bracket that opens this array - # - # source://syntax_tree//lib/syntax_tree/node.rb#1145 - def lbracket; end - - private - - # If we have an empty array that contains only comments, then we're going - # to do some special printing to ensure they get indented correctly. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1259 - def empty_with_comments?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1251 - def qsymbols?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1236 - def qwords?; end -end - -# source://syntax_tree//lib/syntax_tree/node.rb#1063 -SyntaxTree::ArrayLiteral::BREAKABLE_SPACE_SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::ArrayLiteral::BreakableSpaceSeparator) - -# It's very common to use seplist with ->(q) { q.breakable_space }. We wrap -# that pattern into an object to cut down on having to create a bunch of -# lambdas all over the place. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1057 -class SyntaxTree::ArrayLiteral::BreakableSpaceSeparator - # source://syntax_tree//lib/syntax_tree/node.rb#1058 - def call(q); end -end - -# This is a special formatter used if the array literal contains no values -# but _does_ contain comments. In this case we do some special formatting to -# make sure the comments gets indented properly. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1120 -class SyntaxTree::ArrayLiteral::EmptyWithCommentsFormatter - # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#1124 - def initialize(lbracket); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1128 - def format(q); end - - # [LBracket] the opening bracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#1122 - def lbracket; end -end - -# Formats an array of multiple simple symbol literals into the %i syntax. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1094 -class SyntaxTree::ArrayLiteral::QSymbolsFormatter - # @return [QSymbolsFormatter] a new instance of QSymbolsFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#1098 - def initialize(contents); end - - # [Args] the contents of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#1096 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1102 - def format(q); end -end - -# Formats an array of multiple simple string literals into the %w syntax. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1066 -class SyntaxTree::ArrayLiteral::QWordsFormatter - # @return [QWordsFormatter] a new instance of QWordsFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#1070 - def initialize(contents); end - - # [Args] the contents of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#1068 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1074 - def format(q); end -end - -# When we're implementing the === operator for a node, we oftentimes need to -# compare two arrays. We want to skip over the === definition of array and use -# our own here, so we do that using this module. -# -# source://syntax_tree//lib/syntax_tree/node.rb#157 -module SyntaxTree::ArrayMatch - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#158 - def call(left, right); end - end -end - -# AryPtn represents matching against an array pattern using the Ruby 2.7+ -# pattern matching syntax. It’s one of the more complicated nodes, because -# the four parameters that it accepts can almost all be nil. -# -# case [1, 2, 3] -# in [Integer, Integer] -# "matched" -# in Container[Integer, Integer] -# "matched" -# in [Integer, *, Integer] -# "matched" -# end -# -# An AryPtn node is created with four parameters: an optional constant -# wrapper, an array of positional matches, an optional splat with identifier, -# and an optional array of positional matches that occur after the splat. -# All of the in clauses above would create an AryPtn node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1282 -class SyntaxTree::AryPtn < ::SyntaxTree::Node - # @return [AryPtn] a new instance of AryPtn - # - # source://syntax_tree//lib/syntax_tree/node.rb#1320 - def initialize(constant:, requireds:, rest:, posts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1388 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1329 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1333 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1318 - def comments; end - - # [nil | VarRef | ConstPathRef] the optional constant wrapper - # - # source://syntax_tree//lib/syntax_tree/node.rb#1303 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1337 - def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1333 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1359 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1370 - def format(q); end - - # [Array[ Node ]] the list of positional arguments occurring after the - # optional star if there is one - # - # source://syntax_tree//lib/syntax_tree/node.rb#1315 - def posts; end - - # [Array[ Node ]] the regular positional arguments that this array - # pattern is matching against - # - # source://syntax_tree//lib/syntax_tree/node.rb#1307 - def requireds; end - - # [nil | VarField] the optional starred identifier that grabs up a list of - # positional arguments - # - # source://syntax_tree//lib/syntax_tree/node.rb#1311 - def rest; end -end - -# Formats the optional splat of an array pattern. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1284 -class SyntaxTree::AryPtn::RestFormatter - # @return [RestFormatter] a new instance of RestFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#1288 - def initialize(value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1292 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1296 - def format(q); end - - # [VarField] the identifier that represents the remaining positionals - # - # source://syntax_tree//lib/syntax_tree/node.rb#1286 - def value; end -end - -# Assign represents assigning something to a variable or constant. Generally, -# the left side of the assignment is going to be any node that ends with the -# name "Field". -# -# variable = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#1418 -class SyntaxTree::Assign < ::SyntaxTree::Node - # @return [Assign] a new instance of Assign - # - # source://syntax_tree//lib/syntax_tree/node.rb#1429 - def initialize(target:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1479 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1436 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1440 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1427 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1444 - def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1440 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1458 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1462 - def format(q); end - - # [ARefField | ConstPathField | Field | TopConstField | VarField] the target - # to assign the result of the expression to - # - # source://syntax_tree//lib/syntax_tree/node.rb#1421 - def target; end - - # [Node] the expression to be assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#1424 - def value; end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1485 - def skip_indent?; end -end - -# Determins if the following value should be indented or not. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1396 -module SyntaxTree::AssignFormatting - class << self - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1397 - def skip_indent?(value); end - end -end - -# Assoc represents a key-value pair within a hash. It is a child node of -# either an AssocListFromArgs or a BareAssocHash. -# -# { key1: value1, key2: value2 } -# -# In the above example, the would be two Assoc nodes. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1497 -class SyntaxTree::Assoc < ::SyntaxTree::Node - # @return [Assoc] a new instance of Assoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#1507 - def initialize(key:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1548 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1514 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1518 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1505 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1522 - def copy(key: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1518 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1536 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1540 - def format(q); end - - # [Node] the key of this pair - # - # source://syntax_tree//lib/syntax_tree/node.rb#1499 - def key; end - - # [nil | Node] the value of this pair - # - # source://syntax_tree//lib/syntax_tree/node.rb#1502 - def value; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#1554 - def format_contents(q); end -end - -# AssocSplat represents double-splatting a value into a hash (either a hash -# literal or a bare hash in a method call). -# -# { **pairs } -# -# source://syntax_tree//lib/syntax_tree/node.rb#1575 -class SyntaxTree::AssocSplat < ::SyntaxTree::Node - # @return [AssocSplat] a new instance of AssocSplat - # - # source://syntax_tree//lib/syntax_tree/node.rb#1582 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1618 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1588 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1592 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1580 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1596 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1592 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1609 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1613 - def format(q); end - - # [nil | Node] the expression that is being splatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#1577 - def value; end -end - -# BEGINBlock represents the use of the +BEGIN+ keyword, which hooks into the -# lifecycle of the interpreter. Whatever is inside the block will get executed -# when the program starts. -# -# BEGIN { -# } -# -# Interestingly, the BEGIN keyword doesn't allow the do and end keywords for -# the block. Only braces are permitted. -# -# source://syntax_tree//lib/syntax_tree/node.rb#175 -class SyntaxTree::BEGINBlock < ::SyntaxTree::Node - # @return [BEGINBlock] a new instance of BEGINBlock - # - # source://syntax_tree//lib/syntax_tree/node.rb#185 - def initialize(lbrace:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#236 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#192 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#196 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#183 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#200 - def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#196 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#214 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#223 - def format(q); end - - # [LBrace] the left brace that is seen after the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#177 - def lbrace; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#180 - def statements; end -end - -# Backref represents a global variable referencing a matched value. It comes -# in the form of a $ followed by a positive integer. -# -# $1 -# -# source://syntax_tree//lib/syntax_tree/node.rb#1628 -class SyntaxTree::Backref < ::SyntaxTree::Node - # @return [Backref] a new instance of Backref - # - # source://syntax_tree//lib/syntax_tree/node.rb#1635 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1670 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1641 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1645 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1633 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1649 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1645 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1662 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1666 - def format(q); end - - # [String] the name of the global backreference variable - # - # source://syntax_tree//lib/syntax_tree/node.rb#1630 - def value; end -end - -# Backtick represents the use of the ` operator. It's usually found being used -# for an XStringLiteral, but could also be found as the name of a method being -# defined. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1678 -class SyntaxTree::Backtick < ::SyntaxTree::Node - # @return [Backtick] a new instance of Backtick - # - # source://syntax_tree//lib/syntax_tree/node.rb#1685 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1720 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1691 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1695 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1683 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1699 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1695 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1712 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1716 - def format(q); end - - # [String] the backtick in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#1680 - def value; end -end - -# BareAssocHash represents a hash of contents being passed as a method -# argument (and therefore has omitted braces). It's very similar to an -# AssocListFromArgs node. -# -# method(key1: value1, key2: value2) -# -# source://syntax_tree//lib/syntax_tree/node.rb#1834 -class SyntaxTree::BareAssocHash < ::SyntaxTree::Node - # @return [BareAssocHash] a new instance of BareAssocHash - # - # source://syntax_tree//lib/syntax_tree/node.rb#1841 - def initialize(assocs:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1876 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1847 - def accept(visitor); end - - # [Array[ Assoc | AssocSplat ]] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1836 - def assocs; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1851 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1839 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1855 - def copy(assocs: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1851 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1868 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1872 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1880 - def format_key(q, key); end -end - -# BasicVisitor is the parent class of the Visitor class that provides the -# ability to walk down the tree. It does not define any handlers, so you -# should extend this class if you want your visitor to raise an error if you -# attempt to visit a node that you don't handle. -# -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#8 -class SyntaxTree::BasicVisitor - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#105 - def visit(node); end - - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#109 - def visit_all(nodes); end - - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_child_nodes(node); end - - class << self - # This is the list of all of the valid visit methods. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#72 - def valid_visit_methods; end - - # This method is here to help folks write visitors. - # - # It's not always easy to ensure you're writing the correct method name in - # the visitor since it's perfectly valid to define methods that don't - # override these parent methods. - # - # If you use this method, you can ensure you're writing the correct method - # name. It will raise an error if the visit method you're defining isn't - # actually a method on the parent visitor. - # - # @raise [VisitMethodError] - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#86 - def visit_method(method_name); end - - # This method is here to help folks write visitors. - # - # Within the given block, every method that is defined will be checked to - # ensure it's a valid visit method using the BasicVisitor::visit_method - # method defined above. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#97 - def visit_methods; end - end -end - -# This class is used by DidYouMean to offer corrections to invalid visit -# method names. -# -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#22 -class SyntaxTree::BasicVisitor::VisitMethodChecker - # @return [VisitMethodChecker] a new instance of VisitMethodChecker - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#25 - def initialize(error); end - - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#29 - def corrections; end - - # Returns the value of attribute visit_method. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#23 - def visit_method; end -end - -# This is raised when you use the Visitor.visit_method method and it fails. -# It is correctable to through DidYouMean. -# -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#11 -class SyntaxTree::BasicVisitor::VisitMethodError < ::StandardError - include ::DidYouMean::Correctable - - # @return [VisitMethodError] a new instance of VisitMethodError - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#14 - def initialize(visit_method); end - - # Returns the value of attribute visit_method. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#12 - def visit_method; end -end - -# This module is responsible for checking all of the methods defined within -# a given block to ensure that they are valid visit methods. -# -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#45 -class SyntaxTree::BasicVisitor::VisitMethodsChecker < ::Module - # @return [VisitMethodsChecker] a new instance of VisitMethodsChecker - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#53 - def initialize; end - - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#65 - def disable!; end - - # This is the status of the checker. It's used to determine whether or not - # we should be checking the methods that are defined. It is kept as an - # instance variable so that it can be disabled later. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#51 - def status; end -end - -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#46 -class SyntaxTree::BasicVisitor::VisitMethodsChecker::Status < ::Struct - # Returns the value of attribute checking - # - # @return [Object] the current value of checking - def checking; end - - # Sets the attribute checking - # - # @param value [Object] the value to set the attribute checking to. - # @return [Object] the newly set value - def checking=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Begin represents a begin..end chain. -# -# begin -# value -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#1899 -class SyntaxTree::Begin < ::SyntaxTree::Node - # @return [Begin] a new instance of Begin - # - # source://syntax_tree//lib/syntax_tree/node.rb#1906 - def initialize(bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1951 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1912 - def accept(visitor); end - - # [BodyStmt] the bodystmt that contains the contents of this begin block - # - # source://syntax_tree//lib/syntax_tree/node.rb#1901 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1916 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1904 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1920 - def copy(bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1916 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1933 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1937 - def format(q); end -end - -# Binary represents any expression that involves two sub-expressions with an -# operator in between. This can be something that looks like a mathematical -# operation: -# -# 1 + 1 -# -# but can also be something like pushing a value onto an array: -# -# array << value -# -# source://syntax_tree//lib/syntax_tree/node.rb#2029 -class SyntaxTree::Binary < ::SyntaxTree::Node - # @return [Binary] a new instance of Binary - # - # source://syntax_tree//lib/syntax_tree/node.rb#2056 - def initialize(left:, operator:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2128 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2064 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2068 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2054 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2072 - def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2068 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2087 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2097 - def format(q); end - - # [Node] the left-hand side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#2045 - def left; end - - # [Symbol] the operator used between the two expressions - # - # source://syntax_tree//lib/syntax_tree/node.rb#2048 - def operator; end - - # [Node] the right-hand side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#2051 - def right; end -end - -# BlockArg represents declaring a block parameter on a method definition. -# -# def method(&block); end -# -# source://syntax_tree//lib/syntax_tree/node.rb#2227 -class SyntaxTree::BlockArg < ::SyntaxTree::Node - # @return [BlockArg] a new instance of BlockArg - # - # source://syntax_tree//lib/syntax_tree/node.rb#2234 - def initialize(name:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2270 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2240 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2244 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2232 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2248 - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2244 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2261 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2265 - def format(q); end - - # [nil | Ident] the name of the block argument - # - # source://syntax_tree//lib/syntax_tree/node.rb#2229 - def name; end -end - -# Block represents passing a block to a method call using the +do+ and +end+ -# keywords or the +{+ and +}+ operators. -# -# method do |value| -# end -# -# method { |value| } -# -# source://syntax_tree//lib/syntax_tree/node.rb#4312 -class SyntaxTree::BlockNode < ::SyntaxTree::Node - # @return [BlockNode] a new instance of BlockNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#4347 - def initialize(opening:, block_var:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4420 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4355 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4429 - def arity; end - - # [nil | BlockVar] the optional variable declaration within this block - # - # source://syntax_tree//lib/syntax_tree/node.rb#4339 - def block_var; end - - # [BodyStmt | Statements] the expressions to be executed within this block - # - # source://syntax_tree//lib/syntax_tree/node.rb#4342 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4359 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4345 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4363 - def copy(opening: T.unsafe(nil), block_var: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4359 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4378 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4388 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4425 - def keywords?; end - - # [LBrace | Kw] the left brace or the do keyword that opens this block - # - # source://syntax_tree//lib/syntax_tree/node.rb#4336 - def opening; end - - private - - # If we're the predicate of a loop or conditional, then we're going to have - # to go with the {..} bounds. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4471 - def forced_brace_bounds?(q); end - - # If we're a sibling of a control-flow keyword, then we're going to have to - # use the do..end bounds. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4460 - def forced_do_end_bounds?(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4487 - def format_break(q, break_opening, break_closing); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4507 - def format_flat(q, flat_opening, flat_closing); end - - # If this is nested anywhere inside certain nodes, then we can't change - # which operators/keywords we're using for the bounds of the block. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4442 - def unchangeable_bounds?(q); end -end - -# Formats the opening brace or keyword of a block. -# -# source://syntax_tree//lib/syntax_tree/node.rb#4314 -class SyntaxTree::BlockNode::BlockOpenFormatter - # @return [BlockOpenFormatter] a new instance of BlockOpenFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#4321 - def initialize(text, node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4326 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4330 - def format(q); end - - # [LBrace | Keyword] the node that is being represented - # - # source://syntax_tree//lib/syntax_tree/node.rb#4319 - def node; end - - # [String] the actual output that should be printed - # - # source://syntax_tree//lib/syntax_tree/node.rb#4316 - def text; end -end - -# BlockVar represents the parameters being declared for a block. Effectively -# this node is everything contained within the pipes. This includes all of the -# various parameter types, as well as block-local variable declarations. -# -# method do |positional, optional = value, keyword:, █ local| -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#2141 -class SyntaxTree::BlockVar < ::SyntaxTree::Node - # @return [BlockVar] a new instance of BlockVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#2151 - def initialize(params:, locals:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2209 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2158 - def accept(visitor); end - - # When a single required parameter is declared for a block, it gets - # automatically expanded if the values being yielded into it are an array. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2216 - def arg0?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2162 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2149 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2166 - def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2162 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2180 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2196 - def format(q); end - - # [Array[ Ident ]] the list of block-local variable declarations - # - # source://syntax_tree//lib/syntax_tree/node.rb#2146 - def locals; end - - # [Params] the parameters being declared with the block - # - # source://syntax_tree//lib/syntax_tree/node.rb#2143 - def params; end -end - -# We'll keep a single instance of this separator around for all block vars -# to cut down on allocations. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2194 -SyntaxTree::BlockVar::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::BlockVar::Separator) - -# Within the pipes of the block declaration, we don't want any spaces. So -# we'll separate the parameters with a comma and space but no breakables. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2186 -class SyntaxTree::BlockVar::Separator - # source://syntax_tree//lib/syntax_tree/node.rb#2187 - def call(q); end -end - -# bodystmt can't actually determine its bounds appropriately because it -# doesn't necessarily know where it started. So the parent node needs to -# report back down into this one where it goes. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2278 -class SyntaxTree::BodyStmt < ::SyntaxTree::Node - # @return [BodyStmt] a new instance of BodyStmt - # - # source://syntax_tree//lib/syntax_tree/node.rb#2297 - def initialize(statements:, rescue_clause:, else_keyword:, else_clause:, ensure_clause:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2428 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2352 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2314 - def bind(parser, start_char, start_column, end_char, end_column); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2356 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2295 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2360 - def copy(statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_keyword: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2356 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2384 - def deconstruct_keys(_keys); end - - # [nil | Statements] the optional set of statements inside the else clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#2289 - def else_clause; end - - # [nil | Kw] the optional else keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#2286 - def else_keyword; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2348 - def empty?; end - - # [nil | Ensure] the optional ensure clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#2292 - def ensure_clause; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2396 - def format(q); end - - # [nil | Rescue] the optional rescue chain attached to the begin clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#2283 - def rescue_clause; end - - # [Statements] the list of statements inside the begin clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#2280 - def statements; end -end - -# Break represents using the +break+ keyword. -# -# break -# -# It can also optionally accept arguments, as in: -# -# break 1 -# -# source://syntax_tree//lib/syntax_tree/node.rb#2634 -class SyntaxTree::Break < ::SyntaxTree::Node - # @return [Break] a new instance of Break - # - # source://syntax_tree//lib/syntax_tree/node.rb#2641 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2676 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2647 - def accept(visitor); end - - # [Args] the arguments being sent to the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#2636 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2651 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2639 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2655 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2651 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2668 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2672 - def format(q); end -end - -# CHAR irepresents a single codepoint in the script encoding. -# -# ?a -# -# In the example above, the CHAR node represents the string literal "a". You -# can use control characters with this as well, as in ?\C-a. -# -# source://syntax_tree//lib/syntax_tree/node.rb#248 -class SyntaxTree::CHAR < ::SyntaxTree::Node - # @return [CHAR] a new instance of CHAR - # - # source://syntax_tree//lib/syntax_tree/node.rb#255 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#296 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#261 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#265 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#253 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#269 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#265 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#282 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#286 - def format(q); end - - # [String] the value of the character literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#250 - def value; end -end - -# CVar represents the use of a class variable. -# -# @@variable -# -# source://syntax_tree//lib/syntax_tree/node.rb#4046 -class SyntaxTree::CVar < ::SyntaxTree::Node - # @return [CVar] a new instance of CVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#4053 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4088 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4059 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4063 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4051 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4067 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4063 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4080 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4084 - def format(q); end - - # [String] the name of the class variable - # - # source://syntax_tree//lib/syntax_tree/node.rb#4048 - def value; end -end - -# This is probably the most complicated formatter in this file. It's -# responsible for formatting chains of method calls, with or without arguments -# or blocks. In general, we want to go from something like -# -# foo.bar.baz -# -# to -# -# foo -# .bar -# .baz -# -# Of course there are a lot of caveats to that, including trailing operators -# when necessary, where comments are places, how blocks are aligned, etc. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2721 -class SyntaxTree::CallChainFormatter - # @return [CallChainFormatter] a new instance of CallChainFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#2725 - def initialize(node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2729 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2795 - def format_chain(q, children); end - - # [CallNode | MethodAddBlock] the top of the call chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#2723 - def node; end - - private - - # For certain nodes, we want to attach directly to the end and don't - # want to indent the first call. So we'll pop off the first children and - # format it separately here. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2898 - def attach_directly?(node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2908 - def format_child(q, child, skip_comments: T.unsafe(nil), skip_operator: T.unsafe(nil), skip_attached: T.unsafe(nil)); end - - class << self - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2879 - def chained?(node); end - end -end - -# CallNode represents a method call. -# -# receiver.message -# -# source://syntax_tree//lib/syntax_tree/node.rb#2946 -class SyntaxTree::CallNode < ::SyntaxTree::Node - # @return [CallNode] a new instance of CallNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#2962 - def initialize(receiver:, operator:, message:, arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3057 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2971 - def accept(visitor); end - - # [nil | ArgParen | Args] the arguments to the method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#2957 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3103 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2975 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2960 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2984 - def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2975 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3006 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3017 - def format(q); end - - # Print out the arguments to this call. If there are no arguments, then do - # nothing. - # - # source://syntax_tree//lib/syntax_tree/node.rb#3065 - def format_arguments(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3075 - def format_contents(q); end - - # [:call | Backtick | Const | Ident | Op] the message being sent - # - # source://syntax_tree//lib/syntax_tree/node.rb#2954 - def message; end - - # [nil | :"::" | Op | Period] the operator being used to send the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#2951 - def operator; end - - # [nil | Node] the receiver of the method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#2948 - def receiver; end -end - -# Wraps a call operator (which can be a string literal :: or an Op node or a -# Period node) and formats it when called. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2683 -class SyntaxTree::CallOperatorFormatter - # @return [CallOperatorFormatter] a new instance of CallOperatorFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#2687 - def initialize(operator); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2691 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2695 - def format(q); end - - # [:"::" | Op | Period] the operator being formatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#2685 - def operator; end -end - -# Case represents the beginning of a case chain. -# -# case value -# when 1 -# "one" -# when 2 -# "two" -# else -# "number" -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#3119 -class SyntaxTree::Case < ::SyntaxTree::Node - # @return [Case] a new instance of Case - # - # source://syntax_tree//lib/syntax_tree/node.rb#3132 - def initialize(keyword:, value:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3190 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3140 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3144 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3130 - def comments; end - - # [In | When] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#3127 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3148 - def copy(keyword: T.unsafe(nil), value: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3144 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3163 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3173 - def format(q); end - - # [Kw] the keyword that opens this expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#3121 - def keyword; end - - # [nil | Node] optional value being switched on - # - # source://syntax_tree//lib/syntax_tree/node.rb#3124 - def value; end -end - -# Class represents defining a class using the +class+ keyword. -# -# class Container -# end -# -# Classes can have path names as their class name in case it's being nested -# under a namespace, as in: -# -# class Namespace::Container -# end -# -# Classes can also be defined as a top-level path, in the case that it's -# already in a namespace but you want to define it at the top-level instead, -# as in: -# -# module OtherNamespace -# class ::Namespace::Container -# end -# end -# -# All of these declarations can also have an optional superclass reference, as -# in: -# -# class Child < Parent -# end -# -# That superclass can actually be any Ruby expression, it doesn't necessarily -# need to be a constant, as in: -# -# class Child < method -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#3315 -class SyntaxTree::ClassDeclaration < ::SyntaxTree::Node - # @return [ClassDeclaration] a new instance of ClassDeclaration - # - # source://syntax_tree//lib/syntax_tree/node.rb#3329 - def initialize(constant:, superclass:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3392 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3337 - def accept(visitor); end - - # [BodyStmt] the expressions to execute within the context of the class - # - # source://syntax_tree//lib/syntax_tree/node.rb#3324 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3341 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3327 - def comments; end - - # [ConstPathRef | ConstRef | TopConstRef] the name of the class being - # defined - # - # source://syntax_tree//lib/syntax_tree/node.rb#3318 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3345 - def copy(constant: T.unsafe(nil), superclass: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3341 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3360 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3370 - def format(q); end - - # [nil | Node] the optional superclass declaration - # - # source://syntax_tree//lib/syntax_tree/node.rb#3321 - def superclass; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#3399 - def format_declaration(q); end -end - -# Comma represents the use of the , operator. -# -# source://syntax_tree//lib/syntax_tree/node.rb#3413 -class SyntaxTree::Comma < ::SyntaxTree::Node - # @return [Comma] a new instance of Comma - # - # source://syntax_tree//lib/syntax_tree/node.rb#3417 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3440 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3422 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3426 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3430 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3426 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3436 - def deconstruct_keys(_keys); end - - # [String] the comma in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#3415 - def value; end -end - -# Command represents a method call with arguments and no parentheses. Note -# that Command nodes only happen when there is no explicit receiver for this -# method. -# -# method argument -# -# source://syntax_tree//lib/syntax_tree/node.rb#3451 -class SyntaxTree::Command < ::SyntaxTree::Node - # @return [Command] a new instance of Command - # - # source://syntax_tree//lib/syntax_tree/node.rb#3464 - def initialize(message:, arguments:, block:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3514 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3472 - def accept(visitor); end - - # [Args] the arguments being sent with the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#3456 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3519 - def arity; end - - # [nil | BlockNode] the optional block being passed to the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#3459 - def block; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3476 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3462 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3480 - def copy(message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3476 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3495 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3505 - def format(q); end - - # [Const | Ident] the message being sent to the implicit receiver - # - # source://syntax_tree//lib/syntax_tree/node.rb#3453 - def message; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#3525 - def align(q, node, &block); end -end - -# CommandCall represents a method call on an object with arguments and no -# parentheses. -# -# object.method argument -# -# source://syntax_tree//lib/syntax_tree/node.rb#3563 -class SyntaxTree::CommandCall < ::SyntaxTree::Node - # @return [CommandCall] a new instance of CommandCall - # - # source://syntax_tree//lib/syntax_tree/node.rb#3582 - def initialize(receiver:, operator:, message:, arguments:, block:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3686 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3599 - def accept(visitor); end - - # [nil | Args | ArgParen] the arguments going along with the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#3574 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3692 - def arity; end - - # [nil | BlockNode] the block associated with this method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#3577 - def block; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3603 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3580 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3607 - def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3603 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3631 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3643 - def format(q); end - - # [:call | Const | Ident | Op] the message being send - # - # source://syntax_tree//lib/syntax_tree/node.rb#3571 - def message; end - - # [nil | :"::" | Op | Period] the operator used to send the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#3568 - def operator; end - - # [nil | Node] the receiver of the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#3565 - def receiver; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#3698 - def argument_alignment(q, doc); end -end - -# Comment represents a comment in the source. -# -# # comment -# -# source://syntax_tree//lib/syntax_tree/node.rb#3725 -class SyntaxTree::Comment < ::SyntaxTree::Node - # @return [Comment] a new instance of Comment - # - # source://syntax_tree//lib/syntax_tree/node.rb#3734 - def initialize(value:, inline:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3793 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3767 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3771 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3763 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3775 - def copy(value: T.unsafe(nil), inline: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3771 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3785 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3789 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#3759 - def ignore?; end - - # [boolean] whether or not there is code on the same line as this comment. - # If there is, then inline will be true. - # - # source://syntax_tree//lib/syntax_tree/node.rb#3731 - def inline; end - - # [boolean] whether or not there is code on the same line as this comment. - # If there is, then inline will be true. - # - # source://syntax_tree//lib/syntax_tree/node.rb#3731 - def inline?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3743 - def leading!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#3747 - def leading?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3751 - def trailing!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#3755 - def trailing?; end - - # [String] the contents of the comment - # - # source://syntax_tree//lib/syntax_tree/node.rb#3727 - def value; end -end - -# Formats an If or Unless node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6317 -class SyntaxTree::ConditionalFormatter - # @return [ConditionalFormatter] a new instance of ConditionalFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#6324 - def initialize(keyword, node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6329 - def format(q); end - - # [String] the keyword associated with this conditional - # - # source://syntax_tree//lib/syntax_tree/node.rb#6319 - def keyword; end - - # [If | Unless] the node that is being formatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#6322 - def node; end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#6453 - def contains_conditional?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6388 - def format_break(q, force:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6380 - def format_flat(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6408 - def format_ternary(q); end -end - -# Const represents a literal value that _looks_ like a constant. This could -# actually be a reference to a constant: -# -# Constant -# -# It could also be something that looks like a constant in another context, as -# in a method call to a capitalized method: -# -# object.Constant -# -# or a symbol that starts with a capital letter: -# -# :Constant -# -# source://syntax_tree//lib/syntax_tree/node.rb#3812 -class SyntaxTree::Const < ::SyntaxTree::Node - # @return [Const] a new instance of Const - # - # source://syntax_tree//lib/syntax_tree/node.rb#3819 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3854 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3825 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3829 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3817 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3833 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3829 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3846 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3850 - def format(q); end - - # [String] the name of the constant - # - # source://syntax_tree//lib/syntax_tree/node.rb#3814 - def value; end -end - -# ConstPathField represents the child node of some kind of assignment. It -# represents when you're assigning to a constant that is being referenced as -# a child of another variable. -# -# object::Const = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#3865 -class SyntaxTree::ConstPathField < ::SyntaxTree::Node - # @return [ConstPathField] a new instance of ConstPathField - # - # source://syntax_tree//lib/syntax_tree/node.rb#3875 - def initialize(parent:, constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3919 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3882 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3886 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3873 - def comments; end - - # [Const] the constant itself - # - # source://syntax_tree//lib/syntax_tree/node.rb#3870 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3890 - def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3886 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3904 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3913 - def format(q); end - - # [Node] the source of the constant - # - # source://syntax_tree//lib/syntax_tree/node.rb#3867 - def parent; end -end - -# ConstPathRef represents referencing a constant by a path. -# -# object::Const -# -# source://syntax_tree//lib/syntax_tree/node.rb#3929 -class SyntaxTree::ConstPathRef < ::SyntaxTree::Node - # @return [ConstPathRef] a new instance of ConstPathRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#3939 - def initialize(parent:, constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3983 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3946 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3950 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3937 - def comments; end - - # [Const] the constant itself - # - # source://syntax_tree//lib/syntax_tree/node.rb#3934 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3954 - def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3950 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3968 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3977 - def format(q); end - - # [Node] the source of the constant - # - # source://syntax_tree//lib/syntax_tree/node.rb#3931 - def parent; end -end - -# ConstRef represents the name of the constant being used in a class or module -# declaration. -# -# class Container -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#3995 -class SyntaxTree::ConstRef < ::SyntaxTree::Node - # @return [ConstRef] a new instance of ConstRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#4002 - def initialize(constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4037 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4008 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4012 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4000 - def comments; end - - # [Const] the constant itself - # - # source://syntax_tree//lib/syntax_tree/node.rb#3997 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4016 - def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4012 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4029 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4033 - def format(q); end -end - -# If the predicate of a conditional or loop contains an assignment (in which -# case we can't know for certain that that assignment doesn't impact the -# statements inside the conditional) then we can't use the modifier form -# and we must use the block form. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6232 -module SyntaxTree::ContainsAssignment - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#6233 - def call(parent); end - end -end - -# The default indentation level for formatting. We allow changing this so -# that Syntax Tree can format arbitrary parts of a document. -# -# source://syntax_tree//lib/syntax_tree.rb#57 -SyntaxTree::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) - -# This is the default print width when formatting. It can be overridden in the -# CLI by passing the --print-width option or here in the API by passing the -# optional second argument to ::format. -# -# source://syntax_tree//lib/syntax_tree.rb#49 -SyntaxTree::DEFAULT_PRINT_WIDTH = T.let(T.unsafe(nil), Integer) - -# This is the default ruby version that we're going to target for formatting. -# It shouldn't really be changed except in very niche circumstances. -# -# source://syntax_tree//lib/syntax_tree.rb#53 -SyntaxTree::DEFAULT_RUBY_VERSION = T.let(T.unsafe(nil), SyntaxTree::Formatter::SemanticVersion) - -# This module provides shortcuts for creating AST nodes. -# -# source://syntax_tree//lib/syntax_tree/dsl.rb#5 -module SyntaxTree::DSL - # Create a new ARef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#40 - def ARef(collection, index); end - - # Create a new ARefField node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#45 - def ARefField(collection, index); end - - # Create a new AliasNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#35 - def AliasNode(left, right); end - - # Create a new ArgBlock node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#64 - def ArgBlock(value); end - - # Create a new ArgParen node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#54 - def ArgParen(arguments); end - - # Create a new ArgStar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#69 - def ArgStar(value); end - - # Create a new Args node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#59 - def Args(parts); end - - # Create a new ArgsForward node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#74 - def ArgsForward; end - - # Create a new ArrayLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#79 - def ArrayLiteral(lbracket, contents); end - - # Create a new AryPtn node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#88 - def AryPtn(constant, requireds, rest, posts); end - - # Create a new Assign node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#99 - def Assign(target, value); end - - # Create a new Assoc node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#104 - def Assoc(key, value); end - - # Create a new AssocSplat node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#109 - def AssocSplat(value); end - - # Create a new BEGINBlock node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#7 - def BEGINBlock(lbrace, statements); end - - # Create a new Backref node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#114 - def Backref(value); end - - # Create a new Backtick node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#119 - def Backtick(value); end - - # Create a new BareAssocHash node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#124 - def BareAssocHash(assocs); end - - # Create a new Begin node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#129 - def Begin(bodystmt); end - - # Create a new Binary node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#139 - def Binary(left, operator, right); end - - # Create a new BlockArg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#154 - def BlockArg(name); end - - # Create a new BlockNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#317 - def BlockNode(opening, block_var, bodystmt); end - - # Create a new BlockVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#149 - def BlockVar(params, locals); end - - # Create a new BodyStmt node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#159 - def BodyStmt(statements, rescue_clause, else_keyword, else_clause, ensure_clause); end - - # Create a new Break node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#177 - def Break(arguments); end - - # Create a new CHAR node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#16 - def CHAR(value); end - - # Create a new CVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#288 - def CVar(value); end - - # Create a new CallNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#182 - def CallNode(receiver, operator, message, arguments); end - - # Create a new Case node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#193 - def Case(keyword, value, consequent); end - - # Create a new ClassDeclaration node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#213 - def ClassDeclaration(constant, superclass, bodystmt, location = T.unsafe(nil)); end - - # Create a new Comma node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#228 - def Comma(value); end - - # Create a new Command node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#233 - def Command(message, arguments, block, location = T.unsafe(nil)); end - - # Create a new CommandCall node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#243 - def CommandCall(receiver, operator, message, arguments, block); end - - # Create a new Comment node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#255 - def Comment(value, inline, location = T.unsafe(nil)); end - - # Create a new Const node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#260 - def Const(value); end - - # Create a new ConstPathField node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#265 - def ConstPathField(parent, constant); end - - # Create a new ConstPathRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#274 - def ConstPathRef(parent, constant); end - - # Create a new ConstRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#283 - def ConstRef(constant); end - - # Create a new DefNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#293 - def DefNode(target, operator, name, params, bodystmt, location = T.unsafe(nil)); end - - # Create a new Defined node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#312 - def Defined(value); end - - # Create a new DynaSymbol node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#337 - def DynaSymbol(parts, quote); end - - # Create a new ENDBlock node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#21 - def ENDBlock(lbrace, statements); end - - # Create a new Else node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#342 - def Else(keyword, statements); end - - # Create a new Elsif node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#351 - def Elsif(predicate, statements, consequent); end - - # Create a new EmbDoc node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#361 - def EmbDoc(value); end - - # Create a new EmbExprBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#366 - def EmbExprBeg(value); end - - # Create a new EmbExprEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#371 - def EmbExprEnd(value); end - - # Create a new EmbVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#376 - def EmbVar(value); end - - # Create a new EndContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#30 - def EndContent(value); end - - # Create a new Ensure node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#381 - def Ensure(keyword, statements); end - - # Create a new ExcessedComma node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#390 - def ExcessedComma(value); end - - # Create a new Field node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#395 - def Field(parent, operator, name); end - - # Create a new FloatLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#405 - def FloatLiteral(value); end - - # Create a new FndPtn node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#410 - def FndPtn(constant, left, values, right); end - - # Create a new For node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#421 - def For(index, collection, statements); end - - # Create a new GVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#431 - def GVar(value); end - - # Create a new HashLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#436 - def HashLiteral(lbrace, assocs); end - - # Create a new Heredoc node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#445 - def Heredoc(beginning, ending, dedent, parts); end - - # Create a new HeredocBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#456 - def HeredocBeg(value); end - - # Create a new HeredocEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#461 - def HeredocEnd(value); end - - # Create a new HshPtn node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#466 - def HshPtn(constant, keywords, keyword_rest); end - - # Create a new IVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#521 - def IVar(value); end - - # Create a new Ident node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#476 - def Ident(value); end - - # Create a new IfNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#481 - def IfNode(predicate, statements, consequent); end - - # Create a new IfOp node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#491 - def IfOp(predicate, truthy, falsy); end - - # Create a new Imaginary node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#501 - def Imaginary(value); end - - # Create a new In node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#506 - def In(pattern, statements, consequent); end - - # Create a new Int node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#516 - def Int(value); end - - # Create a new Kw node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#526 - def Kw(value); end - - # Create a new KwRestParam node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#531 - def KwRestParam(name); end - - # Create a new LBrace node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#560 - def LBrace(value); end - - # Create a new LBracket node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#565 - def LBracket(value); end - - # Create a new LParen node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#570 - def LParen(value); end - - # Create a new Label node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#536 - def Label(value); end - - # Create a new LabelEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#541 - def LabelEnd(value); end - - # Create a new Lambda node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#546 - def Lambda(params, statements); end - - # Create a new LambdaVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#555 - def LambdaVar(params, locals); end - - # Create a new MAssign node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#575 - def MAssign(target, value); end - - # Create a new MLHS node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#585 - def MLHS(parts, comma); end - - # Create a new MLHSParen node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#590 - def MLHSParen(contents, comma); end - - # Create a new MRHS node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#608 - def MRHS(parts); end - - # Create a new MethodAddBlock node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#580 - def MethodAddBlock(call, block, location = T.unsafe(nil)); end - - # Create a new ModuleDeclaration node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#599 - def ModuleDeclaration(constant, bodystmt); end - - # Create a new Next node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#613 - def Next(arguments); end - - # Create a new Not node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#892 - def Not(statement, parentheses); end - - # Create a new Op node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#618 - def Op(value); end - - # Create a new OpAssign node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#623 - def OpAssign(target, operator, value); end - - # Create a new Params node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#633 - def Params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end - - # Create a new Paren node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#647 - def Paren(lparen, contents); end - - # Create a new Period node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#652 - def Period(value); end - - # Create a new PinnedBegin node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#134 - def PinnedBegin(statement); end - - # Create a new PinnedVarRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#944 - def PinnedVarRef(value); end - - # Create a new Program node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#657 - def Program(statements); end - - # Create a new QSymbols node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#662 - def QSymbols(beginning, elements); end - - # Create a new QSymbolsBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#671 - def QSymbolsBeg(value); end - - # Create a new QWords node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#676 - def QWords(beginning, elements); end - - # Create a new QWordsBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#685 - def QWordsBeg(value); end - - # Create a new RAssign node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#203 - def RAssign(value, operator, pattern); end - - # Create a new RBrace node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#695 - def RBrace(value); end - - # Create a new RBracket node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#700 - def RBracket(value); end - - # Create a new RParen node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#783 - def RParen(value); end - - # Create a new RangeNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#327 - def RangeNode(left, operator, right); end - - # Create a new RationalLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#690 - def RationalLiteral(value); end - - # Create a new Redo node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#705 - def Redo; end - - # Create a new RegexpBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#719 - def RegexpBeg(value); end - - # Create a new RegexpContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#710 - def RegexpContent(beginning, parts); end - - # Create a new RegexpEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#724 - def RegexpEnd(value); end - - # Create a new RegexpLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#729 - def RegexpLiteral(beginning, ending, parts); end - - # Create a new Rescue node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#748 - def Rescue(keyword, exception, statements, consequent); end - - # Create a new RescueEx node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#739 - def RescueEx(exceptions, variable); end - - # Create a new RescueMod node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#759 - def RescueMod(statement, value); end - - # Create a new RestParam node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#768 - def RestParam(name); end - - # Create a new Retry node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#773 - def Retry; end - - # Create a new ReturnNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#778 - def ReturnNode(arguments); end - - # Create a new SClass node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#788 - def SClass(target, bodystmt); end - - # Create a new Statements node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#793 - def Statements(body); end - - # Create a new StringConcat node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#803 - def StringConcat(left, right); end - - # Create a new StringContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#798 - def StringContent(parts); end - - # Create a new StringDVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#808 - def StringDVar(variable); end - - # Create a new StringEmbExpr node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#813 - def StringEmbExpr(statements); end - - # Create a new StringLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#818 - def StringLiteral(parts, quote); end - - # Create a new Super node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#823 - def Super(arguments); end - - # Create a new SymBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#828 - def SymBeg(value); end - - # Create a new SymbolContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#833 - def SymbolContent(value); end - - # Create a new SymbolLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#838 - def SymbolLiteral(value); end - - # Create a new Symbols node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#843 - def Symbols(beginning, elements); end - - # Create a new SymbolsBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#852 - def SymbolsBeg(value); end - - # Create a new TLamBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#862 - def TLamBeg(value); end - - # Create a new TLambda node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#857 - def TLambda(value); end - - # Create a new TStringBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#877 - def TStringBeg(value); end - - # Create a new TStringContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#882 - def TStringContent(value); end - - # Create a new TStringEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#887 - def TStringEnd(value); end - - # Create a new TopConstField node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#867 - def TopConstField(constant); end - - # Create a new TopConstRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#872 - def TopConstRef(constant); end - - # Create a new Unary node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#901 - def Unary(operator, statement); end - - # Create a new Undef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#910 - def Undef(symbols); end - - # Create a new UnlessNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#915 - def UnlessNode(predicate, statements, consequent); end - - # Create a new UntilNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#925 - def UntilNode(predicate, statements); end - - # Create a new VCall node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#949 - def VCall(value); end - - # Create a new VarField node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#934 - def VarField(value); end - - # Create a new VarRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#939 - def VarRef(value); end - - # Create a new VoidStmt node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#954 - def VoidStmt; end - - # Create a new When node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#959 - def When(arguments, statements, consequent); end - - # Create a new WhileNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#969 - def WhileNode(predicate, statements); end - - # Create a new Word node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#978 - def Word(parts); end - - # Create a new Words node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#983 - def Words(beginning, elements); end - - # Create a new WordsBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#992 - def WordsBeg(value); end - - # Create a new XString node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#997 - def XString(parts); end - - # Create a new XStringLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#1002 - def XStringLiteral(parts); end - - # Create a new YieldNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#1007 - def YieldNode(arguments); end - - # Create a new ZSuper node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#1012 - def ZSuper; end -end - -# Provides the ability to index source files into a database, then query for -# the nodes. -# -# source://syntax_tree//lib/syntax_tree/database.rb#6 -module SyntaxTree::Database; end - -# Query for the attributes of a node, optionally also filtering by type. -# -# source://syntax_tree//lib/syntax_tree/database.rb#99 -class SyntaxTree::Database::AttrQuery - # @return [AttrQuery] a new instance of AttrQuery - # - # source://syntax_tree//lib/syntax_tree/database.rb#102 - def initialize(type, attrs); end - - # Returns the value of attribute attrs. - # - # source://syntax_tree//lib/syntax_tree/database.rb#100 - def attrs; end - - # source://syntax_tree//lib/syntax_tree/database.rb#107 - def each(database, &block); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/database.rb#100 - def type; end -end - -# source://syntax_tree//lib/syntax_tree/database.rb#276 -class SyntaxTree::Database::Connection - # @return [Connection] a new instance of Connection - # - # source://syntax_tree//lib/syntax_tree/database.rb#279 - def initialize(raw_connection); end - - # source://syntax_tree//lib/syntax_tree/database.rb#283 - def execute(query, binds = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/database.rb#287 - def index_file(filepath); end - - # source://syntax_tree//lib/syntax_tree/database.rb#292 - def last_insert_row_id; end - - # source://syntax_tree//lib/syntax_tree/database.rb#296 - def prepare; end - - # Returns the value of attribute raw_connection. - # - # source://syntax_tree//lib/syntax_tree/database.rb#277 - def raw_connection; end - - # source://syntax_tree//lib/syntax_tree/database.rb#326 - def search(query); end -end - -# source://syntax_tree//lib/syntax_tree/database.rb#7 -class SyntaxTree::Database::IndexingVisitor < ::SyntaxTree::FieldVisitor - # @return [IndexingVisitor] a new instance of IndexingVisitor - # - # source://syntax_tree//lib/syntax_tree/database.rb#10 - def initialize(database, filepath); end - - # Returns the value of attribute database. - # - # source://syntax_tree//lib/syntax_tree/database.rb#8 - def database; end - - # Returns the value of attribute filepath. - # - # source://syntax_tree//lib/syntax_tree/database.rb#8 - def filepath; end - - # Returns the value of attribute node_id. - # - # source://syntax_tree//lib/syntax_tree/database.rb#8 - def node_id; end - - private - - # source://syntax_tree//lib/syntax_tree/database.rb#18 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/database.rb#21 - def field(name, value); end - - # source://syntax_tree//lib/syntax_tree/database.rb#31 - def list(name, values); end - - # source://syntax_tree//lib/syntax_tree/database.rb#41 - def node(node, _name); end - - # source://syntax_tree//lib/syntax_tree/database.rb#67 - def pairs(name, values); end - - # source://syntax_tree//lib/syntax_tree/database.rb#64 - def text(name, value); end -end - -# Query for the results of either query. -# -# source://syntax_tree//lib/syntax_tree/database.rb#136 -class SyntaxTree::Database::OrQuery - # @return [OrQuery] a new instance of OrQuery - # - # source://syntax_tree//lib/syntax_tree/database.rb#139 - def initialize(left, right); end - - # source://syntax_tree//lib/syntax_tree/database.rb#144 - def each(database, &block); end - - # Returns the value of attribute left. - # - # source://syntax_tree//lib/syntax_tree/database.rb#137 - def left; end - - # Returns the value of attribute right. - # - # source://syntax_tree//lib/syntax_tree/database.rb#137 - def right; end -end - -# A pattern matching expression that will be compiled into a query. -# -# source://syntax_tree//lib/syntax_tree/database.rb#166 -class SyntaxTree::Database::Pattern - # @return [Pattern] a new instance of Pattern - # - # source://syntax_tree//lib/syntax_tree/database.rb#172 - def initialize(query); end - - # source://syntax_tree//lib/syntax_tree/database.rb#176 - def compile; end - - # Returns the value of attribute query. - # - # source://syntax_tree//lib/syntax_tree/database.rb#170 - def query; end - - private - - # Shortcut for combining two queries into one that returns the results of - # if either query matches. - # - # source://syntax_tree//lib/syntax_tree/database.rb#195 - def combine_or(left, right); end - - # in foo | bar - # - # source://syntax_tree//lib/syntax_tree/database.rb#200 - def compile_binary(node); end - - # in Ident - # - # source://syntax_tree//lib/syntax_tree/database.rb#207 - def compile_const(node); end - - # in SyntaxTree::Ident - # - # source://syntax_tree//lib/syntax_tree/database.rb#219 - def compile_const_path_ref(node); end - - # @raise [CompilationError] - # - # source://syntax_tree//lib/syntax_tree/database.rb#189 - def compile_error(node); end - - # in Ident[value: String] - # - # source://syntax_tree//lib/syntax_tree/database.rb#234 - def compile_hshptn(node); end - - # source://syntax_tree//lib/syntax_tree/database.rb#258 - def compile_node(node); end - - # in Foo - # - # source://syntax_tree//lib/syntax_tree/database.rb#248 - def compile_var_ref(node); end -end - -# source://syntax_tree//lib/syntax_tree/database.rb#167 -class SyntaxTree::Database::Pattern::CompilationError < ::StandardError; end - -# A lazy query result. -# -# source://syntax_tree//lib/syntax_tree/database.rb#151 -class SyntaxTree::Database::QueryResult - # @return [QueryResult] a new instance of QueryResult - # - # source://syntax_tree//lib/syntax_tree/database.rb#154 - def initialize(database, query); end - - # Returns the value of attribute database. - # - # source://syntax_tree//lib/syntax_tree/database.rb#152 - def database; end - - # source://syntax_tree//lib/syntax_tree/database.rb#159 - def each(&block); end - - # Returns the value of attribute query. - # - # source://syntax_tree//lib/syntax_tree/database.rb#152 - def query; end -end - -# Query for a specific type of node. -# -# source://syntax_tree//lib/syntax_tree/database.rb#85 -class SyntaxTree::Database::TypeQuery - # @return [TypeQuery] a new instance of TypeQuery - # - # source://syntax_tree//lib/syntax_tree/database.rb#88 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/database.rb#92 - def each(database, &block); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/database.rb#86 - def type; end -end - -# Def represents defining a regular method on the current self object. -# -# def method(param) result end -# def object.method(param) result end -# -# source://syntax_tree//lib/syntax_tree/node.rb#4098 -class SyntaxTree::DefNode < ::SyntaxTree::Node - # @return [DefNode] a new instance of DefNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#4117 - def initialize(target:, operator:, name:, params:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4217 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4127 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4230 - def arity; end - - # [BodyStmt | Node] the expressions to be executed by the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#4112 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4131 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4115 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4135 - def copy(target: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), params: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4131 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4159 - def deconstruct_keys(_keys); end - - # Returns true if the method was found in the source in the "endless" form, - # i.e. where the method body is defined using the `=` operator after the - # method name and parameters. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4226 - def endless?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4171 - def format(q); end - - # [Backtick | Const | Ident | Kw | Op] the name of the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#4106 - def name; end - - # [nil | Op | Period] the operator being used to declare the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#4103 - def operator; end - - # [nil | Params | Paren] the parameter declaration for the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#4109 - def params; end - - # [nil | Node] the target where the method is being defined - # - # source://syntax_tree//lib/syntax_tree/node.rb#4100 - def target; end -end - -# Defined represents the use of the +defined?+ operator. It can be used with -# and without parentheses. -# -# defined?(variable) -# -# source://syntax_tree//lib/syntax_tree/node.rb#4249 -class SyntaxTree::Defined < ::SyntaxTree::Node - # @return [Defined] a new instance of Defined - # - # source://syntax_tree//lib/syntax_tree/node.rb#4256 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4299 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4262 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4266 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4254 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4270 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4266 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4283 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4287 - def format(q); end - - # [Node] the value being sent to the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#4251 - def value; end -end - -# DynaSymbol represents a symbol literal that uses quotes to dynamically -# define its value. -# -# :"#{variable}" -# -# They can also be used as a special kind of dynamic hash key, as in: -# -# { "#{key}": value } -# -# source://syntax_tree//lib/syntax_tree/node.rb#4663 -class SyntaxTree::DynaSymbol < ::SyntaxTree::Node - # @return [DynaSymbol] a new instance of DynaSymbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#4674 - def initialize(parts:, quote:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4736 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4681 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4685 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4672 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4689 - def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4685 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4703 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4707 - def format(q); end - - # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the - # dynamic symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#4666 - def parts; end - - # [nil | String] the quote used to delimit the dynamic symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#4669 - def quote; end - - private - - # Here we determine the quotes to use for a dynamic symbol. It's bound by a - # lot of rules because it could be in many different contexts with many - # different kinds of escaping. - # - # source://syntax_tree//lib/syntax_tree/node.rb#4746 - def quotes(q); end -end - -# ENDBlock represents the use of the +END+ keyword, which hooks into the -# lifecycle of the interpreter. Whatever is inside the block will get executed -# when the program ends. -# -# END { -# } -# -# Interestingly, the END keyword doesn't allow the do and end keywords for the -# block. Only braces are permitted. -# -# source://syntax_tree//lib/syntax_tree/node.rb#310 -class SyntaxTree::ENDBlock < ::SyntaxTree::Node - # @return [ENDBlock] a new instance of ENDBlock - # - # source://syntax_tree//lib/syntax_tree/node.rb#320 - def initialize(lbrace:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#371 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#327 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#331 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#318 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#335 - def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#331 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#349 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#358 - def format(q); end - - # [LBrace] the left brace that is seen after the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#312 - def lbrace; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#315 - def statements; end -end - -# Else represents the end of an +if+, +unless+, or +case+ chain. -# -# if variable -# else -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#4792 -class SyntaxTree::Else < ::SyntaxTree::Node - # @return [Else] a new instance of Else - # - # source://syntax_tree//lib/syntax_tree/node.rb#4802 - def initialize(keyword:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4853 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4809 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4813 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4800 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4817 - def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4813 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4831 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4840 - def format(q); end - - # [Kw] the else keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#4794 - def keyword; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#4797 - def statements; end -end - -# Elsif represents another clause in an +if+ or +unless+ chain. -# -# if variable -# elsif other_variable -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#4865 -class SyntaxTree::Elsif < ::SyntaxTree::Node - # @return [Elsif] a new instance of Elsif - # - # source://syntax_tree//lib/syntax_tree/node.rb#4878 - def initialize(predicate:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4942 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4886 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4890 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4876 - def comments; end - - # [nil | Elsif | Else] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#4873 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4894 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4890 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4909 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4919 - def format(q); end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#4867 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#4870 - def statements; end -end - -# EmbDoc represents a multi-line comment. -# -# =begin -# first line -# second line -# =end -# -# source://syntax_tree//lib/syntax_tree/node.rb#4955 -class SyntaxTree::EmbDoc < ::SyntaxTree::Node - # @return [EmbDoc] a new instance of EmbDoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#4959 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5027 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4995 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4999 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4991 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5003 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4999 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5012 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5016 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4987 - def ignore?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4983 - def inline?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4967 - def leading!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4971 - def leading?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4975 - def trailing!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4979 - def trailing?; end - - # [String] the contents of the comment - # - # source://syntax_tree//lib/syntax_tree/node.rb#4957 - def value; end -end - -# EmbExprBeg represents the beginning token for using interpolation inside of -# a parent node that accepts string content (like a string or regular -# expression). -# -# "Hello, #{person}!" -# -# source://syntax_tree//lib/syntax_tree/node.rb#5038 -class SyntaxTree::EmbExprBeg < ::SyntaxTree::Node - # @return [EmbExprBeg] a new instance of EmbExprBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#5042 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5068 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5047 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5051 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5055 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5051 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5064 - def deconstruct_keys(_keys); end - - # [String] the #{ used in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#5040 - def value; end -end - -# EmbExprEnd represents the ending token for using interpolation inside of a -# parent node that accepts string content (like a string or regular -# expression). -# -# "Hello, #{person}!" -# -# source://syntax_tree//lib/syntax_tree/node.rb#5079 -class SyntaxTree::EmbExprEnd < ::SyntaxTree::Node - # @return [EmbExprEnd] a new instance of EmbExprEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#5083 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5109 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5088 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5092 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5096 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5092 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5105 - def deconstruct_keys(_keys); end - - # [String] the } used in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#5081 - def value; end -end - -# EmbVar represents the use of shorthand interpolation for an instance, class, -# or global variable into a parent node that accepts string content (like a -# string or regular expression). -# -# "#@variable" -# -# In the example above, an EmbVar node represents the # because it forces -# -# source://syntax_tree//lib/syntax_tree/node.rb#5122 -class SyntaxTree::EmbVar < ::SyntaxTree::Node - # @return [EmbVar] a new instance of EmbVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#5126 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5152 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5131 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5135 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5139 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5135 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5148 - def deconstruct_keys(_keys); end - - # [String] the # used in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#5124 - def value; end -end - -# EndContent represents the use of __END__ syntax, which allows individual -# scripts to keep content after the main ruby code that can be read through -# the DATA constant. -# -# puts DATA.read -# -# __END__ -# some other content that is not executed by the program -# -# source://syntax_tree//lib/syntax_tree/node.rb#386 -class SyntaxTree::EndContent < ::SyntaxTree::Node - # @return [EndContent] a new instance of EndContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#393 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#442 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#399 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#403 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#391 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#407 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#403 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#420 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#424 - def format(q); end - - # [String] the content after the script - # - # source://syntax_tree//lib/syntax_tree/node.rb#388 - def value; end -end - -# Ensure represents the use of the +ensure+ keyword and its subsequent -# statements. -# -# begin -# ensure -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#5164 -class SyntaxTree::Ensure < ::SyntaxTree::Node - # @return [Ensure] a new instance of Ensure - # - # source://syntax_tree//lib/syntax_tree/node.rb#5174 - def initialize(keyword:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5223 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5181 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5185 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5172 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5189 - def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5185 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5203 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5212 - def format(q); end - - # [Kw] the ensure keyword that began this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5166 - def keyword; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#5169 - def statements; end -end - -# ExcessedComma represents a trailing comma in a list of block parameters. It -# changes the block parameters such that they will destructure. -# -# [[1, 2, 3], [2, 3, 4]].each do |first, second,| -# end -# -# In the above example, an ExcessedComma node would appear in the third -# position of the Params node that is used to declare that block. The third -# position typically represents a rest-type parameter, but in this case is -# used to indicate that a trailing comma was used. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5239 -class SyntaxTree::ExcessedComma < ::SyntaxTree::Node - # @return [ExcessedComma] a new instance of ExcessedComma - # - # source://syntax_tree//lib/syntax_tree/node.rb#5246 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5281 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5252 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5256 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5244 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5260 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5256 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5273 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5277 - def format(q); end - - # [String] the comma - # - # source://syntax_tree//lib/syntax_tree/node.rb#5241 - def value; end -end - -# Field is always the child of an assignment. It represents assigning to a -# “field” on an object. -# -# object.variable = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#5291 -class SyntaxTree::Field < ::SyntaxTree::Node - # @return [Field] a new instance of Field - # - # source://syntax_tree//lib/syntax_tree/node.rb#5304 - def initialize(parent:, operator:, name:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5354 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5312 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5316 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5302 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5321 - def copy(parent: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5316 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5336 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5346 - def format(q); end - - # [Const | Ident] the name of the field being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#5299 - def name; end - - # [:"::" | Op | Period] the operator being used for the assignment - # - # source://syntax_tree//lib/syntax_tree/node.rb#5296 - def operator; end - - # [Node] the parent object that owns the field being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#5293 - def parent; end -end - -# This is the parent class of a lot of built-in visitors for Syntax Tree. It -# reflects visiting each of the fields on every node in turn. It itself does -# not do anything with these fields, it leaves that behavior up to the -# subclass to implement. -# -# In order to properly use this class, you will need to subclass it and -# implement #comments, #field, #list, #node, #pairs, and #text. Those are -# documented here. -# -# == comments(node) -# -# This accepts the node that is being visited and does something depending on -# the comments attached to the node. -# -# == field(name, value) -# -# This accepts the name of the field being visited as a string (like "value") -# and the actual value of that field. The value can be a subclass of Node or -# any other type that can be held within the tree. -# -# == list(name, values) -# -# This accepts the name of the field being visited as well as a list of -# values. This is used, for example, when visiting something like the body of -# a Statements node. -# -# == node(name, node) -# -# This is the parent serialization method for each node. It is called with the -# node itself, as well as the type of the node as a string. The type is an -# internally used value that usually resembles the name of the ripper event -# that generated the node. The method should yield to the given block which -# then calls through to visit each of the fields on the node. -# -# == text(name, value) -# -# This accepts the name of the field being visited as well as a string value -# representing the value of the field. -# -# == pairs(name, values) -# -# This accepts the name of the field being visited as well as a list of pairs -# that represent the value of the field. It is used only in a couple of -# circumstances, like when visiting the list of optional parameters defined on -# a method. -# -# source://syntax_tree//lib/syntax_tree/field_visitor.rb#50 -class SyntaxTree::FieldVisitor < ::SyntaxTree::BasicVisitor - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#163 - def visit_BEGIN(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#245 - def visit_CHAR(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#342 - def visit_END(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1018 - def visit___end__(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#68 - def visit_alias(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#52 - def visit_aref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#60 - def visit_aref_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#76 - def visit_arg_block(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#83 - def visit_arg_paren(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#90 - def visit_arg_star(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#97 - def visit_args(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#104 - def visit_args_forward(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#108 - def visit_array(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#115 - def visit_aryptn(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#125 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#133 - def visit_assoc(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#141 - def visit_assoc_splat(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#148 - def visit_backref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#152 - def visit_backtick(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#156 - def visit_bare_assoc_hash(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#170 - def visit_begin(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#177 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#186 - def visit_block(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#201 - def visit_block_var(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#194 - def visit_blockarg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#209 - def visit_bodystmt(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#219 - def visit_break(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#226 - def visit_call(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#236 - def visit_case(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#249 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#258 - def visit_comma(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#262 - def visit_command(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#271 - def visit_command_call(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#282 - def visit_comment(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#286 - def visit_const(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#290 - def visit_const_path_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#298 - def visit_const_path_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#306 - def visit_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#313 - def visit_cvar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#317 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#328 - def visit_defined(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#335 - def visit_dyna_symbol(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#349 - def visit_else(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#356 - def visit_elsif(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#365 - def visit_embdoc(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#369 - def visit_embexpr_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#373 - def visit_embexpr_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#377 - def visit_embvar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#381 - def visit_ensure(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#388 - def visit_excessed_comma(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#392 - def visit_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#401 - def visit_float(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#405 - def visit_fndptn(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#415 - def visit_for(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#424 - def visit_gvar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#428 - def visit_hash(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#435 - def visit_heredoc(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#442 - def visit_heredoc_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#446 - def visit_heredoc_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#450 - def visit_hshptn(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#459 - def visit_ident(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#463 - def visit_if(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#472 - def visit_if_op(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#481 - def visit_imaginary(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#485 - def visit_in(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#494 - def visit_int(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#498 - def visit_ivar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#502 - def visit_kw(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#506 - def visit_kwrest_param(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#513 - def visit_label(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#517 - def visit_label_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#521 - def visit_lambda(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#529 - def visit_lambda_var(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#537 - def visit_lbrace(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#541 - def visit_lbracket(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#545 - def visit_lparen(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#549 - def visit_massign(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#557 - def visit_method_add_block(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#565 - def visit_mlhs(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#572 - def visit_mlhs_paren(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#579 - def visit_module(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#587 - def visit_mrhs(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#594 - def visit_next(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#601 - def visit_not(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#608 - def visit_op(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#612 - def visit_opassign(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#621 - def visit_params(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#634 - def visit_paren(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#641 - def visit_period(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#645 - def visit_pinned_begin(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#652 - def visit_pinned_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#659 - def visit_program(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#666 - def visit_qsymbols(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#673 - def visit_qsymbols_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#677 - def visit_qwords(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#684 - def visit_qwords_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#688 - def visit_range(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#697 - def visit_rassign(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#706 - def visit_rational(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#710 - def visit_rbrace(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#714 - def visit_rbracket(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#718 - def visit_redo(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#722 - def visit_regexp_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#726 - def visit_regexp_content(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#730 - def visit_regexp_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#734 - def visit_regexp_literal(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#742 - def visit_rescue(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#751 - def visit_rescue_ex(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#759 - def visit_rescue_mod(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#767 - def visit_rest_param(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#774 - def visit_retry(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#778 - def visit_return(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#785 - def visit_rparen(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#789 - def visit_sclass(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#797 - def visit_statements(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#804 - def visit_string_concat(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#812 - def visit_string_content(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#816 - def visit_string_dvar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#823 - def visit_string_embexpr(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#830 - def visit_string_literal(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#837 - def visit_super(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#844 - def visit_symbeg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#848 - def visit_symbol_content(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#852 - def visit_symbol_literal(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#859 - def visit_symbols(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#866 - def visit_symbols_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#870 - def visit_tlambda(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#874 - def visit_tlambeg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#878 - def visit_top_const_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#885 - def visit_top_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#892 - def visit_tstring_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#896 - def visit_tstring_content(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#900 - def visit_tstring_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#904 - def visit_unary(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#912 - def visit_undef(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#919 - def visit_unless(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#928 - def visit_until(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#936 - def visit_var_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#943 - def visit_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#950 - def visit_vcall(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#957 - def visit_void_stmt(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#961 - def visit_when(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#970 - def visit_while(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#978 - def visit_word(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#985 - def visit_words(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#992 - def visit_words_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#996 - def visit_xstring(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1000 - def visit_xstring_literal(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1007 - def visit_yield(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1014 - def visit_zsuper(node); end - - private - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1025 - def visit_token(node, type); end -end - -# FloatLiteral represents a floating point number literal. -# -# 1.0 -# -# source://syntax_tree//lib/syntax_tree/node.rb#5364 -class SyntaxTree::FloatLiteral < ::SyntaxTree::Node - # @return [FloatLiteral] a new instance of FloatLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#5371 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5406 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5377 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5381 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5369 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5385 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5381 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5398 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5402 - def format(q); end - - # [String] the value of the floating point number literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#5366 - def value; end -end - -# Formats either a Break, Next, or Return node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2438 -class SyntaxTree::FlowControlFormatter - # @return [FlowControlFormatter] a new instance of FlowControlFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#2445 - def initialize(keyword, node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2450 - def format(q); end - - # [String] the keyword to print - # - # source://syntax_tree//lib/syntax_tree/node.rb#2440 - def keyword; end - - # [Break | Next | Return] the node being formatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#2443 - def node; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#2599 - def format_arguments(q, opening, closing); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2589 - def format_array_contents(q, array); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2609 - def skip_parens?(node); end -end - -# FndPtn represents matching against a pattern where you find a pattern in an -# array using the Ruby 3.0+ pattern matching syntax. -# -# case value -# in [*, 7, *] -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#5418 -class SyntaxTree::FndPtn < ::SyntaxTree::Node - # @return [FndPtn] a new instance of FndPtn - # - # source://syntax_tree//lib/syntax_tree/node.rb#5435 - def initialize(constant:, left:, values:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5504 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5444 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5448 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5433 - def comments; end - - # [nil | VarRef | ConstPathRef] the optional constant wrapper - # - # source://syntax_tree//lib/syntax_tree/node.rb#5420 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5452 - def copy(constant: T.unsafe(nil), left: T.unsafe(nil), values: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5448 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5468 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5479 - def format(q); end - - # [VarField] the splat on the left-hand side - # - # source://syntax_tree//lib/syntax_tree/node.rb#5423 - def left; end - - # [VarField] the splat on the right-hand side - # - # source://syntax_tree//lib/syntax_tree/node.rb#5430 - def right; end - - # [Array[ Node ]] the list of positional expressions in the pattern that - # are being matched - # - # source://syntax_tree//lib/syntax_tree/node.rb#5427 - def values; end -end - -# For represents using a +for+ loop. -# -# for value in list do -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#5516 -class SyntaxTree::For < ::SyntaxTree::Node - # @return [For] a new instance of For - # - # source://syntax_tree//lib/syntax_tree/node.rb#5530 - def initialize(index:, collection:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5590 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5538 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5542 - def child_nodes; end - - # [Node] the object being enumerated in the loop - # - # source://syntax_tree//lib/syntax_tree/node.rb#5522 - def collection; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5528 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5546 - def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5542 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5561 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5571 - def format(q); end - - # [MLHS | VarField] the variable declaration being used to - # pull values out of the object being enumerated - # - # source://syntax_tree//lib/syntax_tree/node.rb#5519 - def index; end - - # [Statements] the statements to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#5525 - def statements; end -end - -# A slightly enhanced PP that knows how to format recursively including -# comments. -# -# source://syntax_tree//lib/syntax_tree/formatter.rb#6 -class SyntaxTree::Formatter < ::PrettierPrint - # @return [Formatter] a new instance of Formatter - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#95 - def initialize(source, *args, options: T.unsafe(nil)); end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def disable_auto_ternary; end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def disable_auto_ternary?; end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#115 - def format(node, stackable: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#175 - def format_each(nodes); end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#179 - def grandparent; end - - # This is a simplified version of prettyprint's group. It doesn't provide - # any of the more advanced options because we don't need them and they take - # up expensive computation time. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#194 - def group; end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#183 - def parent; end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#187 - def parents; end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def quote; end - - # A similar version to the super, except that it calls back into the - # separator proc with the instance of `self`. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#208 - def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end - - # Returns the value of attribute source. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#83 - def source; end - - # Returns the value of attribute stack. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#83 - def stack; end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def target_ruby_version; end - - # This is a much simplified version of prettyprint's text. It avoids - # calculating width by pushing the string directly onto the target. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#224 - def text(string); end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def trailing_comma; end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def trailing_comma?; end - - class << self - # source://syntax_tree//lib/syntax_tree/formatter.rb#108 - def format(source, node, base_indentation = T.unsafe(nil)); end - end -end - -# source://syntax_tree//lib/syntax_tree/formatter.rb#80 -SyntaxTree::Formatter::COMMENT_PRIORITY = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/formatter.rb#81 -SyntaxTree::Formatter::HEREDOC_PRIORITY = T.let(T.unsafe(nil), Integer) - -# We want to minimize as much as possible the number of options that are -# available in syntax tree. For the most part, if users want non-default -# formatting, they should override the format methods on the specific nodes -# themselves. However, because of some history with prettier and the fact -# that folks have become entrenched in their ways, we decided to provide a -# small amount of configurability. -# -# source://syntax_tree//lib/syntax_tree/formatter.rb#23 -class SyntaxTree::Formatter::Options - # @return [Options] a new instance of Options - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#29 - def initialize(quote: T.unsafe(nil), trailing_comma: T.unsafe(nil), disable_auto_ternary: T.unsafe(nil), target_ruby_version: T.unsafe(nil)); end - - # Returns the value of attribute disable_auto_ternary. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#24 - def disable_auto_ternary; end - - # Returns the value of attribute quote. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#24 - def quote; end - - # Returns the value of attribute target_ruby_version. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#24 - def target_ruby_version; end - - # Returns the value of attribute trailing_comma. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#24 - def trailing_comma; end -end - -# Unfortunately, Gem::Version.new is not ractor-safe because it performs -# global caching using a class variable. This works around that by just -# setting the instance variables directly. -# -# source://syntax_tree//lib/syntax_tree/formatter.rb#10 -class SyntaxTree::Formatter::SemanticVersion < ::Gem::Version - # @return [SemanticVersion] a new instance of SemanticVersion - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#11 - def initialize(version); end -end - -# GVar represents a global variable literal. -# -# $variable -# -# source://syntax_tree//lib/syntax_tree/node.rb#5600 -class SyntaxTree::GVar < ::SyntaxTree::Node - # @return [GVar] a new instance of GVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#5607 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5642 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5613 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5617 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5605 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5621 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5617 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5634 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5638 - def format(q); end - - # [String] the name of the global variable - # - # source://syntax_tree//lib/syntax_tree/node.rb#5602 - def value; end -end - -# This holds references to objects that respond to both #parse and #format -# so that we can use them in the CLI. -# -# source://syntax_tree//lib/syntax_tree.rb#43 -SyntaxTree::HANDLERS = T.let(T.unsafe(nil), Hash) - -# This module is responsible for formatting the assocs contained within a -# hash or bare hash. It first determines if every key in the hash can use -# labels. If it can, it uses labels. Otherwise it uses hash rockets. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1728 -module SyntaxTree::HashKeyFormatter - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#1786 - def for(container); end - end -end - -# When formatting a single assoc node without the context of the parent -# hash, this formatter is used. It uses whatever is present in the node, -# because there is nothing to be consistent with. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1775 -class SyntaxTree::HashKeyFormatter::Identity - # source://syntax_tree//lib/syntax_tree/node.rb#1776 - def format_key(q, key); end -end - -# Formats the keys of a hash literal using labels. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1730 -class SyntaxTree::HashKeyFormatter::Labels - # source://syntax_tree//lib/syntax_tree/node.rb#1733 - def format_key(q, key); end -end - -# source://syntax_tree//lib/syntax_tree/node.rb#1731 -SyntaxTree::HashKeyFormatter::Labels::LABEL = T.let(T.unsafe(nil), Regexp) - -# Formats the keys of a hash literal using hash rockets. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1756 -class SyntaxTree::HashKeyFormatter::Rockets - # source://syntax_tree//lib/syntax_tree/node.rb#1757 - def format_key(q, key); end -end - -# HashLiteral represents a hash literal. -# -# { key => value } -# -# source://syntax_tree//lib/syntax_tree/node.rb#5651 -class SyntaxTree::HashLiteral < ::SyntaxTree::Node - # @return [HashLiteral] a new instance of HashLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#5687 - def initialize(lbrace:, assocs:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5728 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5694 - def accept(visitor); end - - # [Array[ Assoc | AssocSplat ]] the optional contents of the hash - # - # source://syntax_tree//lib/syntax_tree/node.rb#5682 - def assocs; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5698 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5685 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5702 - def copy(lbrace: T.unsafe(nil), assocs: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5698 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5716 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5720 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5733 - def format_key(q, key); end - - # [LBrace] the left brace that opens this hash - # - # source://syntax_tree//lib/syntax_tree/node.rb#5679 - def lbrace; end - - private - - # If we have an empty hash that contains only comments, then we're going - # to do some special printing to ensure they get indented correctly. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#5741 - def empty_with_comments?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5745 - def format_contents(q); end -end - -# This is a special formatter used if the hash literal contains no values -# but _does_ contain comments. In this case we do some special formatting to -# make sure the comments gets indented properly. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5655 -class SyntaxTree::HashLiteral::EmptyWithCommentsFormatter - # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#5659 - def initialize(lbrace); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5663 - def format(q); end - - # [LBrace] the opening brace - # - # source://syntax_tree//lib/syntax_tree/node.rb#5657 - def lbrace; end -end - -# Heredoc represents a heredoc string literal. -# -# <<~DOC -# contents -# DOC -# -# source://syntax_tree//lib/syntax_tree/node.rb#5774 -class SyntaxTree::Heredoc < ::SyntaxTree::Node - # @return [Heredoc] a new instance of Heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5791 - def initialize(beginning:, location:, ending: T.unsafe(nil), dedent: T.unsafe(nil), parts: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5873 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5800 - def accept(visitor); end - - # [HeredocBeg] the opening of the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5776 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5804 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5789 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5808 - def copy(beginning: T.unsafe(nil), location: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5804 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5823 - def deconstruct_keys(_keys); end - - # [Integer] how far to dedent the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5782 - def dedent; end - - # [HeredocEnd] the ending of the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5779 - def ending; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5838 - def format(q); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # heredoc string literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#5786 - def parts; end -end - -# This is a very specific behavior where you want to force a newline, but -# don't want to force the break parent. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5835 -SyntaxTree::Heredoc::SEPARATOR = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# HeredocBeg represents the beginning declaration of a heredoc. -# -# <<~DOC -# contents -# DOC -# -# In the example above the HeredocBeg node represents <<~DOC. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5886 -class SyntaxTree::HeredocBeg < ::SyntaxTree::Node - # @return [HeredocBeg] a new instance of HeredocBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#5893 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5928 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5899 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5903 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5891 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5907 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5903 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5920 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5924 - def format(q); end - - # [String] the opening declaration of the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5888 - def value; end -end - -# HeredocEnd represents the closing declaration of a heredoc. -# -# <<~DOC -# contents -# DOC -# -# In the example above the HeredocEnd node represents the closing DOC. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5940 -class SyntaxTree::HeredocEnd < ::SyntaxTree::Node - # @return [HeredocEnd] a new instance of HeredocEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#5947 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5982 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5953 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5957 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5945 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5961 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5957 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5974 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5978 - def format(q); end - - # [String] the closing declaration of the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5942 - def value; end -end - -# HshPtn represents matching against a hash pattern using the Ruby 2.7+ -# pattern matching syntax. -# -# case value -# in { key: } -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#5994 -class SyntaxTree::HshPtn < ::SyntaxTree::Node - # @return [HshPtn] a new instance of HshPtn - # - # source://syntax_tree//lib/syntax_tree/node.rb#6054 - def initialize(constant:, keywords:, keyword_rest:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6147 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6062 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6066 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6052 - def comments; end - - # [nil | VarRef | ConstPathRef] the optional constant wrapper - # - # source://syntax_tree//lib/syntax_tree/node.rb#6042 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6070 - def copy(constant: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6066 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6085 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6095 - def format(q); end - - # [nil | VarField] an optional parameter to gather up all remaining keywords - # - # source://syntax_tree//lib/syntax_tree/node.rb#6049 - def keyword_rest; end - - # [Array[ [DynaSymbol | Label, nil | Node] ]] the set of tuples - # representing the keywords that should be matched against in the pattern - # - # source://syntax_tree//lib/syntax_tree/node.rb#6046 - def keywords; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#6158 - def format_contents(q, parts, nested); end -end - -# Formats a key-value pair in a hash pattern. The value is optional. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5996 -class SyntaxTree::HshPtn::KeywordFormatter - # @return [KeywordFormatter] a new instance of KeywordFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#6003 - def initialize(key, value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6008 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6012 - def format(q); end - - # [Label] the keyword being used - # - # source://syntax_tree//lib/syntax_tree/node.rb#5998 - def key; end - - # [Node] the optional value for the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#6001 - def value; end -end - -# Formats the optional double-splat from the pattern. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6023 -class SyntaxTree::HshPtn::KeywordRestFormatter - # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#6027 - def initialize(keyword_rest); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6031 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6035 - def format(q); end - - # [VarField] the parameter that matches the remaining keywords - # - # source://syntax_tree//lib/syntax_tree/node.rb#6025 - def keyword_rest; end -end - -# IVar represents an instance variable literal. -# -# @variable -# -# source://syntax_tree//lib/syntax_tree/node.rb#6878 -class SyntaxTree::IVar < ::SyntaxTree::Node - # @return [IVar] a new instance of IVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#6885 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6920 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6891 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6895 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6883 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6899 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6895 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6912 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6916 - def format(q); end - - # [String] the name of the instance variable - # - # source://syntax_tree//lib/syntax_tree/node.rb#6880 - def value; end -end - -# Ident represents an identifier anywhere in code. It can represent a very -# large number of things, depending on where it is in the syntax tree. -# -# value -# -# source://syntax_tree//lib/syntax_tree/node.rb#6181 -class SyntaxTree::Ident < ::SyntaxTree::Node - # @return [Ident] a new instance of Ident - # - # source://syntax_tree//lib/syntax_tree/node.rb#6188 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6223 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6194 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6198 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6186 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6202 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6198 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6215 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6219 - def format(q); end - - # [String] the value of the identifier - # - # source://syntax_tree//lib/syntax_tree/node.rb#6183 - def value; end -end - -# If represents the first clause in an +if+ chain. -# -# if predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#6471 -class SyntaxTree::IfNode < ::SyntaxTree::Node - # @return [IfNode] a new instance of IfNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#6484 - def initialize(predicate:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6529 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6492 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6496 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6482 - def comments; end - - # [nil | Elsif | Else] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#6479 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6500 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6496 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6515 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6525 - def format(q); end - - # Checks if the node was originally found in the modifier form. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#6535 - def modifier?; end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#6473 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#6476 - def statements; end -end - -# IfOp represents a ternary clause. -# -# predicate ? truthy : falsy -# -# source://syntax_tree//lib/syntax_tree/node.rb#6544 -class SyntaxTree::IfOp < ::SyntaxTree::Node - # @return [IfOp] a new instance of IfOp - # - # source://syntax_tree//lib/syntax_tree/node.rb#6557 - def initialize(predicate:, truthy:, falsy:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6631 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6565 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6569 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6555 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6573 - def copy(predicate: T.unsafe(nil), truthy: T.unsafe(nil), falsy: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6569 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6588 - def deconstruct_keys(_keys); end - - # [Node] the expression to be executed if the predicate is falsy - # - # source://syntax_tree//lib/syntax_tree/node.rb#6552 - def falsy; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6598 - def format(q); end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#6546 - def predicate; end - - # [Node] the expression to be executed if the predicate is truthy - # - # source://syntax_tree//lib/syntax_tree/node.rb#6549 - def truthy; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#6638 - def format_break(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6661 - def format_flat(q); end -end - -# Imaginary represents an imaginary number literal. -# -# 1i -# -# source://syntax_tree//lib/syntax_tree/node.rb#6680 -class SyntaxTree::Imaginary < ::SyntaxTree::Node - # @return [Imaginary] a new instance of Imaginary - # - # source://syntax_tree//lib/syntax_tree/node.rb#6687 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6722 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6693 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6697 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6685 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6701 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6697 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6714 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6718 - def format(q); end - - # [String] the value of the imaginary number literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#6682 - def value; end -end - -# In represents using the +in+ keyword within the Ruby 2.7+ pattern matching -# syntax. -# -# case value -# in pattern -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#6734 -class SyntaxTree::In < ::SyntaxTree::Node - # @return [In] a new instance of In - # - # source://syntax_tree//lib/syntax_tree/node.rb#6747 - def initialize(pattern:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6812 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6755 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6759 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6745 - def comments; end - - # [nil | In | Else] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#6742 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6763 - def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6759 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6778 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6788 - def format(q); end - - # [Node] the pattern to check against - # - # source://syntax_tree//lib/syntax_tree/node.rb#6736 - def pattern; end - - # [Statements] the expressions to execute if the pattern matched - # - # source://syntax_tree//lib/syntax_tree/node.rb#6739 - def statements; end -end - -# This class can be used to build an index of the structure of Ruby files. We -# define an index as the list of constants and methods defined within a file. -# -# This index strives to be as fast as possible to better support tools like -# IDEs. Because of that, it has different backends depending on what -# functionality is available. -# -# source://syntax_tree//lib/syntax_tree/index.rb#10 -module SyntaxTree::Index - class << self - # This method accepts source code and then indexes it. - # - # source://syntax_tree//lib/syntax_tree/index.rb#674 - def index(source, backend: T.unsafe(nil)); end - - # This method accepts a filepath and then indexes it. - # - # source://syntax_tree//lib/syntax_tree/index.rb#679 - def index_file(filepath, backend: T.unsafe(nil)); end - end -end - -# This entry represents a method definition that was created using the alias -# keyword. -# -# source://syntax_tree//lib/syntax_tree/index.rb#85 -class SyntaxTree::Index::AliasMethodDefinition - # @return [AliasMethodDefinition] a new instance of AliasMethodDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#88 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#86 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#86 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#86 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#86 - def nesting; end -end - -# This entry represents a class definition using the class keyword. -# -# source://syntax_tree//lib/syntax_tree/index.rb#22 -class SyntaxTree::Index::ClassDefinition - # @return [ClassDefinition] a new instance of ClassDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#25 - def initialize(nesting, name, superclass, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def nesting; end - - # Returns the value of attribute superclass. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def superclass; end -end - -# This entry represents a constant assignment. -# -# source://syntax_tree//lib/syntax_tree/index.rb#35 -class SyntaxTree::Index::ConstantDefinition - # @return [ConstantDefinition] a new instance of ConstantDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#38 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#36 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#36 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#36 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#36 - def nesting; end -end - -# This class handles parsing comments from Ruby source code in the case that -# we use the instruction sequence backend. Because the instruction sequence -# backend doesn't provide comments (since they are dropped) we provide this -# interface to lazily parse them out. -# -# source://syntax_tree//lib/syntax_tree/index.rb#152 -class SyntaxTree::Index::EntryComments - include ::Enumerable - - # @return [EntryComments] a new instance of EntryComments - # - # source://syntax_tree//lib/syntax_tree/index.rb#156 - def initialize(file_comments, location); end - - # source://syntax_tree//lib/syntax_tree/index.rb#161 - def each(&block); end - - # Returns the value of attribute file_comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#154 - def file_comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#154 - def location; end -end - -# When you're using the instruction sequence backend, this class is used to -# lazily parse comments out of the source code. -# -# source://syntax_tree//lib/syntax_tree/index.rb#98 -class SyntaxTree::Index::FileComments - # @return [FileComments] a new instance of FileComments - # - # source://syntax_tree//lib/syntax_tree/index.rb#139 - def initialize(source); end - - # source://syntax_tree//lib/syntax_tree/index.rb#143 - def comments; end - - # Returns the value of attribute source. - # - # source://syntax_tree//lib/syntax_tree/index.rb#137 - def source; end -end - -# This represents the Ruby source in the form of a file. When it needs to -# be read we'll read the file. -# -# source://syntax_tree//lib/syntax_tree/index.rb#115 -class SyntaxTree::Index::FileComments::FileSource - # @return [FileSource] a new instance of FileSource - # - # source://syntax_tree//lib/syntax_tree/index.rb#118 - def initialize(filepath); end - - # Returns the value of attribute filepath. - # - # source://syntax_tree//lib/syntax_tree/index.rb#116 - def filepath; end - - # source://syntax_tree//lib/syntax_tree/index.rb#122 - def source; end -end - -# We use the ripper library to pull out source comments. -# -# source://syntax_tree//lib/syntax_tree/index.rb#100 -class SyntaxTree::Index::FileComments::Parser < ::Ripper - # @return [Parser] a new instance of Parser - # - # source://syntax_tree//lib/syntax_tree/index.rb#103 - def initialize(*_arg0); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#101 - def comments; end - - # source://syntax_tree//lib/syntax_tree/index.rb#108 - def on_comment(value); end -end - -# This represents the Ruby source in the form of a string. When it needs -# to be read the string is returned. -# -# source://syntax_tree//lib/syntax_tree/index.rb#129 -class SyntaxTree::Index::FileComments::StringSource - # @return [StringSource] a new instance of StringSource - # - # source://syntax_tree//lib/syntax_tree/index.rb#132 - def initialize(source); end - - # Returns the value of attribute source. - # - # source://syntax_tree//lib/syntax_tree/index.rb#130 - def source; end -end - -# The class defined here is used to perform the indexing, depending on what -# functionality is available from the runtime. -# -# source://syntax_tree//lib/syntax_tree/index.rb#670 -SyntaxTree::Index::INDEX_BACKEND = SyntaxTree::Index::ISeqBackend - -# This backend creates the index using RubyVM::InstructionSequence, which is -# faster than using the Syntax Tree parser, but is not available on all -# runtimes. -# -# source://syntax_tree//lib/syntax_tree/index.rb#177 -class SyntaxTree::Index::ISeqBackend - # source://syntax_tree//lib/syntax_tree/index.rb#184 - def index(source); end - - # source://syntax_tree//lib/syntax_tree/index.rb#191 - def index_file(filepath); end - - private - - # source://syntax_tree//lib/syntax_tree/index.rb#242 - def find_attr_arguments(insns, index); end - - # source://syntax_tree//lib/syntax_tree/index.rb#205 - def find_constant_path(insns, index); end - - # source://syntax_tree//lib/syntax_tree/index.rb#273 - def index_iseq(iseq, file_comments); end - - # source://syntax_tree//lib/syntax_tree/index.rb#200 - def location_for(iseq); end - - # source://syntax_tree//lib/syntax_tree/index.rb#258 - def method_definition(nesting, name, location, file_comments); end -end - -# source://syntax_tree//lib/syntax_tree/index.rb#182 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/index.rb#181 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_SCOPED = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/index.rb#178 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_CLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/index.rb#180 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_MODULE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/index.rb#179 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer) - -# This is a location for an index entry. -# -# source://syntax_tree//lib/syntax_tree/index.rb#12 -class SyntaxTree::Index::Location - # @return [Location] a new instance of Location - # - # source://syntax_tree//lib/syntax_tree/index.rb#15 - def initialize(line, column); end - - # Returns the value of attribute column. - # - # source://syntax_tree//lib/syntax_tree/index.rb#13 - def column; end - - # Returns the value of attribute line. - # - # source://syntax_tree//lib/syntax_tree/index.rb#13 - def line; end -end - -# This entry represents a method definition using the def keyword. -# -# source://syntax_tree//lib/syntax_tree/index.rb#59 -class SyntaxTree::Index::MethodDefinition - # @return [MethodDefinition] a new instance of MethodDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#62 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#60 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#60 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#60 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#60 - def nesting; end -end - -# This entry represents a module definition using the module keyword. -# -# source://syntax_tree//lib/syntax_tree/index.rb#47 -class SyntaxTree::Index::ModuleDefinition - # @return [ModuleDefinition] a new instance of ModuleDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#50 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#48 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#48 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#48 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#48 - def nesting; end -end - -# This backend creates the index using the Syntax Tree parser and a visitor. -# It is not as fast as using the instruction sequences directly, but is -# supported on all runtimes. -# -# source://syntax_tree//lib/syntax_tree/index.rb#452 -class SyntaxTree::Index::ParserBackend - # source://syntax_tree//lib/syntax_tree/index.rb#659 - def index(source); end - - # source://syntax_tree//lib/syntax_tree/index.rb#663 - def index_file(filepath); end -end - -# source://syntax_tree//lib/syntax_tree/index.rb#453 -class SyntaxTree::Index::ParserBackend::ConstantNameVisitor < ::SyntaxTree::Visitor - # source://syntax_tree//lib/syntax_tree/index.rb#458 - def visit_const_path_ref(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#454 - def visit_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#462 - def visit_var_ref(node); end -end - -# source://syntax_tree//lib/syntax_tree/index.rb#467 -class SyntaxTree::Index::ParserBackend::IndexVisitor < ::SyntaxTree::Visitor - # @return [IndexVisitor] a new instance of IndexVisitor - # - # source://syntax_tree//lib/syntax_tree/index.rb#470 - def initialize; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#468 - def nesting; end - - # Returns the value of attribute results. - # - # source://syntax_tree//lib/syntax_tree/index.rb#468 - def results; end - - # Returns the value of attribute statements. - # - # source://syntax_tree//lib/syntax_tree/index.rb#468 - def statements; end - - # source://syntax_tree//lib/syntax_tree/index.rb#477 - def visit_alias(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#496 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#515 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#547 - def visit_command(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#584 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#608 - def visit_module(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#626 - def visit_program(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#631 - def visit_statements(node); end - - private - - # source://syntax_tree//lib/syntax_tree/index.rb#639 - def comments_for(node); end -end - -# This entry represents a singleton method definition using the def keyword -# with a specified target. -# -# source://syntax_tree//lib/syntax_tree/index.rb#72 -class SyntaxTree::Index::SingletonMethodDefinition - # @return [SingletonMethodDefinition] a new instance of SingletonMethodDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#75 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#73 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#73 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#73 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#73 - def nesting; end -end - -# Int represents an integer number literal. -# -# 1 -# -# source://syntax_tree//lib/syntax_tree/node.rb#6822 -class SyntaxTree::Int < ::SyntaxTree::Node - # @return [Int] a new instance of Int - # - # source://syntax_tree//lib/syntax_tree/node.rb#6829 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6869 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6835 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6839 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6827 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6843 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6839 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6853 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6857 - def format(q); end - - # [String] the value of the integer - # - # source://syntax_tree//lib/syntax_tree/node.rb#6824 - def value; end -end - -# This visitor transforms the AST into a hash that contains only primitives -# that can be easily serialized into JSON. -# -# source://syntax_tree//lib/syntax_tree/json_visitor.rb#8 -class SyntaxTree::JSONVisitor < ::SyntaxTree::FieldVisitor - # @return [JSONVisitor] a new instance of JSONVisitor - # - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#11 - def initialize; end - - # Returns the value of attribute target. - # - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#9 - def target; end - - private - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#17 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#21 - def field(name, value); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#25 - def list(name, values); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#29 - def node(node, type); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#38 - def pairs(name, values); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#42 - def text(name, value); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#46 - def visit_location(location); end -end - -# Kw represents the use of a keyword. It can be almost anywhere in the syntax -# tree, so you end up seeing it quite a lot. -# -# if value -# end -# -# In the above example, there would be two Kw nodes: one for the if and one -# for the end. Note that anything that matches the list of keywords in Ruby -# will use a Kw, so if you use a keyword in a symbol literal for instance: -# -# :if -# -# then the contents of the symbol node will contain a Kw node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6938 -class SyntaxTree::Kw < ::SyntaxTree::Node - # @return [Kw] a new instance of Kw - # - # source://syntax_tree//lib/syntax_tree/node.rb#6948 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6981 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6955 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6959 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6946 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6963 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6959 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6973 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6977 - def format(q); end - - # [Symbol] the symbol version of the value - # - # source://syntax_tree//lib/syntax_tree/node.rb#6943 - def name; end - - # [String] the value of the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#6940 - def value; end -end - -# KwRestParam represents defining a parameter in a method definition that -# accepts all remaining keyword parameters. -# -# def method(**kwargs) end -# -# source://syntax_tree//lib/syntax_tree/node.rb#6991 -class SyntaxTree::KwRestParam < ::SyntaxTree::Node - # @return [KwRestParam] a new instance of KwRestParam - # - # source://syntax_tree//lib/syntax_tree/node.rb#6998 - def initialize(name:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7034 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7004 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7008 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6996 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7012 - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7008 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7025 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7029 - def format(q); end - - # [nil | Ident] the name of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#6993 - def name; end -end - -# LBrace represents the use of a left brace, i.e., {. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7316 -class SyntaxTree::LBrace < ::SyntaxTree::Node - # @return [LBrace] a new instance of LBrace - # - # source://syntax_tree//lib/syntax_tree/node.rb#7323 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7358 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7329 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7333 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7321 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7337 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7333 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7350 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7354 - def format(q); end - - # [String] the left brace - # - # source://syntax_tree//lib/syntax_tree/node.rb#7318 - def value; end - - class << self - # Because some nodes keep around a { token so that comments can be attached - # to it if they occur in the source, oftentimes an LBrace is a child of - # another node. This means it's required at initialization time. To make it - # easier to create LBrace nodes without any specific value, this method - # provides a default node. - # - # source://syntax_tree//lib/syntax_tree/node.rb#7367 - def default; end - end -end - -# LBracket represents the use of a left bracket, i.e., [. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7373 -class SyntaxTree::LBracket < ::SyntaxTree::Node - # @return [LBracket] a new instance of LBracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#7380 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7415 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7386 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7390 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7378 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7394 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7390 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7407 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7411 - def format(q); end - - # [String] the left bracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#7375 - def value; end - - class << self - # Because some nodes keep around a [ token so that comments can be attached - # to it if they occur in the source, oftentimes an LBracket is a child of - # another node. This means it's required at initialization time. To make it - # easier to create LBracket nodes without any specific value, this method - # provides a default node. - # - # source://syntax_tree//lib/syntax_tree/node.rb#7424 - def default; end - end -end - -# LParen represents the use of a left parenthesis, i.e., (. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7430 -class SyntaxTree::LParen < ::SyntaxTree::Node - # @return [LParen] a new instance of LParen - # - # source://syntax_tree//lib/syntax_tree/node.rb#7437 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7472 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7443 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7447 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7435 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7451 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7447 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7464 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7468 - def format(q); end - - # [String] the left parenthesis - # - # source://syntax_tree//lib/syntax_tree/node.rb#7432 - def value; end - - class << self - # Because some nodes keep around a ( token so that comments can be attached - # to it if they occur in the source, oftentimes an LParen is a child of - # another node. This means it's required at initialization time. To make it - # easier to create LParen nodes without any specific value, this method - # provides a default node. - # - # source://syntax_tree//lib/syntax_tree/node.rb#7481 - def default; end - end -end - -# Label represents the use of an identifier to associate with an object. You -# can find it in a hash key, as in: -# -# { key: value } -# -# In this case "key:" would be the body of the label. You can also find it in -# pattern matching, as in: -# -# case value -# in key: -# end -# -# In this case "key:" would be the body of the label. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7052 -class SyntaxTree::Label < ::SyntaxTree::Node - # @return [Label] a new instance of Label - # - # source://syntax_tree//lib/syntax_tree/node.rb#7059 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7094 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7065 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7069 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7057 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7073 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7069 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7086 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7090 - def format(q); end - - # [String] the value of the label - # - # source://syntax_tree//lib/syntax_tree/node.rb#7054 - def value; end -end - -# LabelEnd represents the end of a dynamic symbol. -# -# { "key": value } -# -# In the example above, LabelEnd represents the "\":" token at the end of the -# hash key. This node is important for determining the type of quote being -# used by the label. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7106 -class SyntaxTree::LabelEnd < ::SyntaxTree::Node - # @return [LabelEnd] a new instance of LabelEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#7110 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7136 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7115 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7119 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7123 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7119 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7132 - def deconstruct_keys(_keys); end - - # [String] the end of the label - # - # source://syntax_tree//lib/syntax_tree/node.rb#7108 - def value; end -end - -# Lambda represents using a lambda literal (not the lambda method call). -# -# ->(value) { value * 2 } -# -# source://syntax_tree//lib/syntax_tree/node.rb#7145 -class SyntaxTree::Lambda < ::SyntaxTree::Node - # @return [Lambda] a new instance of Lambda - # - # source://syntax_tree//lib/syntax_tree/node.rb#7155 - def initialize(params:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7239 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7162 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7166 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7153 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7170 - def copy(params: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7166 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7184 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7193 - def format(q); end - - # [LambdaVar | Paren] the parameter declaration for this lambda - # - # source://syntax_tree//lib/syntax_tree/node.rb#7147 - def params; end - - # [BodyStmt | Statements] the expressions to be executed in this lambda - # - # source://syntax_tree//lib/syntax_tree/node.rb#7150 - def statements; end -end - -# LambdaVar represents the parameters being declared for a lambda. Effectively -# this node is everything contained within the parentheses. This includes all -# of the various parameter types, as well as block-local variable -# declarations. -# -# -> (positional, optional = value, keyword:, █ local) do -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#7253 -class SyntaxTree::LambdaVar < ::SyntaxTree::Node - # @return [LambdaVar] a new instance of LambdaVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#7263 - def initialize(params:, locals:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7309 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7270 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7274 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7261 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7278 - def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7274 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7292 - def deconstruct_keys(_keys); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#7296 - def empty?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7300 - def format(q); end - - # [Array[ Ident ]] the list of block-local variable declarations - # - # source://syntax_tree//lib/syntax_tree/node.rb#7258 - def locals; end - - # [Params] the parameters being declared with the block - # - # source://syntax_tree//lib/syntax_tree/node.rb#7255 - def params; end -end - -# Syntax Tree additionally ships with a language server conforming to the -# language server protocol. It can be invoked through the CLI by running: -# -# stree lsp -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#14 -class SyntaxTree::LanguageServer - # @return [LanguageServer] a new instance of LanguageServer - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#217 - def initialize(input: T.unsafe(nil), output: T.unsafe(nil), print_width: T.unsafe(nil)); end - - # Returns the value of attribute input. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#215 - def input; end - - # Returns the value of attribute output. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#215 - def output; end - - # Returns the value of attribute print_width. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#215 - def print_width; end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#228 - def run; end - - private - - # source://syntax_tree//lib/syntax_tree/language_server.rb#280 - def capabilities; end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#293 - def format(source, extension); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#317 - def inlay_hints(source); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#333 - def log(message); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#327 - def write(value); end -end - -# This class provides inlay hints for the language server. For more -# information, see the spec here: -# https://github.com/microsoft/language-server-protocol/issues/956. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#18 -class SyntaxTree::LanguageServer::InlayHints < ::SyntaxTree::Visitor - # @return [InlayHints] a new instance of InlayHints - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#43 - def initialize; end - - # Returns the value of attribute hints. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#41 - def hints; end - - # Returns the value of attribute stack. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#41 - def stack; end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#48 - def visit(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#67 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#81 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#102 - def visit_if_op(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#124 - def visit_rescue(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#145 - def visit_unary(node); end - - private - - # source://syntax_tree//lib/syntax_tree/language_server.rb#156 - def parentheses(location); end -end - -# This represents a hint that is going to be displayed in the editor. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#20 -class SyntaxTree::LanguageServer::InlayHints::Hint - # @return [Hint] a new instance of Hint - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#23 - def initialize(line:, character:, label:); end - - # Returns the value of attribute character. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#21 - def character; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#21 - def label; end - - # Returns the value of attribute line. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#21 - def line; end - - # This is the shape that the LSP expects. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#30 - def to_json(*opts); end -end - -# This is a small module that effectively mirrors pattern matching. We're -# using it so that we can support truffleruby without having to ignore the -# language server. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#174 -module SyntaxTree::LanguageServer::Request - class << self - # source://syntax_tree//lib/syntax_tree/language_server.rb#203 - def [](value); end - end -end - -# Represents a hash pattern. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#176 -class SyntaxTree::LanguageServer::Request::Shape - # @return [Shape] a new instance of Shape - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#179 - def initialize(values); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#183 - def ===(other); end - - # Returns the value of attribute values. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#177 - def values; end -end - -# Represents an array pattern. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#191 -class SyntaxTree::LanguageServer::Request::Tuple - # @return [Tuple] a new instance of Tuple - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#194 - def initialize(values); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#198 - def ===(other); end - - # Returns the value of attribute values. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#192 - def values; end -end - -# Represents the location of a node in the tree from the source code. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5 -class SyntaxTree::Location - # @return [Location] a new instance of Location - # - # source://syntax_tree//lib/syntax_tree/node.rb#13 - def initialize(start_line:, start_char:, start_column:, end_line:, end_char:, end_column:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#33 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#50 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#54 - def deconstruct_keys(_keys); end - - # Returns the value of attribute end_char. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def end_char; end - - # Returns the value of attribute end_column. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def end_column; end - - # Returns the value of attribute end_line. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def end_line; end - - # source://syntax_tree//lib/syntax_tree/node.rb#29 - def lines; end - - # Returns the value of attribute start_char. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def start_char; end - - # Returns the value of attribute start_column. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def start_column; end - - # Returns the value of attribute start_line. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def start_line; end - - # source://syntax_tree//lib/syntax_tree/node.rb#39 - def to(other); end - - class << self - # A convenience method that is typically used when you don't care about the - # location of a node, but need to create a Location instance to pass to a - # constructor. - # - # source://syntax_tree//lib/syntax_tree/node.rb#90 - def default; end - - # source://syntax_tree//lib/syntax_tree/node.rb#76 - def fixed(line:, char:, column:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#65 - def token(line:, char:, column:, size:); end - end -end - -# Formats an Until or While node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11378 -class SyntaxTree::LoopFormatter - # @return [LoopFormatter] a new instance of LoopFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#11385 - def initialize(keyword, node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11390 - def format(q); end - - # [String] the name of the keyword used for this loop - # - # source://syntax_tree//lib/syntax_tree/node.rb#11380 - def keyword; end - - # [Until | While] the node that is being formatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#11383 - def node; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#11437 - def format_break(q); end -end - -# MAssign is a parent node of any kind of multiple assignment. This includes -# splitting out variables on the left like: -# -# first, second, third = value -# -# as well as splitting out variables on the right, as in: -# -# value = first, second, third -# -# Both sides support splats, as well as variables following them. There's also -# destructuring behavior that you can achieve with the following: -# -# first, = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#7500 -class SyntaxTree::MAssign < ::SyntaxTree::Node - # @return [MAssign] a new instance of MAssign - # - # source://syntax_tree//lib/syntax_tree/node.rb#7510 - def initialize(target:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7554 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7517 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7521 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7508 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7525 - def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7521 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7539 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7543 - def format(q); end - - # [MLHS | MLHSParen] the target of the multiple assignment - # - # source://syntax_tree//lib/syntax_tree/node.rb#7502 - def target; end - - # [Node] the value being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#7505 - def value; end -end - -# MLHS represents a list of values being destructured on the left-hand side -# of a multiple assignment. -# -# first, second, third = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#7638 -class SyntaxTree::MLHS < ::SyntaxTree::Node - # @return [MLHS] a new instance of MLHS - # - # source://syntax_tree//lib/syntax_tree/node.rb#7655 - def initialize(parts:, location:, comma: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7693 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7662 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7666 - def child_nodes; end - - # [boolean] whether or not there is a trailing comma at the end of this - # list, which impacts destructuring. It's an attr_accessor so that while - # the syntax tree is being built it can be set by its parent node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7650 - def comma; end - - # [boolean] whether or not there is a trailing comma at the end of this - # list, which impacts destructuring. It's an attr_accessor so that while - # the syntax tree is being built it can be set by its parent node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7650 - def comma=(_arg0); end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7653 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7670 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil), comma: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7666 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7684 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7688 - def format(q); end - - # [ - # Array[ - # ARefField | ArgStar | ConstPathField | Field | Ident | MLHSParen | - # TopConstField | VarField - # ] - # ] the parts of the left-hand side of a multiple assignment - # - # source://syntax_tree//lib/syntax_tree/node.rb#7645 - def parts; end -end - -# MLHSParen represents parentheses being used to destruct values in a multiple -# assignment on the left hand side. -# -# (left, right) = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#7704 -class SyntaxTree::MLHSParen < ::SyntaxTree::Node - # @return [MLHSParen] a new instance of MLHSParen - # - # source://syntax_tree//lib/syntax_tree/node.rb#7716 - def initialize(contents:, location:, comma: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7769 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7723 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7727 - def child_nodes; end - - # [boolean] whether or not there is a trailing comma at the end of this - # list, which impacts destructuring. It's an attr_accessor so that while - # the syntax tree is being built it can be set by its parent node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7711 - def comma; end - - # [boolean] whether or not there is a trailing comma at the end of this - # list, which impacts destructuring. It's an attr_accessor so that while - # the syntax tree is being built it can be set by its parent node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7711 - def comma=(_arg0); end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7714 - def comments; end - - # [MLHS | MLHSParen] the contents inside of the parentheses - # - # source://syntax_tree//lib/syntax_tree/node.rb#7706 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7731 - def copy(contents: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7727 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7744 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7748 - def format(q); end -end - -# MRHS represents the values that are being assigned on the right-hand side of -# a multiple assignment. -# -# values = first, second, third -# -# source://syntax_tree//lib/syntax_tree/node.rb#7869 -class SyntaxTree::MRHS < ::SyntaxTree::Node - # @return [MRHS] a new instance of MRHS - # - # source://syntax_tree//lib/syntax_tree/node.rb#7876 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7911 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7882 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7886 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7874 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7890 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7886 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7903 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7907 - def format(q); end - - # [Array[Node]] the parts that are being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#7871 - def parts; end -end - -# This visitor transforms the AST into a Ruby pattern matching expression that -# would match correctly against the AST. -# -# source://syntax_tree//lib/syntax_tree/match_visitor.rb#6 -class SyntaxTree::MatchVisitor < ::SyntaxTree::FieldVisitor - # @return [MatchVisitor] a new instance of MatchVisitor - # - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#9 - def initialize(q); end - - # Returns the value of attribute q. - # - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#7 - def q; end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#13 - def visit(node); end - - private - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#30 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#44 - def field(name, value); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#52 - def list(name, values); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#65 - def node(node, _type); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#86 - def pairs(name, values); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#112 - def text(name, value); end -end - -# This module is responsible for rendering mermaid (https://mermaid.js.org/) -# flow charts. -# -# source://syntax_tree//lib/syntax_tree/mermaid.rb#9 -module SyntaxTree::Mermaid - class << self - # Escape a label to be used in the mermaid syntax. This is used to escape - # HTML entities such that they render properly within the quotes. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#158 - def escape(label); end - - # Create a new flowchart. If a block is given, it will be yielded to and - # the flowchart will be rendered. Otherwise, the flowchart will be - # returned. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#165 - def flowchart; end - end -end - -# This is the main class that handles rendering a flowchart. It keeps track -# of its nodes and links and renders them according to the mermaid syntax. -# -# source://syntax_tree//lib/syntax_tree/mermaid.rb#12 -class SyntaxTree::Mermaid::FlowChart - # @return [FlowChart] a new instance of FlowChart - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#15 - def initialize; end - - # Retrieve a node that has already been added to the flowchart by its id. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#25 - def fetch(id); end - - # Add a link to the flowchart between two nodes with an optional label. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#30 - def link(from, to, label = T.unsafe(nil), type: T.unsafe(nil), color: T.unsafe(nil)); end - - # Returns the value of attribute links. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 - def links; end - - # Add a node to the flowchart with an optional label. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#39 - def node(id, label = T.unsafe(nil), shape: T.unsafe(nil)); end - - # Returns the value of attribute nodes. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 - def nodes; end - - # Returns the value of attribute output. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 - def output; end - - # Returns the value of attribute prefix. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 - def prefix; end - - # Return the rendered flowchart. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#64 - def render; end - - # Add a subgraph to the flowchart. Within the given block, all of the - # nodes will be rendered within the subgraph. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#49 - def subgraph(label); end -end - -# This class represents a link between two nodes in a flowchart. It is not -# meant to be interacted with directly, but rather used as a data structure -# by the FlowChart class. -# -# source://syntax_tree//lib/syntax_tree/mermaid.rb#78 -class SyntaxTree::Mermaid::Link - # @return [Link] a new instance of Link - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#84 - def initialize(from, to, label, type, color); end - - # Returns the value of attribute color. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def color; end - - # Returns the value of attribute from. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def from; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def label; end - - # source://syntax_tree//lib/syntax_tree/mermaid.rb#95 - def render; end - - # Returns the value of attribute to. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def to; end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def type; end - - private - - # source://syntax_tree//lib/syntax_tree/mermaid.rb#108 - def sides; end -end - -# source://syntax_tree//lib/syntax_tree/mermaid.rb#80 -SyntaxTree::Mermaid::Link::COLORS = T.let(T.unsafe(nil), Array) - -# source://syntax_tree//lib/syntax_tree/mermaid.rb#79 -SyntaxTree::Mermaid::Link::TYPES = T.let(T.unsafe(nil), Array) - -# This class represents a node in a flowchart. Unlike the Link class, it can -# be used directly. It is the return value of the #node method, and is meant -# to be passed around to #link methods to create links between nodes. -# -# source://syntax_tree//lib/syntax_tree/mermaid.rb#121 -class SyntaxTree::Mermaid::Node - # @return [Node] a new instance of Node - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#126 - def initialize(id, label, shape); end - - # Returns the value of attribute id. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 - def id; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 - def label; end - - # source://syntax_tree//lib/syntax_tree/mermaid.rb#134 - def render; end - - # Returns the value of attribute shape. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 - def shape; end - - private - - # source://syntax_tree//lib/syntax_tree/mermaid.rb#141 - def bounds; end -end - -# source://syntax_tree//lib/syntax_tree/mermaid.rb#122 -SyntaxTree::Mermaid::Node::SHAPES = T.let(T.unsafe(nil), Array) - -# This visitor transforms the AST into a mermaid flow chart. -# -# source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#5 -class SyntaxTree::MermaidVisitor < ::SyntaxTree::FieldVisitor - # @return [MermaidVisitor] a new instance of MermaidVisitor - # - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#8 - def initialize; end - - # Returns the value of attribute flowchart. - # - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6 - def flowchart; end - - # Returns the value of attribute target. - # - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6 - def target; end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#13 - def visit_program(node); end - - private - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#20 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#24 - def field(name, value); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#37 - def list(name, values); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#43 - def node(node, type); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#55 - def pairs(name, values); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#65 - def text(name, value); end -end - -# MethodAddBlock represents a method call with a block argument. -# -# method {} -# -# source://syntax_tree//lib/syntax_tree/node.rb#7563 -class SyntaxTree::MethodAddBlock < ::SyntaxTree::Node - # @return [MethodAddBlock] a new instance of MethodAddBlock - # - # source://syntax_tree//lib/syntax_tree/node.rb#7573 - def initialize(call:, block:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7622 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7580 - def accept(visitor); end - - # [BlockNode] the block being sent with the method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#7568 - def block; end - - # [ARef | CallNode | Command | CommandCall | Super | ZSuper] the method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#7565 - def call; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7584 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7571 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7588 - def copy(call: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7584 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7602 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7606 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7627 - def format_contents(q); end -end - -# ModuleDeclaration represents defining a module using the +module+ keyword. -# -# module Namespace -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#7779 -class SyntaxTree::ModuleDeclaration < ::SyntaxTree::Node - # @return [ModuleDeclaration] a new instance of ModuleDeclaration - # - # source://syntax_tree//lib/syntax_tree/node.rb#7789 - def initialize(constant:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7849 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7796 - def accept(visitor); end - - # [BodyStmt] the expressions to be executed in the context of the module - # - # source://syntax_tree//lib/syntax_tree/node.rb#7784 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7800 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7787 - def comments; end - - # [ConstPathRef | ConstRef | TopConstRef] the name of the module - # - # source://syntax_tree//lib/syntax_tree/node.rb#7781 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7804 - def copy(constant: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7800 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7818 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7827 - def format(q); end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#7856 - def format_declaration(q); end -end - -# This visitor walks through the tree and copies each node as it is being -# visited. This is useful for mutating the tree before it is formatted. -# -# source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#6 -class SyntaxTree::MutationVisitor < ::SyntaxTree::BasicVisitor - # @return [MutationVisitor] a new instance of MutationVisitor - # - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#9 - def initialize; end - - # Create a new mutation based on the given query that will mutate the node - # using the given block. The block should return a new node that will take - # the place of the given node in the tree. These blocks frequently make use - # of the `copy` method on nodes to create a new node with the same - # properties as the original node. - # - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#18 - def mutate(query, &block); end - - # Returns the value of attribute mutations. - # - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#7 - def mutations; end - - # This is the base visit method for each node in the tree. It first creates - # a copy of the node using the visit_* methods defined below. Then it checks - # each mutation in sequence and calls it if it finds a match. - # - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#25 - def visit(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#38 - def visit_BEGIN(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#46 - def visit_CHAR(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#51 - def visit_END(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#59 - def visit___end__(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#64 - def visit_alias(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#69 - def visit_aref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#74 - def visit_aref_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#89 - def visit_arg_block(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#79 - def visit_arg_paren(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#94 - def visit_arg_star(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#84 - def visit_args(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#99 - def visit_args_forward(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#104 - def visit_array(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#112 - def visit_aryptn(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#122 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#127 - def visit_assoc(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#132 - def visit_assoc_splat(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#137 - def visit_backref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#142 - def visit_backtick(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#147 - def visit_bare_assoc_hash(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#152 - def visit_begin(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#162 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#295 - def visit_block(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#167 - def visit_block_var(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#172 - def visit_blockarg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#177 - def visit_bodystmt(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#187 - def visit_break(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#192 - def visit_call(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#202 - def visit_case(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#216 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#225 - def visit_comma(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#230 - def visit_command(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#239 - def visit_command_call(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#249 - def visit_comment(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#254 - def visit_const(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#259 - def visit_const_path_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#264 - def visit_const_path_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#269 - def visit_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#274 - def visit_cvar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#279 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#290 - def visit_defined(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#313 - def visit_dyna_symbol(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#318 - def visit_else(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#326 - def visit_elsif(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#334 - def visit_embdoc(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#339 - def visit_embexpr_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#344 - def visit_embexpr_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#349 - def visit_embvar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#354 - def visit_ensure(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#362 - def visit_excessed_comma(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#367 - def visit_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#375 - def visit_float(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#380 - def visit_fndptn(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#390 - def visit_for(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#395 - def visit_gvar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#400 - def visit_hash(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#405 - def visit_heredoc(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#414 - def visit_heredoc_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#419 - def visit_heredoc_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#424 - def visit_hshptn(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#434 - def visit_ident(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#439 - def visit_if(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#448 - def visit_if_op(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#453 - def visit_imaginary(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#458 - def visit_in(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#466 - def visit_int(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#471 - def visit_ivar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#476 - def visit_kw(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#481 - def visit_kwrest_param(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#486 - def visit_label(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#491 - def visit_label_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#496 - def visit_lambda(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#504 - def visit_lambda_var(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#509 - def visit_lbrace(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#514 - def visit_lbracket(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#519 - def visit_lparen(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#524 - def visit_massign(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#529 - def visit_method_add_block(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#534 - def visit_mlhs(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#539 - def visit_mlhs_paren(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#544 - def visit_module(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#552 - def visit_mrhs(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#557 - def visit_next(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#812 - def visit_not(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#562 - def visit_op(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#567 - def visit_opassign(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#572 - def visit_params(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#588 - def visit_paren(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#593 - def visit_period(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#157 - def visit_pinned_begin(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#854 - def visit_pinned_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#598 - def visit_program(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#603 - def visit_qsymbols(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#611 - def visit_qsymbols_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#616 - def visit_qwords(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#624 - def visit_qwords_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#304 - def visit_range(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#211 - def visit_rassign(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#629 - def visit_rational(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#634 - def visit_rbrace(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#639 - def visit_rbracket(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#644 - def visit_redo(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#654 - def visit_regexp_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#649 - def visit_regexp_content(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#659 - def visit_regexp_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#664 - def visit_regexp_literal(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#674 - def visit_rescue(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#669 - def visit_rescue_ex(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#684 - def visit_rescue_mod(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#689 - def visit_rest_param(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#694 - def visit_retry(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#699 - def visit_return(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#704 - def visit_rparen(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#709 - def visit_sclass(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#714 - def visit_statements(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#724 - def visit_string_concat(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#719 - def visit_string_content(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#729 - def visit_string_dvar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#734 - def visit_string_embexpr(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#739 - def visit_string_literal(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#744 - def visit_super(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#749 - def visit_symbeg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#754 - def visit_symbol_content(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#759 - def visit_symbol_literal(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#764 - def visit_symbols(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#772 - def visit_symbols_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#777 - def visit_tlambda(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#782 - def visit_tlambeg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#787 - def visit_top_const_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#792 - def visit_top_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#797 - def visit_tstring_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#802 - def visit_tstring_content(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#807 - def visit_tstring_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#817 - def visit_unary(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#822 - def visit_undef(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#827 - def visit_unless(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#836 - def visit_until(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#844 - def visit_var_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#849 - def visit_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#859 - def visit_vcall(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#864 - def visit_void_stmt(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#869 - def visit_when(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#878 - def visit_while(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#886 - def visit_word(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#891 - def visit_words(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#899 - def visit_words_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#904 - def visit_xstring(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#909 - def visit_xstring_literal(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#914 - def visit_yield(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#919 - def visit_zsuper(node); end -end - -# Next represents using the +next+ keyword. -# -# next -# -# The +next+ keyword can also optionally be called with an argument: -# -# next value -# -# +next+ can even be called with multiple arguments, but only if parentheses -# are omitted, as in: -# -# next first, second, third -# -# If a single value is being given, parentheses can be used, as in: -# -# next(value) -# -# source://syntax_tree//lib/syntax_tree/node.rb#7933 -class SyntaxTree::Next < ::SyntaxTree::Node - # @return [Next] a new instance of Next - # - # source://syntax_tree//lib/syntax_tree/node.rb#7940 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7975 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7946 - def accept(visitor); end - - # [Args] the arguments passed to the next keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#7935 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7950 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7938 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7954 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7950 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7967 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7971 - def format(q); end -end - -# This is the parent node of all of the syntax tree nodes. It's pretty much -# exclusively here to make it easier to operate with the tree in cases where -# you're trying to monkey-patch or strictly type. -# -# source://syntax_tree//lib/syntax_tree/node.rb#105 -class SyntaxTree::Node - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#109 - def accept(visitor); end - - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#113 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#149 - def construct_keys; end - - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#117 - def deconstruct; end - - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#121 - def deconstruct_keys(keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#133 - def end_char; end - - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#125 - def format(q); end - - # [Location] the location of this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#107 - def location; end - - # source://syntax_tree//lib/syntax_tree/node.rb#137 - def pretty_print(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#129 - def start_char; end - - # source://syntax_tree//lib/syntax_tree/node.rb#141 - def to_json(*opts); end - - # source://syntax_tree//lib/syntax_tree/node.rb#145 - def to_mermaid; end -end - -# Not represents the unary +not+ method being called on an expression. -# -# not value -# -# source://syntax_tree//lib/syntax_tree/node.rb#11077 -class SyntaxTree::Not < ::SyntaxTree::Node - # @return [Not] a new instance of Not - # - # source://syntax_tree//lib/syntax_tree/node.rb#11088 - def initialize(statement:, parentheses:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11150 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11095 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11099 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11086 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11103 - def copy(statement: T.unsafe(nil), parentheses: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11099 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11117 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11126 - def format(q); end - - # [boolean] whether or not parentheses were used - # - # source://syntax_tree//lib/syntax_tree/node.rb#11082 - def parentheses; end - - # [boolean] whether or not parentheses were used - # - # source://syntax_tree//lib/syntax_tree/node.rb#11082 - def parentheses?; end - - # [nil | Node] the statement on which to operate - # - # source://syntax_tree//lib/syntax_tree/node.rb#11079 - def statement; end -end - -# Op represents an operator literal in the source. -# -# 1 + 2 -# -# In the example above, the Op node represents the + operator. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7985 -class SyntaxTree::Op < ::SyntaxTree::Node - # @return [Op] a new instance of Op - # - # source://syntax_tree//lib/syntax_tree/node.rb#7995 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8028 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8002 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8006 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7993 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8010 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8006 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8020 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8024 - def format(q); end - - # [Symbol] the symbol version of the value - # - # source://syntax_tree//lib/syntax_tree/node.rb#7990 - def name; end - - # [String] the operator - # - # source://syntax_tree//lib/syntax_tree/node.rb#7987 - def value; end -end - -# OpAssign represents assigning a value to a variable or constant using an -# operator like += or ||=. -# -# variable += value -# -# source://syntax_tree//lib/syntax_tree/node.rb#8038 -class SyntaxTree::OpAssign < ::SyntaxTree::Node - # @return [OpAssign] a new instance of OpAssign - # - # source://syntax_tree//lib/syntax_tree/node.rb#8052 - def initialize(target:, operator:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8111 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8060 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8064 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8050 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8068 - def copy(target: T.unsafe(nil), operator: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8064 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8083 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8093 - def format(q); end - - # [Op] the operator being used for the assignment - # - # source://syntax_tree//lib/syntax_tree/node.rb#8044 - def operator; end - - # [ARefField | ConstPathField | Field | TopConstField | VarField] the target - # to assign the result of the expression to - # - # source://syntax_tree//lib/syntax_tree/node.rb#8041 - def target; end - - # [Node] the expression to be assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#8047 - def value; end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#8118 - def skip_indent?; end -end - -# The list of nodes that represent patterns inside of pattern matching so that -# when a pattern is being printed it knows if it's nested. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6174 -SyntaxTree::PATTERNS = T.let(T.unsafe(nil), Array) - -# Params represents defining parameters on a method or lambda. -# -# def method(param) end -# -# source://syntax_tree//lib/syntax_tree/node.rb#8196 -class SyntaxTree::Params < ::SyntaxTree::Node - # @return [Params] a new instance of Params - # - # source://syntax_tree//lib/syntax_tree/node.rb#8298 - def initialize(location:, requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8428 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8328 - def accept(visitor); end - - # Returns a range representing the possible number of arguments accepted - # by this params node not including the block. For example: - # - # def foo(a, b = 1, c:, d: 2, &block) - # ... - # end - # - # has arity 2..4. - # - # source://syntax_tree//lib/syntax_tree/node.rb#8451 - def arity; end - - # [nil | BlockArg] the optional block parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8293 - def block; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8332 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8296 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8346 - def copy(location: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8332 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8374 - def deconstruct_keys(_keys); end - - # Params nodes are the most complicated in the tree. Occasionally you want - # to know if they are "empty", which means not having any parameters - # declared. This logic accesses every kind of parameter and determines if - # it's missing. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#8323 - def empty?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8388 - def format(q); end - - # [nil | :nil | ArgsForward | KwRestParam] the optional keyword rest - # parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8290 - def keyword_rest; end - - # [Array[ [ Label, nil | Node ] ]] any keyword parameters and their - # optional default values - # - # source://syntax_tree//lib/syntax_tree/node.rb#8286 - def keywords; end - - # [Array[ [ Ident, Node ] ]] any optional parameters and their default - # values - # - # source://syntax_tree//lib/syntax_tree/node.rb#8274 - def optionals; end - - # [Array[ Ident | MLHSParen ]] any positional parameters that exist after a - # rest parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8282 - def posts; end - - # [Array[ Ident | MLHSParen ]] any required parameters - # - # source://syntax_tree//lib/syntax_tree/node.rb#8270 - def requireds; end - - # [nil | ArgsForward | ExcessedComma | RestParam] the optional rest - # parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8278 - def rest; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#8467 - def format_contents(q, parts); end -end - -# Formats the keyword position of the parameters. This includes the label, -# as well as an optional default value. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8224 -class SyntaxTree::Params::KeywordFormatter - # @return [KeywordFormatter] a new instance of KeywordFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8231 - def initialize(name, value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8236 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8240 - def format(q); end - - # [Ident] the name of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8226 - def name; end - - # [nil | Node] the value of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8229 - def value; end -end - -# Formats the keyword_rest position of the parameters. This can be the **nil -# syntax, the ... syntax, or the ** syntax. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8252 -class SyntaxTree::Params::KeywordRestFormatter - # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8256 - def initialize(value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8260 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8264 - def format(q); end - - # [:nil | ArgsForward | KwRestParam] the value of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8254 - def value; end -end - -# Formats the optional position of the parameters. This includes the label, -# as well as the default value. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8199 -class SyntaxTree::Params::OptionalFormatter - # @return [OptionalFormatter] a new instance of OptionalFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8206 - def initialize(name, value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8211 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8215 - def format(q); end - - # [Ident] the name of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8201 - def name; end - - # [Node] the value of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8204 - def value; end -end - -# Paren represents using balanced parentheses in a couple places in a Ruby -# program. In general parentheses can be used anywhere a Ruby expression can -# be used. -# -# (1 + 2) -# -# source://syntax_tree//lib/syntax_tree/node.rb#8479 -class SyntaxTree::Paren < ::SyntaxTree::Node - # @return [Paren] a new instance of Paren - # - # source://syntax_tree//lib/syntax_tree/node.rb#8489 - def initialize(lparen:, contents:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8545 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8496 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8500 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8487 - def comments; end - - # [nil | Node] the expression inside the parentheses - # - # source://syntax_tree//lib/syntax_tree/node.rb#8484 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8504 - def copy(lparen: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8500 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8518 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8527 - def format(q); end - - # [LParen] the left parenthesis that opened this statement - # - # source://syntax_tree//lib/syntax_tree/node.rb#8481 - def lparen; end -end - -# If you have a modifier statement (for instance a modifier if statement or a -# modifier while loop) there are times when you need to wrap the entire -# statement in parentheses. This occurs when you have something like: -# -# foo[:foo] = -# if bar? -# baz -# end -# -# Normally we would shorten this to an inline version, which would result in: -# -# foo[:foo] = baz if bar? -# -# but this actually has different semantic meaning. The first example will -# result in a nil being inserted into the hash for the :foo key, whereas the -# second example will result in an empty hash because the if statement applies -# to the entire assignment. -# -# We can fix this in a couple of ways. We can use the then keyword, as in: -# -# foo[:foo] = if bar? then baz end -# -# But this isn't used very often. We can also just leave it as is with the -# multi-line version, but for a short predicate and short value it looks -# verbose. The last option and the one used here is to add parentheses on -# both sides of the expression, as in: -# -# foo[:foo] = (baz if bar?) -# -# This approach maintains the nice conciseness of the inline version, while -# keeping the correct semantic meaning. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8155 -module SyntaxTree::Parentheses - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#8175 - def break(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8167 - def flat(q); end - end -end - -# source://syntax_tree//lib/syntax_tree/node.rb#8156 -SyntaxTree::Parentheses::NODES = T.let(T.unsafe(nil), Array) - -# Parser is a subclass of the Ripper library that subscribes to the stream of -# tokens and nodes coming from the parser and builds up a syntax tree. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#6 -class SyntaxTree::Parser < ::Ripper - # @return [Parser] a new instance of Parser - # - # source://syntax_tree//lib/syntax_tree/parser.rb#116 - def initialize(source, *_arg1); end - - # [Array[ Comment | EmbDoc ]] the list of comments that have been found - # while parsing the source. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#114 - def comments; end - - # [Array[ SingleByteString | MultiByteString ]] the list of objects that - # represent the start of each line in character offsets - # - # source://syntax_tree//lib/syntax_tree/parser.rb#105 - def line_counts; end - - # [String] the source being parsed - # - # source://syntax_tree//lib/syntax_tree/parser.rb#101 - def source; end - - # [Array[ untyped ]] a running list of tokens that have been found in the - # source. This list changes a lot as certain nodes will "consume" these - # tokens to determine their bounds. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#110 - def tokens; end - - private - - # Attaches comments to the nodes in the tree that most closely correspond to - # the location of the comments. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2911 - def attach_comments(program, comments); end - - # This represents the current place in the source string that we've gotten - # to so far. We have a memoized line_counts object that we can use to get - # the number of characters that we've had to go through to get to the - # beginning of this line, then we add the number of columns into this line - # that we've gone through. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#197 - def char_pos; end - - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#295 - def consume_error(name, location); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#312 - def consume_keyword(name); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#318 - def consume_operator(name); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#300 - def consume_token(type); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#306 - def consume_tstring_end(location); end - - # This represents the current column we're in relative to the beginning of - # the current line. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#203 - def current_column; end - - # A helper function to find a :: operator. We do special handling instead of - # using find_token here because we don't pop off all of the :: operators so - # you could end up getting the wrong information if you have for instance - # ::X::Y::Z. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#328 - def find_colon2_before(const); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#272 - def find_keyword(name); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#277 - def find_keyword_between(name, left, right); end - - # Finds the next position in the source string that begins a statement. This - # is used to bind statements lists and make sure they don't include a - # preceding comment. For example, we want the following comment to be - # attached to the class node and not the statement node: - # - # ... - # end - # - # By finding the next non-space character, we can make sure that the bounds - # of the statement list are correct. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#349 - def find_next_statement_start(position); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#290 - def find_operator(name); end - - # As we build up a list of tokens, we'll periodically need to go backwards - # and find the ones that we've already hit in order to determine the - # location information for nodes that use them. For example, if you have a - # module node then you'll look backward for a kw token to determine your - # start location. - # - # This works with nesting since we're deleting tokens from the list once - # they've been used up. For example if you had nested module declarations - # then the innermost declaration would grab the last kw node that matches - # "module" (which would happen to be the innermost keyword). Then the outer - # one would only be able to grab the first one. In this way all of the - # tokens act as their own stack. - # - # If we're expecting to be able to find a token and consume it, but can't - # actually find it, then we need to raise an error. This is _usually_ caused - # by a syntax error in the source that we're printing. It could also be - # caused by accidentally attempting to consume a token twice by two - # different parser event handlers. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#254 - def find_token(type); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#259 - def find_token_between(type, left, right); end - - # Returns the current location that is being looked at for the parser for - # the purpose of locating the error. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#210 - def find_token_error(location); end - - # Ripper doesn't support capturing lambda local variables until 3.2. To - # mitigate this, we have to parse that code for ourselves. We use the range - # from the parentheses to find where we _should_ be looking. Then we check - # if the resulting tokens match a pattern that we determine means that the - # declaration has block-local variables. Once it does, we parse those out - # and convert them into Ident nodes. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2362 - def lambda_locals(source); end - - # Responsible for finding the nearest nodes to the given comment within the - # context of the given encapsulating node. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2946 - def nearest_nodes(node, comment); end - - # :call-seq: - # on_BEGIN: (Statements statements) -> BEGINBlock - # - # source://syntax_tree//lib/syntax_tree/parser.rb#371 - def on_BEGIN(statements); end - - # :call-seq: - # on_CHAR: (String value) -> CHAR - # - # source://syntax_tree//lib/syntax_tree/parser.rb#395 - def on_CHAR(value); end - - # :call-seq: - # on_END: (Statements statements) -> ENDBlock - # - # source://syntax_tree//lib/syntax_tree/parser.rb#410 - def on_END(statements); end - - # :call-seq: - # on___end__: (String value) -> EndContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#434 - def on___end__(value); end - - # :call-seq: - # on_alias: ( - # (DynaSymbol | SymbolLiteral) left, - # (DynaSymbol | SymbolLiteral) right - # ) -> AliasNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#453 - def on_alias(left, right); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_alias_error(error, *_arg1); end - - # :call-seq: - # on_aref: (untyped collection, (nil | Args) index) -> ARef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#465 - def on_aref(collection, index); end - - # :call-seq: - # on_aref_field: ( - # untyped collection, - # (nil | Args) index - # ) -> ARefField - # - # source://syntax_tree//lib/syntax_tree/parser.rb#481 - def on_aref_field(collection, index); end - - # :call-seq: - # on_arg_paren: ( - # (nil | Args | ArgsForward) arguments - # ) -> ArgParen - # - # source://syntax_tree//lib/syntax_tree/parser.rb#500 - def on_arg_paren(arguments); end - - # :call-seq: - # on_args_add: (Args arguments, untyped argument) -> Args - # - # source://syntax_tree//lib/syntax_tree/parser.rb#522 - def on_args_add(arguments, argument); end - - # :call-seq: - # on_args_add_block: ( - # Args arguments, - # (false | untyped) block - # ) -> Args - # - # source://syntax_tree//lib/syntax_tree/parser.rb#543 - def on_args_add_block(arguments, block); end - - # :call-seq: - # on_args_add_star: (Args arguments, untyped star) -> Args - # - # source://syntax_tree//lib/syntax_tree/parser.rb#581 - def on_args_add_star(arguments, argument); end - - # :call-seq: - # on_args_forward: () -> ArgsForward - # - # source://syntax_tree//lib/syntax_tree/parser.rb#603 - def on_args_forward; end - - # :call-seq: - # on_args_new: () -> Args - # - # source://syntax_tree//lib/syntax_tree/parser.rb#611 - def on_args_new; end - - # :call-seq: - # on_array: ((nil | Args) contents) -> - # ArrayLiteral | QSymbols | QWords | Symbols | Words - # - # source://syntax_tree//lib/syntax_tree/parser.rb#622 - def on_array(contents); end - - # :call-seq: - # on_aryptn: ( - # (nil | VarRef) constant, - # (nil | Array[untyped]) requireds, - # (nil | VarField) rest, - # (nil | Array[untyped]) posts - # ) -> AryPtn - # - # source://syntax_tree//lib/syntax_tree/parser.rb#701 - def on_aryptn(constant, requireds, rest, posts); end - - # :call-seq: - # on_assign: ( - # ( - # ARefField | - # ConstPathField | - # Field | - # TopConstField | - # VarField - # ) target, - # untyped value - # ) -> Assign - # - # source://syntax_tree//lib/syntax_tree/parser.rb#756 - def on_assign(target, value); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_assign_error(error, *_arg1); end - - # :call-seq: - # on_assoc_new: (untyped key, untyped value) -> Assoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#766 - def on_assoc_new(key, value); end - - # :call-seq: - # on_assoc_splat: (untyped value) -> AssocSplat - # - # source://syntax_tree//lib/syntax_tree/parser.rb#775 - def on_assoc_splat(value); end - - # :call-seq: - # on_backref: (String value) -> Backref - # - # source://syntax_tree//lib/syntax_tree/parser.rb#790 - def on_backref(value); end - - # :call-seq: - # on_backtick: (String value) -> Backtick - # - # source://syntax_tree//lib/syntax_tree/parser.rb#805 - def on_backtick(value); end - - # :call-seq: - # on_bare_assoc_hash: ( - # Array[AssocNew | AssocSplat] assocs - # ) -> BareAssocHash - # - # source://syntax_tree//lib/syntax_tree/parser.rb#826 - def on_bare_assoc_hash(assocs); end - - # :call-seq: - # on_begin: (untyped bodystmt) -> Begin | PinnedBegin - # - # source://syntax_tree//lib/syntax_tree/parser.rb#835 - def on_begin(bodystmt); end - - # :call-seq: - # on_binary: ( - # untyped left, - # (Op | Symbol) operator, - # untyped right - # ) -> Binary - # - # source://syntax_tree//lib/syntax_tree/parser.rb#874 - def on_binary(left, operator, right); end - - # :call-seq: - # on_block_var: (Params params, (nil | Array[Ident]) locals) -> BlockVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#906 - def on_block_var(params, locals); end - - # :call-seq: - # on_blockarg: (Ident name) -> BlockArg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#946 - def on_blockarg(name); end - - # :call-seq: - # on_bodystmt: ( - # Statements statements, - # (nil | Rescue) rescue_clause, - # (nil | Statements) else_clause, - # (nil | Ensure) ensure_clause - # ) -> BodyStmt - # - # source://syntax_tree//lib/syntax_tree/parser.rb#962 - def on_bodystmt(statements, rescue_clause, else_clause, ensure_clause); end - - # :call-seq: - # on_brace_block: ( - # (nil | BlockVar) block_var, - # Statements statements - # ) -> BlockNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#988 - def on_brace_block(block_var, statements); end - - # :call-seq: - # on_break: (Args arguments) -> Break - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1025 - def on_break(arguments); end - - # :call-seq: - # on_call: ( - # untyped receiver, - # (:"::" | Op | Period) operator, - # (:call | Backtick | Const | Ident | Op) message - # ) -> CallNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1040 - def on_call(receiver, operator, message); end - - # :call-seq: - # on_case: (untyped value, untyped consequent) -> Case | RAssign - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1061 - def on_case(value, consequent); end - - # :call-seq: - # on_class: ( - # (ConstPathRef | ConstRef | TopConstRef) constant, - # untyped superclass, - # BodyStmt bodystmt - # ) -> ClassDeclaration - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1096 - def on_class(constant, superclass, bodystmt); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_class_name_error(error, *_arg1); end - - # :call-seq: - # on_comma: (String value) -> Comma - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1120 - def on_comma(value); end - - # :call-seq: - # on_command: ((Const | Ident) message, Args arguments) -> Command - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1139 - def on_command(message, arguments); end - - # :call-seq: - # on_command_call: ( - # untyped receiver, - # (:"::" | Op | Period) operator, - # (Const | Ident | Op) message, - # (nil | Args) arguments - # ) -> CommandCall - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1155 - def on_command_call(receiver, operator, message, arguments); end - - # :call-seq: - # on_comment: (String value) -> Comment - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1170 - def on_comment(value); end - - # :call-seq: - # on_const: (String value) -> Const - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1208 - def on_const(value); end - - # :call-seq: - # on_const_path_field: (untyped parent, Const constant) -> - # ConstPathField | Field - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1224 - def on_const_path_field(parent, constant); end - - # :call-seq: - # on_const_path_ref: (untyped parent, Const constant) -> ConstPathRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1243 - def on_const_path_ref(parent, constant); end - - # :call-seq: - # on_const_ref: (Const constant) -> ConstRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1253 - def on_const_ref(constant); end - - # :call-seq: - # on_cvar: (String value) -> CVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1259 - def on_cvar(value); end - - # :call-seq: - # on_def: ( - # (Backtick | Const | Ident | Kw | Op) name, - # (nil | Params | Paren) params, - # untyped bodystmt - # ) -> DefNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1278 - def on_def(name, params, bodystmt); end - - # :call-seq: - # on_defined: (untyped value) -> Defined - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1346 - def on_defined(value); end - - # :call-seq: - # on_defs: ( - # untyped target, - # (Op | Period) operator, - # (Backtick | Const | Ident | Kw | Op) name, - # (Params | Paren) params, - # BodyStmt bodystmt - # ) -> DefNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1370 - def on_defs(target, operator, name, params, bodystmt); end - - # :call-seq: - # on_do_block: (BlockVar block_var, BodyStmt bodystmt) -> BlockNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1435 - def on_do_block(block_var, bodystmt); end - - # :call-seq: - # on_dot2: ((nil | untyped) left, (nil | untyped) right) -> RangeNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1459 - def on_dot2(left, right); end - - # :call-seq: - # on_dot3: ((nil | untyped) left, (nil | untyped) right) -> RangeNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1475 - def on_dot3(left, right); end - - # :call-seq: - # on_dyna_symbol: (StringContent string_content) -> DynaSymbol - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1491 - def on_dyna_symbol(string_content); end - - # :call-seq: - # on_else: (Statements statements) -> Else - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1517 - def on_else(statements); end - - # :call-seq: - # on_elsif: ( - # untyped predicate, - # Statements statements, - # (nil | Elsif | Else) consequent - # ) -> Elsif - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1558 - def on_elsif(predicate, statements, consequent); end - - # :call-seq: - # on_embdoc: (String value) -> EmbDoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1588 - def on_embdoc(value); end - - # :call-seq: - # on_embdoc_beg: (String value) -> EmbDoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1595 - def on_embdoc_beg(value); end - - # :call-seq: - # on_embdoc_end: (String value) -> EmbDoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1606 - def on_embdoc_end(value); end - - # :call-seq: - # on_embexpr_beg: (String value) -> EmbExprBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1630 - def on_embexpr_beg(value); end - - # :call-seq: - # on_embexpr_end: (String value) -> EmbExprEnd - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1649 - def on_embexpr_end(value); end - - # :call-seq: - # on_embvar: (String value) -> EmbVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1668 - def on_embvar(value); end - - # :call-seq: - # on_ensure: (Statements statements) -> Ensure - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1687 - def on_ensure(statements); end - - # The handler for this event accepts no parameters (though in previous - # versions of Ruby it accepted a string literal with a value of ","). - # - # :call-seq: - # on_excessed_comma: () -> ExcessedComma - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1714 - def on_excessed_comma(*_arg0); end - - # :call-seq: - # on_fcall: ((Const | Ident) value) -> CallNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1722 - def on_fcall(value); end - - # :call-seq: - # on_field: ( - # untyped parent, - # (:"::" | Op | Period) operator - # (Const | Ident) name - # ) -> Field - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1738 - def on_field(parent, operator, name); end - - # :call-seq: - # on_float: (String value) -> FloatLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1749 - def on_float(value); end - - # :call-seq: - # on_fndptn: ( - # (nil | untyped) constant, - # VarField left, - # Array[untyped] values, - # VarField right - # ) -> FndPtn - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1769 - def on_fndptn(constant, left, values, right); end - - # :call-seq: - # on_for: ( - # (MLHS | VarField) value, - # untyped collection, - # Statements statements - # ) -> For - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1821 - def on_for(index, collection, statements); end - - # :call-seq: - # on_gvar: (String value) -> GVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1859 - def on_gvar(value); end - - # :call-seq: - # on_hash: ((nil | Array[AssocNew | AssocSplat]) assocs) -> HashLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1874 - def on_hash(assocs); end - - # :call-seq: - # on_heredoc_beg: (String value) -> HeredocBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1887 - def on_heredoc_beg(value); end - - # :call-seq: - # on_heredoc_dedent: (StringContent string, Integer width) -> Heredoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1906 - def on_heredoc_dedent(string, width); end - - # :call-seq: - # on_heredoc_end: (String value) -> Heredoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1920 - def on_heredoc_end(value); end - - # :call-seq: - # on_hshptn: ( - # (nil | untyped) constant, - # Array[[Label | StringContent, untyped]] keywords, - # (nil | VarField) keyword_rest - # ) -> HshPtn - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1956 - def on_hshptn(constant, keywords, keyword_rest); end - - # :call-seq: - # on_ident: (String value) -> Ident - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2026 - def on_ident(value); end - - # :call-seq: - # on_if: ( - # untyped predicate, - # Statements statements, - # (nil | Elsif | Else) consequent - # ) -> IfNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2045 - def on_if(predicate, statements, consequent); end - - # :call-seq: - # on_if_mod: (untyped predicate, untyped statement) -> IfNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2085 - def on_if_mod(predicate, statement); end - - # :call-seq: - # on_ifop: (untyped predicate, untyped truthy, untyped falsy) -> IfOp - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2074 - def on_ifop(predicate, truthy, falsy); end - - # :call-seq: - # on_imaginary: (String value) -> Imaginary - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2107 - def on_imaginary(value); end - - # :call-seq: - # on_in: (RAssign pattern, nil statements, nil consequent) -> RAssign - # | ( - # untyped pattern, - # Statements statements, - # (nil | In | Else) consequent - # ) -> In - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2127 - def on_in(pattern, statements, consequent); end - - # :call-seq: - # on_int: (String value) -> Int - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2172 - def on_int(value); end - - # :call-seq: - # on_ivar: (String value) -> IVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2187 - def on_ivar(value); end - - # :call-seq: - # on_kw: (String value) -> Kw - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2202 - def on_kw(value); end - - # :call-seq: - # on_kwrest_param: ((nil | Ident) name) -> KwRestParam - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2221 - def on_kwrest_param(name); end - - # :call-seq: - # on_label: (String value) -> Label - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2230 - def on_label(value); end - - # :call-seq: - # on_label_end: (String value) -> LabelEnd - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2245 - def on_label_end(value); end - - # :call-seq: - # on_lambda: ( - # (Params | Paren) params, - # (BodyStmt | Statements) statements - # ) -> Lambda - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2267 - def on_lambda(params, statements); end - - # :call-seq: - # on_lambda_var: (Params params, Array[ Ident ] locals) -> LambdaVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2349 - def on_lambda_var(params, locals); end - - # :call-seq: - # on_lbrace: (String value) -> LBrace - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2432 - def on_lbrace(value); end - - # :call-seq: - # on_lbracket: (String value) -> LBracket - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2451 - def on_lbracket(value); end - - # :call-seq: - # on_lparen: (String value) -> LParen - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2470 - def on_lparen(value); end - - # :call-seq: - # on_massign: ((MLHS | MLHSParen) target, untyped value) -> MAssign - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2493 - def on_massign(target, value); end - - # :call-seq: - # on_method_add_arg: ( - # CallNode call, - # (ArgParen | Args) arguments - # ) -> CallNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2509 - def on_method_add_arg(call, arguments); end - - # :call-seq: - # on_method_add_block: ( - # (Break | Call | Command | CommandCall, Next) call, - # Block block - # ) -> Break | MethodAddBlock - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2527 - def on_method_add_block(call, block); end - - # :call-seq: - # on_mlhs_add: ( - # MLHS mlhs, - # (ARefField | Field | Ident | MLHSParen | VarField) part - # ) -> MLHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2556 - def on_mlhs_add(mlhs, part); end - - # :call-seq: - # on_mlhs_add_post: (MLHS left, MLHS right) -> MLHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2565 - def on_mlhs_add_post(left, right); end - - # :call-seq: - # on_mlhs_add_star: ( - # MLHS mlhs, - # (nil | ARefField | Field | Ident | VarField) part - # ) -> MLHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2577 - def on_mlhs_add_star(mlhs, part); end - - # :call-seq: - # on_mlhs_new: () -> MLHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2590 - def on_mlhs_new; end - - # :call-seq: - # on_mlhs_paren: ((MLHS | MLHSParen) contents) -> MLHSParen - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2600 - def on_mlhs_paren(contents); end - - # :call-seq: - # on_module: ( - # (ConstPathRef | ConstRef | TopConstRef) constant, - # BodyStmt bodystmt - # ) -> ModuleDeclaration - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2618 - def on_module(constant, bodystmt); end - - # :call-seq: - # on_mrhs_add: (MRHS mrhs, untyped part) -> MRHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2650 - def on_mrhs_add(mrhs, part); end - - # :call-seq: - # on_mrhs_add_star: (MRHS mrhs, untyped value) -> MRHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2659 - def on_mrhs_add_star(mrhs, value); end - - # :call-seq: - # on_mrhs_new: () -> MRHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2640 - def on_mrhs_new; end - - # :call-seq: - # on_mrhs_new_from_args: (Args arguments) -> MRHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2681 - def on_mrhs_new_from_args(arguments); end - - # :call-seq: - # on_next: (Args arguments) -> Next - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2687 - def on_next(arguments); end - - # :call-seq: - # on_op: (String value) -> Op - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2706 - def on_op(value); end - - # :call-seq: - # on_opassign: ( - # ( - # ARefField | - # ConstPathField | - # Field | - # TopConstField | - # VarField - # ) target, - # Op operator, - # untyped value - # ) -> OpAssign - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2735 - def on_opassign(target, operator, value); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_param_error(error, *_arg1); end - - # :call-seq: - # on_params: ( - # (nil | Array[Ident]) requireds, - # (nil | Array[[Ident, untyped]]) optionals, - # (nil | ArgsForward | ExcessedComma | RestParam) rest, - # (nil | Array[Ident]) posts, - # (nil | Array[[Ident, nil | untyped]]) keywords, - # (nil | :nil | ArgsForward | KwRestParam) keyword_rest, - # (nil | :& | BlockArg) block - # ) -> Params - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2758 - def on_params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end - - # :call-seq: - # on_paren: (untyped contents) -> Paren - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2823 - def on_paren(contents); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_parse_error(error, *_arg1); end - - # :call-seq: - # on_period: (String value) -> Period - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2873 - def on_period(value); end - - # :call-seq: - # on_program: (Statements statements) -> Program - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2888 - def on_program(statements); end - - # :call-seq: - # on_qsymbols_add: (QSymbols qsymbols, TStringContent element) -> QSymbols - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3000 - def on_qsymbols_add(qsymbols, element); end - - # :call-seq: - # on_qsymbols_beg: (String value) -> QSymbolsBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3010 - def on_qsymbols_beg(value); end - - # :call-seq: - # on_qsymbols_new: () -> QSymbols - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3029 - def on_qsymbols_new; end - - # :call-seq: - # on_qwords_add: (QWords qwords, TStringContent element) -> QWords - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3041 - def on_qwords_add(qwords, element); end - - # :call-seq: - # on_qwords_beg: (String value) -> QWordsBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3051 - def on_qwords_beg(value); end - - # :call-seq: - # on_qwords_new: () -> QWords - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3070 - def on_qwords_new; end - - # :call-seq: - # on_rational: (String value) -> RationalLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3082 - def on_rational(value); end - - # :call-seq: - # on_rbrace: (String value) -> RBrace - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3097 - def on_rbrace(value); end - - # :call-seq: - # on_rbracket: (String value) -> RBracket - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3116 - def on_rbracket(value); end - - # :call-seq: - # on_redo: () -> Redo - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3135 - def on_redo; end - - # :call-seq: - # on_regexp_add: ( - # RegexpContent regexp_content, - # (StringDVar | StringEmbExpr | TStringContent) part - # ) -> RegexpContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3146 - def on_regexp_add(regexp_content, part); end - - # :call-seq: - # on_regexp_beg: (String value) -> RegexpBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3156 - def on_regexp_beg(value); end - - # :call-seq: - # on_regexp_end: (String value) -> RegexpEnd - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3175 - def on_regexp_end(value); end - - # :call-seq: - # on_regexp_literal: ( - # RegexpContent regexp_content, - # (nil | RegexpEnd) ending - # ) -> RegexpLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3193 - def on_regexp_literal(regexp_content, ending); end - - # :call-seq: - # on_regexp_new: () -> RegexpContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3211 - def on_regexp_new; end - - # :call-seq: - # on_rescue: ( - # (nil | [untyped] | MRHS | MRHSAddStar) exceptions, - # (nil | Field | VarField) variable, - # Statements statements, - # (nil | Rescue) consequent - # ) -> Rescue - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3228 - def on_rescue(exceptions, variable, statements, consequent); end - - # :call-seq: - # on_rescue_mod: (untyped statement, untyped value) -> RescueMod - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3281 - def on_rescue_mod(statement, value); end - - # :call-seq: - # on_rest_param: ((nil | Ident) name) -> RestParam - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3293 - def on_rest_param(name); end - - # :call-seq: - # on_retry: () -> Retry - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3302 - def on_retry; end - - # :call-seq: - # on_return: (Args arguments) -> ReturnNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3310 - def on_return(arguments); end - - # :call-seq: - # on_return0: () -> ReturnNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3321 - def on_return0; end - - # :call-seq: - # on_rparen: (String value) -> RParen - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3329 - def on_rparen(value); end - - # :call-seq: - # on_sclass: (untyped target, BodyStmt bodystmt) -> SClass - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3348 - def on_sclass(target, bodystmt); end - - # :call-seq: - # on_semicolon: (String value) -> Semicolon - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3381 - def on_semicolon(value); end - - # stmts_add is a parser event that represents a single statement inside a - # list of statements within any lexical block. It accepts as arguments the - # parent stmts node as well as an stmt which can be any expression in - # Ruby. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3400 - def on_stmts_add(statements, statement); end - - # :call-seq: - # on_stmts_new: () -> Statements - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3413 - def on_stmts_new; end - - # :call-seq: - # on_string_add: ( - # String string, - # (StringEmbExpr | StringDVar | TStringContent) part - # ) -> StringContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3426 - def on_string_add(string, part); end - - # :call-seq: - # on_string_concat: ( - # (StringConcat | StringLiteral) left, - # StringLiteral right - # ) -> StringConcat - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3443 - def on_string_concat(left, right); end - - # :call-seq: - # on_string_content: () -> StringContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3453 - def on_string_content; end - - # :call-seq: - # on_string_dvar: ((Backref | VarRef) variable) -> StringDVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3463 - def on_string_dvar(variable); end - - # :call-seq: - # on_string_embexpr: (Statements statements) -> StringEmbExpr - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3474 - def on_string_embexpr(statements); end - - # :call-seq: - # on_string_literal: (String string) -> Heredoc | StringLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3504 - def on_string_literal(string); end - - # :call-seq: - # on_super: ((ArgParen | Args) arguments) -> Super - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3544 - def on_super(arguments); end - - # symbeg is a token that represents the beginning of a symbol literal. In - # most cases it will contain just ":" as in the value, but if its a dynamic - # symbol being defined it will contain ":'" or ":\"". - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3556 - def on_symbeg(value); end - - # :call-seq: - # on_symbol: ( - # (Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op) value - # ) -> SymbolContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3577 - def on_symbol(value); end - - # :call-seq: - # on_symbol_literal: ( - # ( - # Backtick | Const | CVar | GVar | Ident | - # IVar | Kw | Op | SymbolContent - # ) value - # ) -> SymbolLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3590 - def on_symbol_literal(value); end - - # :call-seq: - # on_symbols_add: (Symbols symbols, Word word) -> Symbols - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3606 - def on_symbols_add(symbols, word); end - - # :call-seq: - # on_symbols_beg: (String value) -> SymbolsBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3616 - def on_symbols_beg(value); end - - # :call-seq: - # on_symbols_new: () -> Symbols - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3635 - def on_symbols_new; end - - # :call-seq: - # on_tlambda: (String value) -> TLambda - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3647 - def on_tlambda(value); end - - # :call-seq: - # on_tlambeg: (String value) -> TLamBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3666 - def on_tlambeg(value); end - - # :call-seq: - # on_top_const_field: (Const constant) -> TopConstRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3685 - def on_top_const_field(constant); end - - # :call-seq: - # on_top_const_ref: (Const constant) -> TopConstRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3696 - def on_top_const_ref(constant); end - - # :call-seq: - # on_tstring_beg: (String value) -> TStringBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3707 - def on_tstring_beg(value); end - - # :call-seq: - # on_tstring_content: (String value) -> TStringContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3726 - def on_tstring_content(value); end - - # :call-seq: - # on_tstring_end: (String value) -> TStringEnd - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3741 - def on_tstring_end(value); end - - # :call-seq: - # on_unary: (:not operator, untyped statement) -> Not - # | (Symbol operator, untyped statement) -> Unary - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3761 - def on_unary(operator, statement); end - - # :call-seq: - # on_undef: (Array[DynaSymbol | SymbolLiteral] symbols) -> Undef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3804 - def on_undef(symbols); end - - # :call-seq: - # on_unless: ( - # untyped predicate, - # Statements statements, - # ((nil | Elsif | Else) consequent) - # ) -> UnlessNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3819 - def on_unless(predicate, statements, consequent); end - - # :call-seq: - # on_unless_mod: (untyped predicate, untyped statement) -> UnlessNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3848 - def on_unless_mod(predicate, statement); end - - # :call-seq: - # on_until: (untyped predicate, Statements statements) -> UntilNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3862 - def on_until(predicate, statements); end - - # :call-seq: - # on_until_mod: (untyped predicate, untyped statement) -> UntilNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3893 - def on_until_mod(predicate, statement); end - - # :call-seq: - # on_var_alias: (GVar left, (Backref | GVar) right) -> AliasNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3906 - def on_var_alias(left, right); end - - # :call-seq: - # on_var_field: ( - # (nil | Const | CVar | GVar | Ident | IVar) value - # ) -> VarField - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3920 - def on_var_field(value); end - - # :call-seq: - # on_var_ref: ((Const | CVar | GVar | Ident | IVar | Kw) value) -> VarRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3935 - def on_var_ref(value); end - - # :call-seq: - # on_vcall: (Ident ident) -> VCall - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3941 - def on_vcall(ident); end - - # :call-seq: - # on_void_stmt: () -> VoidStmt - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3947 - def on_void_stmt; end - - # :call-seq: - # on_when: ( - # Args arguments, - # Statements statements, - # (nil | Else | When) consequent - # ) -> When - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3960 - def on_when(arguments, statements, consequent); end - - # :call-seq: - # on_while: (untyped predicate, Statements statements) -> WhileNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3992 - def on_while(predicate, statements); end - - # :call-seq: - # on_while_mod: (untyped predicate, untyped statement) -> WhileNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4023 - def on_while_mod(predicate, statement); end - - # :call-seq: - # on_word_add: ( - # Word word, - # (StringEmbExpr | StringDVar | TStringContent) part - # ) -> Word - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4039 - def on_word_add(word, part); end - - # :call-seq: - # on_word_new: () -> Word - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4048 - def on_word_new; end - - # :call-seq: - # on_words_add: (Words words, Word word) -> Words - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4058 - def on_words_add(words, word); end - - # :call-seq: - # on_words_beg: (String value) -> WordsBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4068 - def on_words_beg(value); end - - # :call-seq: - # on_words_new: () -> Words - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4087 - def on_words_new; end - - # :call-seq: - # on_xstring_add: ( - # XString xstring, - # (StringEmbExpr | StringDVar | TStringContent) part - # ) -> XString - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4106 - def on_xstring_add(xstring, part); end - - # :call-seq: - # on_xstring_literal: (XString xstring) -> Heredoc | XStringLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4130 - def on_xstring_literal(xstring); end - - # :call-seq: - # on_xstring_new: () -> XString - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4115 - def on_xstring_new; end - - # :call-seq: - # on_yield: ((Args | Paren) arguments) -> YieldNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4153 - def on_yield(arguments); end - - # :call-seq: - # on_yield0: () -> YieldNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4164 - def on_yield0; end - - # :call-seq: - # on_zsuper: () -> ZSuper - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4172 - def on_zsuper; end -end - -# Represents a line in the source. If this class is being used, it means -# that there are characters in the string that are multi-byte, so we will -# build up an array of indices, such that array[byteindex] will be equal to -# the index of the character within the string. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#38 -class SyntaxTree::Parser::MultiByteString - # @return [MultiByteString] a new instance of MultiByteString - # - # source://syntax_tree//lib/syntax_tree/parser.rb#41 - def initialize(start, line); end - - # Technically it's possible for the column index to be a negative value if - # there's a BOM at the beginning of the file, which is the reason we need - # to compare it to 0 here. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#55 - def [](byteindex); end - - # Returns the value of attribute indices. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#39 - def indices; end - - # Returns the value of attribute start. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#39 - def start; end -end - -# A special parser error so that we can get nice syntax displays on the -# error message when prettier prints out the results. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#9 -class SyntaxTree::Parser::ParseError < ::StandardError - # @return [ParseError] a new instance of ParseError - # - # source://syntax_tree//lib/syntax_tree/parser.rb#12 - def initialize(error, lineno, column); end - - # Returns the value of attribute column. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#10 - def column; end - - # Returns the value of attribute lineno. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#10 - def lineno; end -end - -# Ugh... I really do not like this class. Basically, ripper doesn't provide -# enough information about where pins are located in the tree. It only gives -# events for ^ ops and var_ref nodes. You have to piece it together -# yourself. -# -# Note that there are edge cases here that we straight up do not address, -# because I honestly think it's going to be faster to write a new parser -# than to address them. For example, this will not work properly: -# -# foo in ^((bar = 0; bar; baz)) -# -# If someone actually does something like that, we'll have to find another -# way to make this work. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#656 -class SyntaxTree::Parser::PinVisitor < ::SyntaxTree::Visitor - # @return [PinVisitor] a new instance of PinVisitor - # - # source://syntax_tree//lib/syntax_tree/parser.rb#659 - def initialize(pins); end - - # Returns the value of attribute pins. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#657 - def pins; end - - # Returns the value of attribute stack. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#657 - def stack; end - - # source://syntax_tree//lib/syntax_tree/parser.rb#664 - def visit(node); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#672 - def visit_var_ref(node); end - - class << self - # source://syntax_tree//lib/syntax_tree/parser.rb#677 - def visit(node, tokens); end - end -end - -# Semicolons are tokens that get added to the token list but never get -# attached to the AST. Because of this they only need to track their -# associated location so they can be used for computing bounds. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#3371 -class SyntaxTree::Parser::Semicolon - # @return [Semicolon] a new instance of Semicolon - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3374 - def initialize(location); end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3372 - def location; end -end - -# Represents a line in the source. If this class is being used, it means -# that every character in the string is 1 byte in length, so we can just -# return the start of the line + the index. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#22 -class SyntaxTree::Parser::SingleByteString - # @return [SingleByteString] a new instance of SingleByteString - # - # source://syntax_tree//lib/syntax_tree/parser.rb#25 - def initialize(start); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#29 - def [](byteindex); end - - # Returns the value of attribute start. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#23 - def start; end -end - -# This represents all of the tokens coming back from the lexer. It is -# replacing a simple array because it keeps track of the last deleted token -# from the list for better error messages. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#63 -class SyntaxTree::Parser::TokenList - # @return [TokenList] a new instance of TokenList - # - # source://syntax_tree//lib/syntax_tree/parser.rb#66 - def initialize; end - - # source://syntax_tree//lib/syntax_tree/parser.rb#71 - def <<(token); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#75 - def [](index); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#79 - def any?(&block); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#91 - def delete(value); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#95 - def delete_at(index); end - - # Returns the value of attribute last_deleted. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#64 - def last_deleted; end - - # source://syntax_tree//lib/syntax_tree/parser.rb#83 - def reverse_each(&block); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#87 - def rindex(&block); end - - # Returns the value of attribute tokens. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#64 - def tokens; end -end - -# A pattern is an object that wraps a Ruby pattern matching expression. The -# expression would normally be passed to an `in` clause within a `case` -# expression or a rightward assignment expression. For example, in the -# following snippet: -# -# case node -# in Const[value: "SyntaxTree"] -# end -# -# the pattern is the `Const[value: "SyntaxTree"]` expression. Within Syntax -# Tree, every node generates these kinds of expressions using the -# #construct_keys method. -# -# The pattern gets compiled into an object that responds to call by running -# the #compile method. This method itself will run back through Syntax Tree to -# parse the expression into a tree, then walk the tree to generate the -# necessary callable objects. For example, if you wanted to compile the -# expression above into a callable, you would: -# -# callable = SyntaxTree::Pattern.new("Const[value: 'SyntaxTree']").compile -# callable.call(node) -# -# The callable object returned by #compile is guaranteed to respond to #call -# with a single argument, which is the node to match against. It also is -# guaranteed to respond to #===, which means it itself can be used in a `case` -# expression, as in: -# -# case node -# when callable -# end -# -# If the query given to the initializer cannot be compiled into a valid -# matcher (either because of a syntax error or because it is using syntax we -# do not yet support) then a SyntaxTree::Pattern::CompilationError will be -# raised. -# -# source://syntax_tree//lib/syntax_tree/pattern.rb#39 -class SyntaxTree::Pattern - # @return [Pattern] a new instance of Pattern - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#61 - def initialize(query); end - - # source://syntax_tree//lib/syntax_tree/pattern.rb#65 - def compile; end - - # Returns the value of attribute query. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#59 - def query; end - - private - - # Shortcut for combining two procs into one that returns true if both return - # true. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#80 - def combine_and(left, right); end - - # Shortcut for combining two procs into one that returns true if either - # returns true. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#86 - def combine_or(left, right); end - - # in [foo, bar, baz] - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#109 - def compile_aryptn(node); end - - # in foo | bar - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#134 - def compile_binary(node); end - - # in Ident - # in String - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#142 - def compile_const(node); end - - # in SyntaxTree::Ident - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#159 - def compile_const_path_ref(node); end - - # in :"" - # in :"foo" - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#172 - def compile_dyna_symbol(node); end - - # Raise an error because the given node is not supported. - # - # @raise [CompilationError] - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#91 - def compile_error(node); end - - # in Ident[value: String] - # in { value: String } - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#188 - def compile_hshptn(node); end - - # Compile any kind of node. Dispatch out to the individual compilation - # methods based on the type of node. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#260 - def compile_node(node); end - - # in /foo/ - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#214 - def compile_regexp_literal(node); end - - # in "" - # in "foo" - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#226 - def compile_string_literal(node); end - - # in :+ - # in :foo - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#238 - def compile_symbol_literal(node); end - - # in Foo - # in nil - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#246 - def compile_var_ref(node); end - - # There are a couple of nodes (string literals, dynamic symbols, and regexp) - # that contain list of parts. This can include plain string content, - # interpolated expressions, and interpolated variables. We only support - # plain string content, so this method will extract out the plain string - # content if it is the only element in the list. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#100 - def extract_string(node); end -end - -# Raised when the query given to a pattern is either invalid Ruby syntax or -# is using syntax that we don't yet support. -# -# source://syntax_tree//lib/syntax_tree/pattern.rb#42 -class SyntaxTree::Pattern::CompilationError < ::StandardError - # @return [CompilationError] a new instance of CompilationError - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#43 - def initialize(repr); end -end - -# Period represents the use of the +.+ operator. It is usually found in method -# calls. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8553 -class SyntaxTree::Period < ::SyntaxTree::Node - # @return [Period] a new instance of Period - # - # source://syntax_tree//lib/syntax_tree/node.rb#8560 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8595 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8566 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8570 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8558 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8574 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8570 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8587 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8591 - def format(q); end - - # [String] the period - # - # source://syntax_tree//lib/syntax_tree/node.rb#8555 - def value; end -end - -# PinnedBegin represents a pinning a nested statement within pattern matching. -# -# case value -# in ^(statement) -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#1962 -class SyntaxTree::PinnedBegin < ::SyntaxTree::Node - # @return [PinnedBegin] a new instance of PinnedBegin - # - # source://syntax_tree//lib/syntax_tree/node.rb#1969 - def initialize(statement:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2014 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1975 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1979 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1967 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1983 - def copy(statement: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1979 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1996 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2000 - def format(q); end - - # [Node] the expression being pinned - # - # source://syntax_tree//lib/syntax_tree/node.rb#1964 - def statement; end -end - -# PinnedVarRef represents a pinned variable reference within a pattern -# matching pattern. -# -# case value -# in ^variable -# end -# -# This can be a plain local variable like the example above. It can also be a -# a class variable, a global variable, or an instance variable. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11661 -class SyntaxTree::PinnedVarRef < ::SyntaxTree::Node - # @return [PinnedVarRef] a new instance of PinnedVarRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#11668 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11706 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11674 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11678 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11666 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11682 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11678 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11695 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11699 - def format(q); end - - # [Const | CVar | GVar | Ident | IVar] the value of this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11663 - def value; end -end - -# This visitor pretty-prints the AST into an equivalent s-expression. -# -# source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#5 -class SyntaxTree::PrettyPrintVisitor < ::SyntaxTree::FieldVisitor - # @return [PrettyPrintVisitor] a new instance of PrettyPrintVisitor - # - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#8 - def initialize(q); end - - # Returns the value of attribute q. - # - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#6 - def q; end - - # This is here because we need to make sure the operator is cast to a string - # before we print it out. - # - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#14 - def visit_binary(node); end - - # This is here to make it a little nicer to look at labels since they - # typically have their : at the end of the value. - # - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#25 - def visit_label(node); end - - private - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#36 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#45 - def field(_name, value); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#50 - def list(_name, values); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#55 - def node(_node, type); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#62 - def pairs(_name, values); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#78 - def text(_name, value); end -end - -# Program represents the overall syntax tree. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8601 -class SyntaxTree::Program < ::SyntaxTree::Node - # @return [Program] a new instance of Program - # - # source://syntax_tree//lib/syntax_tree/node.rb#8608 - def initialize(statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8648 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8614 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8618 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8606 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8622 - def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8618 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8635 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8639 - def format(q); end - - # [Statements] the top-level expressions of the program - # - # source://syntax_tree//lib/syntax_tree/node.rb#8603 - def statements; end -end - -# QSymbols represents a symbol literal array without interpolation. -# -# %i[one two three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#8657 -class SyntaxTree::QSymbols < ::SyntaxTree::Node - # @return [QSymbols] a new instance of QSymbols - # - # source://syntax_tree//lib/syntax_tree/node.rb#8667 - def initialize(beginning:, elements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8727 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8674 - def accept(visitor); end - - # [QSymbolsBeg] the token that opens this array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8659 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8678 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8665 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8682 - def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8678 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8696 - def deconstruct_keys(_keys); end - - # [Array[ TStringContent ]] the elements of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#8662 - def elements; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8705 - def format(q); end -end - -# QSymbolsBeg represents the beginning of a symbol literal array. -# -# %i[one two three] -# -# In the snippet above, QSymbolsBeg represents the "%i[" token. Note that -# these kinds of arrays can start with a lot of different delimiter types -# (e.g., %i| or %i<). -# -# source://syntax_tree//lib/syntax_tree/node.rb#8740 -class SyntaxTree::QSymbolsBeg < ::SyntaxTree::Node - # @return [QSymbolsBeg] a new instance of QSymbolsBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#8744 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8770 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8749 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8753 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8757 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8753 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8766 - def deconstruct_keys(_keys); end - - # [String] the beginning of the array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8742 - def value; end -end - -# QWords represents a string literal array without interpolation. -# -# %w[one two three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#8779 -class SyntaxTree::QWords < ::SyntaxTree::Node - # @return [QWords] a new instance of QWords - # - # source://syntax_tree//lib/syntax_tree/node.rb#8789 - def initialize(beginning:, elements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8845 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8796 - def accept(visitor); end - - # [QWordsBeg] the token that opens this array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8781 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8800 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8787 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8804 - def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8800 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8814 - def deconstruct_keys(_keys); end - - # [Array[ TStringContent ]] the elements of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#8784 - def elements; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8823 - def format(q); end -end - -# QWordsBeg represents the beginning of a string literal array. -# -# %w[one two three] -# -# In the snippet above, QWordsBeg represents the "%w[" token. Note that these -# kinds of arrays can start with a lot of different delimiter types (e.g., -# %w| or %w<). -# -# source://syntax_tree//lib/syntax_tree/node.rb#8858 -class SyntaxTree::QWordsBeg < ::SyntaxTree::Node - # @return [QWordsBeg] a new instance of QWordsBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#8862 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8888 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8867 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8871 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8875 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8871 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8884 - def deconstruct_keys(_keys); end - - # [String] the beginning of the array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8860 - def value; end -end - -# Responsible for providing information about quotes to be used for strings -# and dynamic symbols. -# -# source://syntax_tree//lib/syntax_tree/node.rb#4615 -module SyntaxTree::Quotes - class << self - # If there is some part of this string that matches an escape sequence or - # that contains the interpolation pattern ("#{"), then we are locked into - # whichever quote the user chose. (If they chose single quotes, then double - # quoting would activate the escape sequence, and if they chose double - # quotes, then single quotes would deactivate it.) - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4624 - def locked?(node, quote); end - - # Find the matching closing quote for the given opening quote. - # - # source://syntax_tree//lib/syntax_tree/node.rb#4631 - def matching(quote); end - - # Escape and unescape single and double quotes as needed to be able to - # enclose +content+ with +enclosing+. - # - # source://syntax_tree//lib/syntax_tree/node.rb#4637 - def normalize(content, enclosing); end - end -end - -# The matching pairs of quotes that can be used with % literals. -# -# source://syntax_tree//lib/syntax_tree/node.rb#4617 -SyntaxTree::Quotes::PAIRS = T.let(T.unsafe(nil), Hash) - -# RAssign represents a single-line pattern match. -# -# value in pattern -# value => pattern -# -# source://syntax_tree//lib/syntax_tree/node.rb#3201 -class SyntaxTree::RAssign < ::SyntaxTree::Node - # @return [RAssign] a new instance of RAssign - # - # source://syntax_tree//lib/syntax_tree/node.rb#3215 - def initialize(value:, operator:, pattern:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3277 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3223 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3227 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3213 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3231 - def copy(value: T.unsafe(nil), operator: T.unsafe(nil), pattern: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3227 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3246 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3256 - def format(q); end - - # [Kw | Op] the operator being used to match against the pattern, which is - # either => or in - # - # source://syntax_tree//lib/syntax_tree/node.rb#3207 - def operator; end - - # [Node] the pattern on the right-hand side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#3210 - def pattern; end - - # [Node] the left-hand expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#3203 - def value; end -end - -# RBrace represents the use of a right brace, i.e., +++. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8945 -class SyntaxTree::RBrace < ::SyntaxTree::Node - # @return [RBrace] a new instance of RBrace - # - # source://syntax_tree//lib/syntax_tree/node.rb#8949 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8975 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8954 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8958 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8962 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8958 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8971 - def deconstruct_keys(_keys); end - - # [String] the right brace - # - # source://syntax_tree//lib/syntax_tree/node.rb#8947 - def value; end -end - -# RBracket represents the use of a right bracket, i.e., +]+. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8981 -class SyntaxTree::RBracket < ::SyntaxTree::Node - # @return [RBracket] a new instance of RBracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#8985 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9011 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8990 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8994 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8998 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8994 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9007 - def deconstruct_keys(_keys); end - - # [String] the right bracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#8983 - def value; end -end - -# RParen represents the use of a right parenthesis, i.e., +)+. -# -# source://syntax_tree//lib/syntax_tree/node.rb#9751 -class SyntaxTree::RParen < ::SyntaxTree::Node - # @return [RParen] a new instance of RParen - # - # source://syntax_tree//lib/syntax_tree/node.rb#9755 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9781 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9760 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9764 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9768 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9764 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9777 - def deconstruct_keys(_keys); end - - # [String] the parenthesis - # - # source://syntax_tree//lib/syntax_tree/node.rb#9753 - def value; end -end - -# RangeNode represents using the .. or the ... operator between two -# expressions. Usually this is to create a range object. -# -# 1..2 -# -# Sometimes this operator is used to create a flip-flop. -# -# if value == 5 .. value == 10 -# end -# -# One of the sides of the expression may be nil, but not both. -# -# source://syntax_tree//lib/syntax_tree/node.rb#4540 -class SyntaxTree::RangeNode < ::SyntaxTree::Node - # @return [RangeNode] a new instance of RangeNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#4553 - def initialize(left:, operator:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4607 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4561 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4565 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4551 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4569 - def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4565 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4584 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4594 - def format(q); end - - # [nil | Node] the left side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#4542 - def left; end - - # [Op] the operator used for this range - # - # source://syntax_tree//lib/syntax_tree/node.rb#4545 - def operator; end - - # [nil | Node] the right side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#4548 - def right; end -end - -# RationalLiteral represents the use of a rational number literal. -# -# 1r -# -# source://syntax_tree//lib/syntax_tree/node.rb#8897 -class SyntaxTree::RationalLiteral < ::SyntaxTree::Node - # @return [RationalLiteral] a new instance of RationalLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#8904 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8939 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8910 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8914 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8902 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8918 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8914 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8931 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8935 - def format(q); end - - # [String] the rational number literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8899 - def value; end -end - -# Redo represents the use of the +redo+ keyword. -# -# redo -# -# source://syntax_tree//lib/syntax_tree/node.rb#9020 -class SyntaxTree::Redo < ::SyntaxTree::Node - # @return [Redo] a new instance of Redo - # - # source://syntax_tree//lib/syntax_tree/node.rb#9024 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9054 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9029 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9033 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9022 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9037 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9033 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9046 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9050 - def format(q); end -end - -# RegexpBeg represents the start of a regular expression literal. -# -# /.+/ -# -# In the example above, RegexpBeg represents the first / token. Regular -# expression literals can also be declared using the %r syntax, as in: -# -# %r{.+} -# -# source://syntax_tree//lib/syntax_tree/node.rb#9116 -class SyntaxTree::RegexpBeg < ::SyntaxTree::Node - # @return [RegexpBeg] a new instance of RegexpBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#9120 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9146 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9125 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9129 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9133 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9129 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9142 - def deconstruct_keys(_keys); end - - # [String] the beginning of the regular expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#9118 - def value; end -end - -# RegexpContent represents the body of a regular expression. -# -# /.+ #{pattern} .+/ -# -# In the example above, a RegexpContent node represents everything contained -# within the forward slashes. -# -# source://syntax_tree//lib/syntax_tree/node.rb#9065 -class SyntaxTree::RegexpContent < ::SyntaxTree::Node - # @return [RegexpContent] a new instance of RegexpContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#9073 - def initialize(beginning:, parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9101 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9079 - def accept(visitor); end - - # [String] the opening of the regular expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#9067 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9083 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9087 - def copy(beginning: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9083 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9097 - def deconstruct_keys(_keys); end - - # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the - # regular expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#9071 - def parts; end -end - -# RegexpEnd represents the end of a regular expression literal. -# -# /.+/m -# -# In the example above, the RegexpEnd event represents the /m at the end of -# the regular expression literal. You can also declare regular expression -# literals using %r, as in: -# -# %r{.+}m -# -# source://syntax_tree//lib/syntax_tree/node.rb#9161 -class SyntaxTree::RegexpEnd < ::SyntaxTree::Node - # @return [RegexpEnd] a new instance of RegexpEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#9165 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9191 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9170 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9174 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9178 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9174 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9187 - def deconstruct_keys(_keys); end - - # [String] the end of the regular expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#9163 - def value; end -end - -# RegexpLiteral represents a regular expression literal. -# -# /.+/ -# -# source://syntax_tree//lib/syntax_tree/node.rb#9200 -class SyntaxTree::RegexpLiteral < ::SyntaxTree::Node - # @return [RegexpLiteral] a new instance of RegexpLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#9214 - def initialize(beginning:, ending:, parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9296 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9222 - def accept(visitor); end - - # [String] the beginning of the regular expression literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#9202 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9226 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9212 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9230 - def copy(beginning: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9226 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9245 - def deconstruct_keys(_keys); end - - # [String] the ending of the regular expression literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#9205 - def ending; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9256 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9302 - def options; end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # regular expression literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#9209 - def parts; end - - private - - # If the first part of this regex is plain string content, we have a space - # or an =, and we're contained within a command or command_call node, then - # we want to use braces because otherwise we could end up with an ambiguous - # operator, e.g. foo / bar/ or foo /=bar/ - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#9318 - def ambiguous?(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#9308 - def include?(pattern); end -end - -# Rescue represents the use of the rescue keyword inside of a BodyStmt node. -# -# begin -# rescue -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#9408 -class SyntaxTree::Rescue < ::SyntaxTree::Node - # @return [Rescue] a new instance of Rescue - # - # source://syntax_tree//lib/syntax_tree/node.rb#9424 - def initialize(keyword:, exception:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9520 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9455 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9433 - def bind_end(end_char, end_column); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9459 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9422 - def comments; end - - # [nil | Rescue] the optional next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#9419 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9463 - def copy(keyword: T.unsafe(nil), exception: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9459 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9485 - def deconstruct_keys(_keys); end - - # [nil | RescueEx] the exceptions being rescued - # - # source://syntax_tree//lib/syntax_tree/node.rb#9413 - def exception; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9496 - def format(q); end - - # [Kw] the rescue keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#9410 - def keyword; end - - # [Statements] the expressions to evaluate when an error is rescued - # - # source://syntax_tree//lib/syntax_tree/node.rb#9416 - def statements; end -end - -# RescueEx represents the list of exceptions being rescued in a rescue clause. -# -# begin -# rescue Exception => exception -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#9333 -class SyntaxTree::RescueEx < ::SyntaxTree::Node - # @return [RescueEx] a new instance of RescueEx - # - # source://syntax_tree//lib/syntax_tree/node.rb#9344 - def initialize(exceptions:, variable:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9396 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9351 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9355 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9342 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9359 - def copy(exceptions: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9355 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9373 - def deconstruct_keys(_keys); end - - # [nil | Node] the list of exceptions being rescued - # - # source://syntax_tree//lib/syntax_tree/node.rb#9335 - def exceptions; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9382 - def format(q); end - - # [nil | Field | VarField] the expression being used to capture the raised - # exception - # - # source://syntax_tree//lib/syntax_tree/node.rb#9339 - def variable; end -end - -# RescueMod represents the use of the modifier form of a +rescue+ clause. -# -# expression rescue value -# -# source://syntax_tree//lib/syntax_tree/node.rb#9531 -class SyntaxTree::RescueMod < ::SyntaxTree::Node - # @return [RescueMod] a new instance of RescueMod - # - # source://syntax_tree//lib/syntax_tree/node.rb#9541 - def initialize(statement:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9597 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9548 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9552 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9539 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9556 - def copy(statement: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9552 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9570 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9579 - def format(q); end - - # [Node] the expression to execute - # - # source://syntax_tree//lib/syntax_tree/node.rb#9533 - def statement; end - - # [Node] the value to use if the executed expression raises an error - # - # source://syntax_tree//lib/syntax_tree/node.rb#9536 - def value; end -end - -# RestParam represents defining a parameter in a method definition that -# accepts all remaining positional parameters. -# -# def method(*rest) end -# -# source://syntax_tree//lib/syntax_tree/node.rb#9608 -class SyntaxTree::RestParam < ::SyntaxTree::Node - # @return [RestParam] a new instance of RestParam - # - # source://syntax_tree//lib/syntax_tree/node.rb#9615 - def initialize(name:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9651 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9621 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9625 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9613 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9629 - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9625 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9642 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9646 - def format(q); end - - # [nil | Ident] the name of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#9610 - def name; end -end - -# Retry represents the use of the +retry+ keyword. -# -# retry -# -# source://syntax_tree//lib/syntax_tree/node.rb#9660 -class SyntaxTree::Retry < ::SyntaxTree::Node - # @return [Retry] a new instance of Retry - # - # source://syntax_tree//lib/syntax_tree/node.rb#9664 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9694 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9669 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9673 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9662 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9677 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9673 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9686 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9690 - def format(q); end -end - -# Return represents using the +return+ keyword with arguments. -# -# return value -# -# source://syntax_tree//lib/syntax_tree/node.rb#9703 -class SyntaxTree::ReturnNode < ::SyntaxTree::Node - # @return [ReturnNode] a new instance of ReturnNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#9710 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9745 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9716 - def accept(visitor); end - - # [nil | Args] the arguments being passed to the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#9705 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9720 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9708 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9724 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9720 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9737 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9741 - def format(q); end -end - -# SClass represents a block of statements that should be evaluated within the -# context of the singleton class of an object. It's frequently used to define -# singleton methods. -# -# class << self -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#9793 -class SyntaxTree::SClass < ::SyntaxTree::Node - # @return [SClass] a new instance of SClass - # - # source://syntax_tree//lib/syntax_tree/node.rb#9803 - def initialize(target:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9854 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9810 - def accept(visitor); end - - # [BodyStmt] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#9798 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9814 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9801 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9818 - def copy(target: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9814 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9832 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9841 - def format(q); end - - # [Node] the target of the singleton class to enter - # - # source://syntax_tree//lib/syntax_tree/node.rb#9795 - def target; end -end - -# Provides an interface for searching for a pattern of nodes against a -# subtree of an AST. -# -# source://syntax_tree//lib/syntax_tree/search.rb#6 -class SyntaxTree::Search - # @return [Search] a new instance of Search - # - # source://syntax_tree//lib/syntax_tree/search.rb#9 - def initialize(pattern); end - - # Returns the value of attribute pattern. - # - # source://syntax_tree//lib/syntax_tree/search.rb#7 - def pattern; end - - # source://syntax_tree//lib/syntax_tree/search.rb#13 - def scan(root); end -end - -# Everything that has a block of code inside of it has a list of statements. -# Normally we would just track those as a node that has an array body, but we -# have some special handling in order to handle empty statement lists. They -# need to have the right location information, so all of the parent node of -# stmts nodes will report back down the location information. We then -# propagate that onto void_stmt nodes inside the stmts in order to make sure -# all comments get printed appropriately. -# -# source://syntax_tree//lib/syntax_tree/node.rb#9867 -class SyntaxTree::Statements < ::SyntaxTree::Node - # @return [Statements] a new instance of Statements - # - # source://syntax_tree//lib/syntax_tree/node.rb#9874 - def initialize(body:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10000 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9927 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9880 - def bind(parser, start_char, start_column, end_char, end_column); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9909 - def bind_end(end_char, end_column); end - - # [Array[ Node ]] the list of expressions contained within this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9869 - def body; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9931 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9872 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9935 - def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9931 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9948 - def deconstruct_keys(_keys); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#9921 - def empty?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9952 - def format(q); end - - private - - # As efficiently as possible, gather up all of the comments that have been - # found while this statements list was being parsed and add them into the - # body. - # - # source://syntax_tree//lib/syntax_tree/node.rb#10009 - def attach_comments(parser, start_char, end_char); end -end - -# StringConcat represents concatenating two strings together using a backward -# slash. -# -# "first" \ -# "second" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10124 -class SyntaxTree::StringConcat < ::SyntaxTree::Node - # @return [StringConcat] a new instance of StringConcat - # - # source://syntax_tree//lib/syntax_tree/node.rb#10135 - def initialize(left:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10179 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10142 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10146 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10133 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10150 - def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10146 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10164 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10168 - def format(q); end - - # [Heredoc | StringConcat | StringLiteral] the left side of the - # concatenation - # - # source://syntax_tree//lib/syntax_tree/node.rb#10127 - def left; end - - # [StringLiteral] the right side of the concatenation - # - # source://syntax_tree//lib/syntax_tree/node.rb#10130 - def right; end -end - -# StringContent represents the contents of a string-like value. -# -# "string" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10051 -class SyntaxTree::StringContent < ::SyntaxTree::Node - # @return [StringContent] a new instance of StringContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#10059 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10086 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10065 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10069 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10057 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10073 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10069 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10082 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10090 - def format(q); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # string - # - # source://syntax_tree//lib/syntax_tree/node.rb#10054 - def parts; end -end - -# StringDVar represents shorthand interpolation of a variable into a string. -# It allows you to take an instance variable, class variable, or global -# variable and omit the braces when interpolating. -# -# "#@variable" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10190 -class SyntaxTree::StringDVar < ::SyntaxTree::Node - # @return [StringDVar] a new instance of StringDVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#10197 - def initialize(variable:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10234 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10203 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10207 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10195 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10211 - def copy(variable: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10207 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10224 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10228 - def format(q); end - - # [Backref | VarRef] the variable being interpolated - # - # source://syntax_tree//lib/syntax_tree/node.rb#10192 - def variable; end -end - -# StringEmbExpr represents interpolated content. It can be contained within a -# couple of different parent nodes, including regular expressions, strings, -# and dynamic symbols. -# -# "string #{expression}" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10245 -class SyntaxTree::StringEmbExpr < ::SyntaxTree::Node - # @return [StringEmbExpr] a new instance of StringEmbExpr - # - # source://syntax_tree//lib/syntax_tree/node.rb#10252 - def initialize(statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10309 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10258 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10262 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10250 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10266 - def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10262 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10279 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10283 - def format(q); end - - # [Statements] the expressions to be interpolated - # - # source://syntax_tree//lib/syntax_tree/node.rb#10247 - def statements; end -end - -# StringLiteral represents a string literal. -# -# "string" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10318 -class SyntaxTree::StringLiteral < ::SyntaxTree::Node - # @return [StringLiteral] a new instance of StringLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#10329 - def initialize(parts:, quote:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10403 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10336 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10340 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10327 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10344 - def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10340 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10358 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10362 - def format(q); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # string literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10321 - def parts; end - - # [nil | String] which quote was used by the string literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10324 - def quote; end -end - -# Super represents using the +super+ keyword with arguments. It can optionally -# use parentheses. -# -# super(value) -# -# source://syntax_tree//lib/syntax_tree/node.rb#10414 -class SyntaxTree::Super < ::SyntaxTree::Node - # @return [Super] a new instance of Super - # - # source://syntax_tree//lib/syntax_tree/node.rb#10421 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10465 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10427 - def accept(visitor); end - - # [ArgParen | Args] the arguments to the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#10416 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10431 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10419 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10435 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10431 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10448 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10452 - def format(q); end -end - -# SymBeg represents the beginning of a symbol literal. -# -# :symbol -# -# SymBeg is also used for dynamic symbols, as in: -# -# :"symbol" -# -# Finally, SymBeg is also used for symbols using the %s syntax, as in: -# -# %s[symbol] -# -# The value of this node is a string. In most cases (as in the first example -# above) it will contain just ":". In the case of dynamic symbols it will -# contain ":'" or ":\"". In the case of %s symbols, it will contain the start -# of the symbol including the %s and the delimiter. -# -# source://syntax_tree//lib/syntax_tree/node.rb#10486 -class SyntaxTree::SymBeg < ::SyntaxTree::Node - # @return [SymBeg] a new instance of SymBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#10490 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10516 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10495 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10499 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10503 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10499 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10512 - def deconstruct_keys(_keys); end - - # [String] the beginning of the symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#10488 - def value; end -end - -# SymbolContent represents symbol contents and is always the child of a -# SymbolLiteral node. -# -# :symbol -# -# source://syntax_tree//lib/syntax_tree/node.rb#10526 -class SyntaxTree::SymbolContent < ::SyntaxTree::Node - # @return [SymbolContent] a new instance of SymbolContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#10531 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10557 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10536 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10540 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10544 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10540 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10553 - def deconstruct_keys(_keys); end - - # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op] the value of the - # symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#10529 - def value; end -end - -# SymbolLiteral represents a symbol in the system with no interpolation -# (as opposed to a DynaSymbol which has interpolation). -# -# :symbol -# -# source://syntax_tree//lib/syntax_tree/node.rb#10567 -class SyntaxTree::SymbolLiteral < ::SyntaxTree::Node - # @return [SymbolLiteral] a new instance of SymbolLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#10575 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10612 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10581 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10585 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10573 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10589 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10585 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10602 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10606 - def format(q); end - - # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op | TStringContent] - # the value of the symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#10570 - def value; end -end - -# Symbols represents a symbol array literal with interpolation. -# -# %I[one two three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#10621 -class SyntaxTree::Symbols < ::SyntaxTree::Node - # @return [Symbols] a new instance of Symbols - # - # source://syntax_tree//lib/syntax_tree/node.rb#10631 - def initialize(beginning:, elements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10687 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10638 - def accept(visitor); end - - # [SymbolsBeg] the token that opens this array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10623 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10642 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10629 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10646 - def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10642 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10656 - def deconstruct_keys(_keys); end - - # [Array[ Word ]] the words in the symbol array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10626 - def elements; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10665 - def format(q); end -end - -# SymbolsBeg represents the start of a symbol array literal with -# interpolation. -# -# %I[one two three] -# -# In the snippet above, SymbolsBeg represents the "%I[" token. Note that these -# kinds of arrays can start with a lot of different delimiter types -# (e.g., %I| or %I<). -# -# source://syntax_tree//lib/syntax_tree/node.rb#10701 -class SyntaxTree::SymbolsBeg < ::SyntaxTree::Node - # @return [SymbolsBeg] a new instance of SymbolsBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#10705 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10731 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10710 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10714 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10718 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10714 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10727 - def deconstruct_keys(_keys); end - - # [String] the beginning of the symbol literal array - # - # source://syntax_tree//lib/syntax_tree/node.rb#10703 - def value; end -end - -# TLamBeg represents the beginning of the body of a lambda literal using -# braces. -# -# -> { value } -# -# In the example above the TLamBeg represents the +{+ operator. -# -# source://syntax_tree//lib/syntax_tree/node.rb#10782 -class SyntaxTree::TLamBeg < ::SyntaxTree::Node - # @return [TLamBeg] a new instance of TLamBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#10786 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10812 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10791 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10795 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10799 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10795 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10808 - def deconstruct_keys(_keys); end - - # [String] the beginning of the body of the lambda literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10784 - def value; end -end - -# TLambda represents the beginning of a lambda literal. -# -# -> { value } -# -# In the example above the TLambda represents the +->+ operator. -# -# source://syntax_tree//lib/syntax_tree/node.rb#10741 -class SyntaxTree::TLambda < ::SyntaxTree::Node - # @return [TLambda] a new instance of TLambda - # - # source://syntax_tree//lib/syntax_tree/node.rb#10745 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10771 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10750 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10754 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10758 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10754 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10767 - def deconstruct_keys(_keys); end - - # [String] the beginning of the lambda literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10743 - def value; end -end - -# TStringBeg represents the beginning of a string literal. -# -# "string" -# -# In the example above, TStringBeg represents the first set of quotes. Strings -# can also use single quotes. They can also be declared using the +%q+ and -# +%Q+ syntax, as in: -# -# %q{string} -# -# source://syntax_tree//lib/syntax_tree/node.rb#10934 -class SyntaxTree::TStringBeg < ::SyntaxTree::Node - # @return [TStringBeg] a new instance of TStringBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#10938 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10964 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10943 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10947 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10951 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10947 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10960 - def deconstruct_keys(_keys); end - - # [String] the beginning of the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#10936 - def value; end -end - -# TStringContent represents plain characters inside of an entity that accepts -# string content like a string, heredoc, command string, or regular -# expression. -# -# "string" -# -# In the example above, TStringContent represents the +string+ token contained -# within the string. -# -# source://syntax_tree//lib/syntax_tree/node.rb#10977 -class SyntaxTree::TStringContent < ::SyntaxTree::Node - # @return [TStringContent] a new instance of TStringContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#10984 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11023 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10994 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10998 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10982 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11002 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10998 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11015 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11019 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#10990 - def match?(pattern); end - - # [String] the content of the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#10979 - def value; end -end - -# TStringEnd represents the end of a string literal. -# -# "string" -# -# In the example above, TStringEnd represents the second set of quotes. -# Strings can also use single quotes. They can also be declared using the +%q+ -# and +%Q+ syntax, as in: -# -# %q{string} -# -# source://syntax_tree//lib/syntax_tree/node.rb#11038 -class SyntaxTree::TStringEnd < ::SyntaxTree::Node - # @return [TStringEnd] a new instance of TStringEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#11042 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11068 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11047 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11051 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11055 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11051 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11064 - def deconstruct_keys(_keys); end - - # [String] the end of the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#11040 - def value; end -end - -# In order for an `if` or `unless` expression to be shortened to a ternary, -# there has to be one and only one consequent clause which is an Else. Both -# the body of the main node and the body of the Else node must have only one -# statement, and that statement must not be on the denied list of potential -# statements. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6254 -module SyntaxTree::Ternaryable - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#6256 - def call(q, node); end - - private - - # Certain expressions cannot be reduced to a ternary without adding - # parentheses around them. In this case we say they cannot be ternaried - # and default instead to breaking them into multiple lines. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#6294 - def ternaryable?(statement); end - end -end - -# TopConstField is always the child node of some kind of assignment. It -# represents when you're assigning to a constant that is being referenced at -# the top level. -# -# ::Constant = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#10823 -class SyntaxTree::TopConstField < ::SyntaxTree::Node - # @return [TopConstField] a new instance of TopConstField - # - # source://syntax_tree//lib/syntax_tree/node.rb#10830 - def initialize(constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10866 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10836 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10840 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10828 - def comments; end - - # [Const] the constant being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#10825 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10844 - def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10840 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10857 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10861 - def format(q); end -end - -# TopConstRef is very similar to TopConstField except that it is not involved -# in an assignment. -# -# ::Constant -# -# source://syntax_tree//lib/syntax_tree/node.rb#10876 -class SyntaxTree::TopConstRef < ::SyntaxTree::Node - # @return [TopConstRef] a new instance of TopConstRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#10883 - def initialize(constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10919 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10889 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10893 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10881 - def comments; end - - # [Const] the constant being referenced - # - # source://syntax_tree//lib/syntax_tree/node.rb#10878 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10897 - def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10893 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10910 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10914 - def format(q); end -end - -# This module is responsible for translating the Syntax Tree syntax tree into -# other representations. -# -# source://syntax_tree//lib/syntax_tree/translation.rb#6 -module SyntaxTree::Translation - class << self - # This method translates the given node into the representation defined by - # the whitequark/parser gem. We don't explicitly list it as a dependency - # because it's not required for the core functionality of Syntax Tree. - # - # source://syntax_tree//lib/syntax_tree/translation.rb#10 - def to_parser(node, buffer); end - - # This method translates the given node into the representation defined by - # the rubocop/rubocop-ast gem. We don't explicitly list it as a dependency - # because it's not required for the core functionality of Syntax Tree. - # - # source://syntax_tree//lib/syntax_tree/translation.rb#20 - def to_rubocop_ast(node, buffer); end - end -end - -# Unary represents a unary method being called on an expression, as in +!+ or -# +~+. -# -# !value -# -# source://syntax_tree//lib/syntax_tree/node.rb#11161 -class SyntaxTree::Unary < ::SyntaxTree::Node - # @return [Unary] a new instance of Unary - # - # source://syntax_tree//lib/syntax_tree/node.rb#11171 - def initialize(operator:, statement:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11214 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11178 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11182 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11169 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11186 - def copy(operator: T.unsafe(nil), statement: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11182 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11200 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11209 - def format(q); end - - # [String] the operator being used - # - # source://syntax_tree//lib/syntax_tree/node.rb#11163 - def operator; end - - # [Node] the statement on which to operate - # - # source://syntax_tree//lib/syntax_tree/node.rb#11166 - def statement; end -end - -# Undef represents the use of the +undef+ keyword. -# -# undef method -# -# source://syntax_tree//lib/syntax_tree/node.rb#11224 -class SyntaxTree::Undef < ::SyntaxTree::Node - # @return [Undef] a new instance of Undef - # - # source://syntax_tree//lib/syntax_tree/node.rb#11255 - def initialize(symbols:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11298 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11261 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11265 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11253 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11269 - def copy(symbols: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11265 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11282 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11286 - def format(q); end - - # [Array[ DynaSymbol | SymbolLiteral ]] the symbols to undefine - # - # source://syntax_tree//lib/syntax_tree/node.rb#11250 - def symbols; end -end - -# Undef accepts a variable number of arguments that can be either DynaSymbol -# or SymbolLiteral objects. For SymbolLiteral objects we descend directly -# into the value in order to have it come out as bare words. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11228 -class SyntaxTree::Undef::UndefArgumentFormatter - # @return [UndefArgumentFormatter] a new instance of UndefArgumentFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#11232 - def initialize(node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11236 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11244 - def format(q); end - - # [DynaSymbol | SymbolLiteral] the symbol to undefine - # - # source://syntax_tree//lib/syntax_tree/node.rb#11230 - def node; end -end - -# Unless represents the first clause in an +unless+ chain. -# -# unless predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#11308 -class SyntaxTree::UnlessNode < ::SyntaxTree::Node - # @return [UnlessNode] a new instance of UnlessNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#11321 - def initialize(predicate:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11366 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11329 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11333 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11319 - def comments; end - - # [nil | Elsif | Else] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#11316 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11337 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11333 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11352 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11362 - def format(q); end - - # Checks if the node was originally found in the modifier form. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#11372 - def modifier?; end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#11310 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#11313 - def statements; end -end - -# Until represents an +until+ loop. -# -# until predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#11454 -class SyntaxTree::UntilNode < ::SyntaxTree::Node - # @return [UntilNode] a new instance of UntilNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#11464 - def initialize(predicate:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11506 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11471 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11475 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11462 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11479 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11475 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11493 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11502 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#11511 - def modifier?; end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#11456 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#11459 - def statements; end -end - -# VCall represent any plain named object with Ruby that could be either a -# local variable or a method call. -# -# variable -# -# source://syntax_tree//lib/syntax_tree/node.rb#11716 -class SyntaxTree::VCall < ::SyntaxTree::Node - # @return [VCall] a new instance of VCall - # - # source://syntax_tree//lib/syntax_tree/node.rb#11723 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11758 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11729 - def accept(visitor); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#11762 - def access_control?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11766 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11733 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11721 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11737 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11733 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11750 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11754 - def format(q); end - - # [Ident] the value of this expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#11718 - def value; end -end - -# source://syntax_tree//lib/syntax_tree/version.rb#4 -SyntaxTree::VERSION = T.let(T.unsafe(nil), String) - -# VarField represents a variable that is being assigned a value. As such, it -# is always a child of an assignment type node. -# -# variable = value -# -# In the example above, the VarField node represents the +variable+ token. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11522 -class SyntaxTree::VarField < ::SyntaxTree::Node - # @return [VarField] a new instance of VarField - # - # source://syntax_tree//lib/syntax_tree/node.rb#11529 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11568 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11535 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11539 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11527 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11543 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11539 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11556 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11560 - def format(q); end - - # [nil | :nil | Const | CVar | GVar | Ident | IVar] the target of this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11524 - def value; end -end - -# VarRef represents a variable reference. -# -# true -# -# This can be a plain local variable like the example above. It can also be a -# constant, a class variable, a global variable, an instance variable, a -# keyword (like +self+, +nil+, +true+, or +false+), or a numbered block -# variable. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11581 -class SyntaxTree::VarRef < ::SyntaxTree::Node - # @return [VarRef] a new instance of VarRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#11588 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11623 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11594 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11598 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11586 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11602 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11598 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11615 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11619 - def format(q); end - - # Oh man I hate this so much. Basically, ripper doesn't provide enough - # functionality to actually know where pins are within an expression. So we - # have to walk the tree ourselves and insert more information. In doing so, - # we have to replace this node by a pinned node when necessary. - # - # To be clear, this method should just not exist. It's not good. It's a - # place of shame. But it's necessary for now, so I'm keeping it. - # - # source://syntax_tree//lib/syntax_tree/node.rb#11634 - def pin(parent, pin); end - - # [Const | CVar | GVar | Ident | IVar | Kw] the value of this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11583 - def value; end -end - -# Visitor is a parent class that provides the ability to walk down the tree -# and handle a subset of nodes. By defining your own subclass, you can -# explicitly handle a node type by defining a visit_* method. -# -# source://syntax_tree//lib/syntax_tree/visitor.rb#7 -class SyntaxTree::Visitor < ::SyntaxTree::BasicVisitor - # Visit a BEGINBlock node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_BEGIN(node); end - - # Visit a CHAR node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_CHAR(node); end - - # Visit an ENDBlock node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_END(node); end - - # Visit an EndContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit___end__(node); end - - # Visit an AliasNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_alias(node); end - - # Visit an ARef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_aref(node); end - - # Visit an ARefField node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_aref_field(node); end - - # Visit an ArgBlock node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_arg_block(node); end - - # Visit an ArgParen node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_arg_paren(node); end - - # Visit an ArgStar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_arg_star(node); end - - # Visit an Args node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_args(node); end - - # Visit an ArgsForward node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_args_forward(node); end - - # Visit an ArrayLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_array(node); end - - # Visit an AryPtn node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_aryptn(node); end - - # Visit an Assign node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_assign(node); end - - # Visit an Assoc node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_assoc(node); end - - # Visit an AssocSplat node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_assoc_splat(node); end - - # Visit a Backref node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_backref(node); end - - # Visit a Backtick node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_backtick(node); end - - # Visit a BareAssocHash node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_bare_assoc_hash(node); end - - # Visit a Begin node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_begin(node); end - - # Visit a Binary node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_binary(node); end - - # Visit a Block node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_block(node); end - - # Visit a BlockVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_block_var(node); end - - # Visit a BlockArg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_blockarg(node); end - - # Visit a BodyStmt node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_bodystmt(node); end - - # Visit a Break node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_break(node); end - - # Visit a Call node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_call(node); end - - # Visit a Case node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_case(node); end - - # Visit a ClassDeclaration node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_class(node); end - - # Visit a Comma node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_comma(node); end - - # Visit a Command node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_command(node); end - - # Visit a CommandCall node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_command_call(node); end - - # Visit a Comment node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_comment(node); end - - # Visit a Const node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_const(node); end - - # Visit a ConstPathField node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_const_path_field(node); end - - # Visit a ConstPathRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_const_path_ref(node); end - - # Visit a ConstRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_const_ref(node); end - - # Visit a CVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_cvar(node); end - - # Visit a Def node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_def(node); end - - # Visit a Defined node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_defined(node); end - - # Visit a DynaSymbol node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_dyna_symbol(node); end - - # Visit an Else node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_else(node); end - - # Visit an Elsif node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_elsif(node); end - - # Visit an EmbDoc node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_embdoc(node); end - - # Visit an EmbExprBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_embexpr_beg(node); end - - # Visit an EmbExprEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_embexpr_end(node); end - - # Visit an EmbVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_embvar(node); end - - # Visit an Ensure node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_ensure(node); end - - # Visit an ExcessedComma node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_excessed_comma(node); end - - # Visit a Field node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_field(node); end - - # Visit a FloatLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_float(node); end - - # Visit a FndPtn node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_fndptn(node); end - - # Visit a For node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_for(node); end - - # Visit a GVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_gvar(node); end - - # Visit a HashLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_hash(node); end - - # Visit a Heredoc node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_heredoc(node); end - - # Visit a HeredocBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_heredoc_beg(node); end - - # Visit a HeredocEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_heredoc_end(node); end - - # Visit a HshPtn node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_hshptn(node); end - - # Visit an Ident node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_ident(node); end - - # Visit an IfNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_if(node); end - - # Visit an IfOp node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_if_op(node); end - - # Visit an Imaginary node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_imaginary(node); end - - # Visit an In node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_in(node); end - - # Visit an Int node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_int(node); end - - # Visit an IVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_ivar(node); end - - # Visit a Kw node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_kw(node); end - - # Visit a KwRestParam node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_kwrest_param(node); end - - # Visit a Label node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_label(node); end - - # Visit a LabelEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_label_end(node); end - - # Visit a Lambda node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lambda(node); end - - # Visit a LambdaVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lambda_var(node); end - - # Visit a LBrace node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lbrace(node); end - - # Visit a LBracket node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lbracket(node); end - - # Visit a LParen node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lparen(node); end - - # Visit a MAssign node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_massign(node); end - - # Visit a MethodAddBlock node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_method_add_block(node); end - - # Visit a MLHS node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_mlhs(node); end - - # Visit a MLHSParen node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_mlhs_paren(node); end - - # Visit a ModuleDeclaration node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_module(node); end - - # Visit a MRHS node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_mrhs(node); end - - # Visit a Next node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_next(node); end - - # Visit a Not node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_not(node); end - - # Visit an Op node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_op(node); end - - # Visit an OpAssign node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_opassign(node); end - - # Visit a Params node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_params(node); end - - # Visit a Paren node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_paren(node); end - - # Visit a Period node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_period(node); end - - # Visit a PinnedBegin node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_pinned_begin(node); end - - # Visit a PinnedVarRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_pinned_var_ref(node); end - - # Visit a Program node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_program(node); end - - # Visit a QSymbols node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_qsymbols(node); end - - # Visit a QSymbolsBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_qsymbols_beg(node); end - - # Visit a QWords node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_qwords(node); end - - # Visit a QWordsBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_qwords_beg(node); end - - # Visit a RangeNode node - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_range(node); end - - # Visit a RAssign node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rassign(node); end - - # Visit a RationalLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rational(node); end - - # Visit a RBrace node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rbrace(node); end - - # Visit a RBracket node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rbracket(node); end - - # Visit a Redo node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_redo(node); end - - # Visit a RegexpBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_regexp_beg(node); end - - # Visit a RegexpContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_regexp_content(node); end - - # Visit a RegexpEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_regexp_end(node); end - - # Visit a RegexpLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_regexp_literal(node); end - - # Visit a Rescue node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rescue(node); end - - # Visit a RescueEx node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rescue_ex(node); end - - # Visit a RescueMod node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rescue_mod(node); end - - # Visit a RestParam node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rest_param(node); end - - # Visit a Retry node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_retry(node); end - - # Visit a Return node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_return(node); end - - # Visit a RParen node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rparen(node); end - - # Visit a SClass node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_sclass(node); end - - # Visit a Statements node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_statements(node); end - - # Visit a StringConcat node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_concat(node); end - - # Visit a StringContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_content(node); end - - # Visit a StringDVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_dvar(node); end - - # Visit a StringEmbExpr node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_embexpr(node); end - - # Visit a StringLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_literal(node); end - - # Visit a Super node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_super(node); end - - # Visit a SymBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbeg(node); end - - # Visit a SymbolContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbol_content(node); end - - # Visit a SymbolLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbol_literal(node); end - - # Visit a Symbols node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbols(node); end - - # Visit a SymbolsBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbols_beg(node); end - - # Visit a TLambda node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tlambda(node); end - - # Visit a TLamBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tlambeg(node); end - - # Visit a TopConstField node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_top_const_field(node); end - - # Visit a TopConstRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_top_const_ref(node); end - - # Visit a TStringBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tstring_beg(node); end - - # Visit a TStringContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tstring_content(node); end - - # Visit a TStringEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tstring_end(node); end - - # Visit an Unary node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_unary(node); end - - # Visit an Undef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_undef(node); end - - # Visit an UnlessNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_unless(node); end - - # Visit an UntilNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_until(node); end - - # Visit a VarField node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_var_field(node); end - - # Visit a VarRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_var_ref(node); end - - # Visit a VCall node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_vcall(node); end - - # Visit a VoidStmt node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_void_stmt(node); end - - # Visit a When node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_when(node); end - - # Visit a WhileNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_while(node); end - - # Visit a Word node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_word(node); end - - # Visit a Words node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_words(node); end - - # Visit a WordsBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_words_beg(node); end - - # Visit a XString node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_xstring(node); end - - # Visit a XStringLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_xstring_literal(node); end - - # Visit a YieldNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_yield(node); end - - # Visit a ZSuper node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_zsuper(node); end -end - -# VoidStmt represents an empty lexical block of code. -# -# ;; -# -# source://syntax_tree//lib/syntax_tree/node.rb#11775 -class SyntaxTree::VoidStmt < ::SyntaxTree::Node - # @return [VoidStmt] a new instance of VoidStmt - # - # source://syntax_tree//lib/syntax_tree/node.rb#11779 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11808 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11784 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11788 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11777 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11792 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11788 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11801 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11805 - def format(q); end -end - -# When represents a +when+ clause in a +case+ chain. -# -# case value -# when predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#11819 -class SyntaxTree::When < ::SyntaxTree::Node - # @return [When] a new instance of When - # - # source://syntax_tree//lib/syntax_tree/node.rb#11832 - def initialize(arguments:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11924 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11840 - def accept(visitor); end - - # [Args] the arguments to the when clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#11821 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11844 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11830 - def comments; end - - # [nil | Else | When] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#11827 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11848 - def copy(arguments: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11844 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11863 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11889 - def format(q); end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#11824 - def statements; end -end - -# We're going to keep a single instance of this separator around so we don't -# have to allocate a new one every time we format a when clause. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11887 -SyntaxTree::When::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::When::Separator) - -# We have a special separator here for when clauses which causes them to -# fill as much of the line as possible as opposed to everything breaking -# into its own line as soon as you hit the print limit. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11876 -class SyntaxTree::When::Separator - # source://syntax_tree//lib/syntax_tree/node.rb#11877 - def call(q); end -end - -# While represents a +while+ loop. -# -# while predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#11935 -class SyntaxTree::WhileNode < ::SyntaxTree::Node - # @return [WhileNode] a new instance of WhileNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#11945 - def initialize(predicate:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11987 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11952 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11956 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11943 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11960 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11956 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11974 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11983 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#11992 - def modifier?; end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#11937 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#11940 - def statements; end -end - -# WithScope is a module intended to be included in classes inheriting from -# Visitor. The module overrides a few visit methods to automatically keep -# track of local variables and arguments defined in the current scope. -# Example usage: -# -# class MyVisitor < Visitor -# include WithScope -# -# def visit_ident(node) -# # Check if we're visiting an identifier for an argument, a local -# # variable or something else -# local = current_scope.find_local(node) -# -# if local.type == :argument -# # handle identifiers for arguments -# elsif local.type == :variable -# # handle identifiers for variables -# else -# # handle other identifiers, such as method names -# end -# end -# end -# -# source://syntax_tree//lib/syntax_tree/with_scope.rb#27 -module SyntaxTree::WithScope - # source://syntax_tree//lib/syntax_tree/with_scope.rb#122 - def initialize(*args, **kwargs, &block); end - - # Returns the value of attribute current_scope. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#120 - def current_scope; end - - # Visit for capturing local variables defined in regex named capture groups - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#236 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#189 - def visit_block_var(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#182 - def visit_blockarg(node); end - - # Visits for nodes that create new scopes, such as classes, modules - # and method definitions. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#131 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#147 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#175 - def visit_kwrest_param(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#189 - def visit_lambda_var(node); end - - # When we find a method invocation with a block, only the code that happens - # inside of the block needs a fresh scope. The method invocation - # itself happens in the same scope. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#142 - def visit_method_add_block(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#135 - def visit_module(node); end - - # Visit for keeping track of local arguments, such as method and block - # arguments. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#153 - def visit_params(node); end - - # Visit for keeping track of local variable definitions - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#207 - def visit_pinned_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#168 - def visit_rest_param(node); end - - # Visit for keeping track of local variable definitions - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#199 - def visit_var_field(node); end - - # Visits for keeping track of variable and argument usages - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#215 - def visit_var_ref(node); end - - # When using regex named capture groups, vcalls might actually be a variable - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#227 - def visit_vcall(node); end - - private - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#285 - def add_argument_definitions(list); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#299 - def next_scope_id; end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#303 - def with_scope(parent_scope = T.unsafe(nil)); end -end - -# The scope class is used to keep track of local variables and arguments -# inside a particular scope. -# -# source://syntax_tree//lib/syntax_tree/with_scope.rb#30 -class SyntaxTree::WithScope::Scope - # @return [Scope] a new instance of Scope - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#68 - def initialize(id, parent = T.unsafe(nil)); end - - # Adding a local definition will either insert a new entry in the locals - # hash or append a new definition location to an existing local. Notice - # that it's not possible to change the type of a local after it has been - # registered. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#78 - def add_local_definition(identifier, type); end - - # Adding a local usage will either insert a new entry in the locals - # hash or append a new usage location to an existing local. Notice that - # it's not possible to change the type of a local after it has been - # registered. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#95 - def add_local_usage(identifier, type); end - - # Try to find the local given its name in this scope or any of its - # parents. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#102 - def find_local(name); end - - # [Integer] a unique identifier for this scope - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#59 - def id; end - - # [Hash[String, Local]] The local variables and arguments defined in this - # scope - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#66 - def locals; end - - # [scope | nil] The parent scope - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#62 - def parent; end - - private - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#108 - def resolve_local(name, type); end -end - -# This class tracks the occurrences of a local variable or argument. -# -# source://syntax_tree//lib/syntax_tree/with_scope.rb#32 -class SyntaxTree::WithScope::Scope::Local - # @return [Local] a new instance of Local - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#43 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#49 - def add_definition(location); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#53 - def add_usage(location); end - - # [Array[Location]] The locations of all definitions and assignments of - # this local - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#38 - def definitions; end - - # [Symbol] The type of the local (e.g. :argument, :variable) - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#34 - def type; end - - # [Array[Location]] The locations of all usages of this local - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#41 - def usages; end -end - -# Word represents an element within a special array literal that accepts -# interpolation. -# -# %W[a#{b}c xyz] -# -# In the example above, there would be two Word nodes within a parent Words -# node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#12004 -class SyntaxTree::Word < ::SyntaxTree::Node - # @return [Word] a new instance of Word - # - # source://syntax_tree//lib/syntax_tree/node.rb#12012 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12051 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12022 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12026 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12010 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12030 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12026 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12043 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12047 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#12018 - def match?(pattern); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # word - # - # source://syntax_tree//lib/syntax_tree/node.rb#12007 - def parts; end -end - -# Words represents a string literal array with interpolation. -# -# %W[one two three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#12060 -class SyntaxTree::Words < ::SyntaxTree::Node - # @return [Words] a new instance of Words - # - # source://syntax_tree//lib/syntax_tree/node.rb#12070 - def initialize(beginning:, elements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12126 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12077 - def accept(visitor); end - - # [WordsBeg] the token that opens this array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#12062 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12081 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12068 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12085 - def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12081 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12095 - def deconstruct_keys(_keys); end - - # [Array[ Word ]] the elements of this array - # - # source://syntax_tree//lib/syntax_tree/node.rb#12065 - def elements; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12104 - def format(q); end -end - -# WordsBeg represents the beginning of a string literal array with -# interpolation. -# -# %W[one two three] -# -# In the snippet above, a WordsBeg would be created with the value of "%W[". -# Note that these kinds of arrays can start with a lot of different delimiter -# types (e.g., %W| or %W<). -# -# source://syntax_tree//lib/syntax_tree/node.rb#12140 -class SyntaxTree::WordsBeg < ::SyntaxTree::Node - # @return [WordsBeg] a new instance of WordsBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#12144 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12170 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12149 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12153 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12157 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12153 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12166 - def deconstruct_keys(_keys); end - - # [String] the start of the word literal array - # - # source://syntax_tree//lib/syntax_tree/node.rb#12142 - def value; end -end - -# XString represents the contents of an XStringLiteral. -# -# `ls` -# -# source://syntax_tree//lib/syntax_tree/node.rb#12179 -class SyntaxTree::XString < ::SyntaxTree::Node - # @return [XString] a new instance of XString - # - # source://syntax_tree//lib/syntax_tree/node.rb#12184 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12210 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12189 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12193 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12197 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12193 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12206 - def deconstruct_keys(_keys); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # xstring - # - # source://syntax_tree//lib/syntax_tree/node.rb#12182 - def parts; end -end - -# XStringLiteral represents a string that gets executed. -# -# `ls` -# -# source://syntax_tree//lib/syntax_tree/node.rb#12219 -class SyntaxTree::XStringLiteral < ::SyntaxTree::Node - # @return [XStringLiteral] a new instance of XStringLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#12227 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12264 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12233 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12237 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12225 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12241 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12237 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12254 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12258 - def format(q); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # xstring - # - # source://syntax_tree//lib/syntax_tree/node.rb#12222 - def parts; end -end - -# This module provides an object representation of the YARV bytecode. -# -# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#4 -module SyntaxTree::YARV - class << self - # A convenience method for creating a CallData object. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#88 - def calldata(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end - - # Compile the given source into a YARV instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv.rb#25 - def compile(source, options = T.unsafe(nil)); end - - # Compile and interpret the given source. - # - # source://syntax_tree//lib/syntax_tree/yarv.rb#30 - def interpret(source, options = T.unsafe(nil)); end - end -end - -# ### Summary -# -# `adjuststack` accepts a single integer argument and removes that many -# elements from the top of the stack. -# -# ### Usage -# -# ~~~ruby -# x = [true] -# x[0] ||= nil -# x[0] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#69 -class SyntaxTree::YARV::AdjustStack < ::SyntaxTree::YARV::Instruction - # @return [AdjustStack] a new instance of AdjustStack - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#72 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#88 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#100 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#84 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#76 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#92 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#70 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#96 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#80 - def to_a(_iseq); end -end - -# ### Summary -# -# `anytostring` ensures that the value on top of the stack is a string. -# -# It pops two values off the stack. If the first value is a string it -# pushes it back on the stack. If the first value is not a string, it uses -# Ruby's built in string coercion to coerce the second value to a string -# and then pushes that back on the stack. -# -# This is used in conjunction with `objtostring` as a fallback for when an -# object's `to_s` method does not return a string. -# -# ### Usage -# -# ~~~ruby -# "#{5}" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#123 -class SyntaxTree::YARV::AnyToString < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#136 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#148 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#132 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#124 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#140 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#144 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#128 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#5 -class SyntaxTree::YARV::Assembler - # @return [Assembler] a new instance of Assembler - # - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#66 - def initialize(lines); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#70 - def assemble; end - - # Returns the value of attribute lines. - # - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#64 - def lines; end - - private - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#88 - def assemble_iseq(iseq, lines); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#408 - def find_local(iseq, operands); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#417 - def parse(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#449 - def parse_calldata(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#444 - def parse_nested(lines); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#432 - def parse_number(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#424 - def parse_options(value, options); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#436 - def parse_string(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#440 - def parse_symbol(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#428 - def parse_type(value, type); end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#78 - def assemble(source); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#82 - def assemble_file(filepath); end - end -end - -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#28 -SyntaxTree::YARV::Assembler::CALLDATA_FLAGS = T.let(T.unsafe(nil), Hash) - -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#43 -SyntaxTree::YARV::Assembler::DEFINED_TYPES = T.let(T.unsafe(nil), Array) - -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#6 -class SyntaxTree::YARV::Assembler::ObjectVisitor < ::SyntaxTree::YARV::Compiler::RubyVisitor - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#7 - def visit_dyna_symbol(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#15 - def visit_string_literal(node); end -end - -# This object represents a single basic block, wherein all contained -# instructions do not branch except for the last one. -# -# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#7 -class SyntaxTree::YARV::BasicBlock - # @return [BasicBlock] a new instance of BasicBlock - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#23 - def initialize(block_start, insns); end - - # This is the index into the list of instructions where this block starts. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#12 - def block_start; end - - # Yield each instruction in this basic block along with its index from the - # original instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#35 - def each_with_length; end - - # This is the unique identifier for this basic block. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#9 - def id; end - - # This is an array of basic blocks that lead into this block. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#18 - def incoming_blocks; end - - # This is the set of instructions that this block contains. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#15 - def insns; end - - # This is an array of basic blocks that this block leads into. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#21 - def outgoing_blocks; end - - # This method is used to verify that the basic block is well formed. It - # checks that the only instruction in this basic block that branches is - # the last instruction. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#48 - def verify; end -end - -# Parses the given source code into a syntax tree, compiles that syntax tree -# into YARV bytecode. -# -# source://syntax_tree//lib/syntax_tree/yarv/bf.rb#7 -class SyntaxTree::YARV::Bf - # @return [Bf] a new instance of Bf - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#10 - def initialize(source); end - - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#14 - def compile; end - - # Returns the value of attribute source. - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#8 - def source; end - - private - - # $tape[$cursor] += value - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#84 - def change_by(iseq, value); end - - # $tape[$cursor] = $stdin.getc.ord - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#133 - def input_char(iseq); end - - # Jump back to the start of the loop. - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#163 - def loop_end(iseq, start_label, end_label); end - - # unless $tape[$cursor] == 0 - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#146 - def loop_start(iseq); end - - # $stdout.putc($tape[$cursor].chr) - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#120 - def output_char(iseq); end - - # $cursor += value - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#105 - def shift_by(iseq, value); end -end - -# ### Summary -# -# `branchif` has one argument: the jump index. It pops one value off the -# stack: the jump condition. -# -# If the value popped off the stack is true, `branchif` jumps to -# the jump index and continues executing there. -# -# ### Usage -# -# ~~~ruby -# x = true -# x ||= "foo" -# puts x -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#175 -class SyntaxTree::YARV::BranchIf < ::SyntaxTree::YARV::Instruction - # @return [BranchIf] a new instance of BranchIf - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#178 - def initialize(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#194 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#210 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#206 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#190 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#182 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#214 - def falls_through?; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#176 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#198 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#202 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#186 - def to_a(_iseq); end -end - -# ### Summary -# -# `branchnil` has one argument: the jump index. It pops one value off the -# stack: the jump condition. -# -# If the value popped off the stack is nil, `branchnil` jumps to -# the jump index and continues executing there. -# -# ### Usage -# -# ~~~ruby -# x = nil -# if x&.to_s -# puts "hi" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#236 -class SyntaxTree::YARV::BranchNil < ::SyntaxTree::YARV::Instruction - # @return [BranchNil] a new instance of BranchNil - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#239 - def initialize(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#255 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#271 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#267 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#251 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#243 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#275 - def falls_through?; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#237 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#259 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#263 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#247 - def to_a(_iseq); end -end - -# ### Summary -# -# `branchunless` has one argument: the jump index. It pops one value off -# the stack: the jump condition. -# -# If the value popped off the stack is false or nil, `branchunless` jumps -# to the jump index and continues executing there. -# -# ### Usage -# -# ~~~ruby -# if 2 + 3 -# puts "foo" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#296 -class SyntaxTree::YARV::BranchUnless < ::SyntaxTree::YARV::Instruction - # @return [BranchUnless] a new instance of BranchUnless - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#299 - def initialize(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#315 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#331 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#327 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#311 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#303 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#335 - def falls_through?; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#297 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#319 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#323 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#307 - def to_a(_iseq); end -end - -# This is an operand to various YARV instructions that represents the -# information about a specific call site. -# -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#7 -class SyntaxTree::YARV::CallData - # @return [CallData] a new instance of CallData - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#31 - def initialize(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end - - # Returns the value of attribute argc. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 - def argc; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#43 - def flag?(mask); end - - # Returns the value of attribute flags. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 - def flags; end - - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#53 - def inspect; end - - # Returns the value of attribute kw_arg. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 - def kw_arg; end - - # Returns the value of attribute method. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 - def method; end - - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#47 - def to_h; end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#77 - def from(serialized); end - end -end - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_ARGS_BLOCKARG = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_ARGS_SIMPLE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_ARGS_SPLAT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_FCALL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_KWARG = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_KW_SPLAT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_KW_SPLAT_MUT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_OPT_SEND = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_SUPER = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_TAILCALL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_VCALL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_ZSUPER = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `checkkeyword` checks if a keyword was passed at the callsite that -# called into the method represented by the instruction sequence. It has -# two arguments: the index of the local variable that stores the keywords -# metadata and the index of the keyword within that metadata. It pushes -# a boolean onto the stack indicating whether or not the keyword was -# given. -# -# ### Usage -# -# ~~~ruby -# def evaluate(value: rand) -# value -# end -# -# evaluate(value: 3) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#359 -class SyntaxTree::YARV::CheckKeyword < ::SyntaxTree::YARV::Instruction - # @return [CheckKeyword] a new instance of CheckKeyword - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#362 - def initialize(keyword_bits_index, keyword_index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#386 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#400 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#382 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#367 - def disasm(fmt); end - - # Returns the value of attribute keyword_bits_index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360 - def keyword_bits_index; end - - # Returns the value of attribute keyword_index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360 - def keyword_index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#392 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#396 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#374 - def to_a(iseq); end -end - -# ### Summary -# -# `checkmatch` checks if the current pattern matches the current value. It -# pops the target and the pattern off the stack and pushes a boolean onto -# the stack if it matches or not. -# -# ### Usage -# -# ~~~ruby -# foo in Foo -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#417 -class SyntaxTree::YARV::CheckMatch < ::SyntaxTree::YARV::Instruction - # @return [CheckMatch] a new instance of CheckMatch - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#426 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#442 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#458 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#438 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#430 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#446 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#450 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#454 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#434 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#424 - def type; end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#472 - def check?(pattern, target); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#422 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_ARRAY = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#419 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_CASE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#421 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_MASK = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#420 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_RESCUE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#418 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_WHEN = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `checktype` checks if the value on top of the stack is of a certain type. -# The type is the only argument. It pops the value off the stack and pushes -# a boolean onto the stack indicating whether or not the value is of the -# given type. -# -# ### Usage -# -# ~~~ruby -# foo in [bar] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#501 -class SyntaxTree::YARV::CheckType < ::SyntaxTree::YARV::Instruction - # @return [CheckType] a new instance of CheckType - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#526 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#588 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#608 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#584 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#530 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#592 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#596 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#600 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#580 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#524 - def type; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#508 -SyntaxTree::YARV::CheckType::TYPE_ARRAY = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#511 -SyntaxTree::YARV::CheckType::TYPE_BIGNUM = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#503 -SyntaxTree::YARV::CheckType::TYPE_CLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#515 -SyntaxTree::YARV::CheckType::TYPE_COMPLEX = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#513 -SyntaxTree::YARV::CheckType::TYPE_DATA = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#519 -SyntaxTree::YARV::CheckType::TYPE_FALSE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#512 -SyntaxTree::YARV::CheckType::TYPE_FILE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#521 -SyntaxTree::YARV::CheckType::TYPE_FIXNUM = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#505 -SyntaxTree::YARV::CheckType::TYPE_FLOAT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#509 -SyntaxTree::YARV::CheckType::TYPE_HASH = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#514 -SyntaxTree::YARV::CheckType::TYPE_MATCH = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#504 -SyntaxTree::YARV::CheckType::TYPE_MODULE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#517 -SyntaxTree::YARV::CheckType::TYPE_NIL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#502 -SyntaxTree::YARV::CheckType::TYPE_OBJECT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#516 -SyntaxTree::YARV::CheckType::TYPE_RATIONAL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#507 -SyntaxTree::YARV::CheckType::TYPE_REGEXP = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#506 -SyntaxTree::YARV::CheckType::TYPE_STRING = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#510 -SyntaxTree::YARV::CheckType::TYPE_STRUCT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#520 -SyntaxTree::YARV::CheckType::TYPE_SYMBOL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#518 -SyntaxTree::YARV::CheckType::TYPE_TRUE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#522 -SyntaxTree::YARV::CheckType::TYPE_UNDEF = T.let(T.unsafe(nil), Integer) - -# This class is an experiment in transforming Syntax Tree nodes into their -# corresponding YARV instruction sequences. It attempts to mirror the -# behavior of RubyVM::InstructionSequence.compile. -# -# You use this as with any other visitor. First you parse code into a tree, -# then you visit it with this compiler. Visiting the root node of the tree -# will return a SyntaxTree::YARV::Compiler::InstructionSequence object. -# With that object you can call #to_a on it, which will return a serialized -# form of the instruction sequence as an array. This array _should_ mirror -# the array given by RubyVM::InstructionSequence#to_a. -# -# As an example, here is how you would compile a single expression: -# -# program = SyntaxTree.parse("1 + 2") -# program.accept(SyntaxTree::YARV::Compiler.new).to_a -# -# [ -# "YARVInstructionSequence/SimpleDataFormat", -# 3, -# 1, -# 1, -# {:arg_size=>0, :local_size=>0, :stack_max=>2}, -# "<compiled>", -# "<compiled>", -# "<compiled>", -# 1, -# :top, -# [], -# {}, -# [], -# [ -# [:putobject_INT2FIX_1_], -# [:putobject, 2], -# [:opt_plus, {:mid=>:+, :flag=>16, :orig_argc=>1}], -# [:leave] -# ] -# ] -# -# Note that this is the same output as calling: -# -# RubyVM::InstructionSequence.compile("1 + 2").to_a -# -# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#47 -class SyntaxTree::YARV::Compiler < ::SyntaxTree::BasicVisitor - # @return [Compiler] a new instance of Compiler - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#293 - def initialize(options = T.unsafe(nil)); end - - # The current instruction sequence that is being compiled. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#286 - def iseq; end - - # A boolean to track if we're currently compiling the last statement - # within a set of statements. This information is necessary to determine - # if we need to return the value of the last statement. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#291 - def last_statement; end - - # These options mirror the compilation options that we currently support - # that can be also passed to RubyVM::InstructionSequence.compile. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#283 - def options; end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#299 - def visit_BEGIN(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#303 - def visit_CHAR(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#311 - def visit_END(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#339 - def visit_alias(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#347 - def visit_aref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#369 - def visit_arg_block(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#373 - def visit_arg_paren(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#377 - def visit_arg_star(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#382 - def visit_args(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#386 - def visit_array(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#421 - def visit_aryptn(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#424 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#522 - def visit_assoc(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#527 - def visit_assoc_splat(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#531 - def visit_backref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#535 - def visit_bare_assoc_hash(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#543 - def visit_begin(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#546 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#575 - def visit_block(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#585 - def visit_block_var(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#599 - def visit_blockarg(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#605 - def visit_bodystmt(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#609 - def visit_break(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#612 - def visit_call(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#712 - def visit_case(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#757 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#792 - def visit_command(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#805 - def visit_command_call(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#818 - def visit_const_path_field(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#822 - def visit_const_path_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#827 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#850 - def visit_defined(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#907 - def visit_dyna_symbol(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#913 - def visit_else(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#918 - def visit_elsif(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#929 - def visit_ensure(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#932 - def visit_field(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#936 - def visit_float(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#940 - def visit_fndptn(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#943 - def visit_for(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#976 - def visit_hash(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#988 - def visit_heredoc(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#985 - def visit_hshptn(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#999 - def visit_if(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1053 - def visit_if_op(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1074 - def visit_imaginary(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1078 - def visit_int(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1082 - def visit_kwrest_param(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1088 - def visit_label(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1092 - def visit_lambda(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1106 - def visit_lambda_var(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1110 - def visit_massign(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1116 - def visit_method_add_block(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1129 - def visit_mlhs(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1142 - def visit_module(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1171 - def visit_mrhs(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1180 - def visit_next(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1183 - def visit_not(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1188 - def visit_opassign(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1254 - def visit_params(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1360 - def visit_paren(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1364 - def visit_pinned_begin(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1367 - def visit_pinned_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1370 - def visit_program(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1421 - def visit_qsymbols(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1425 - def visit_qwords(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1434 - def visit_range(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1444 - def visit_rassign(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1521 - def visit_rational(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1525 - def visit_redo(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1528 - def visit_regexp_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1538 - def visit_rescue(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1541 - def visit_rescue_ex(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1544 - def visit_rescue_mod(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1547 - def visit_rest_param(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1553 - def visit_retry(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1556 - def visit_return(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1559 - def visit_sclass(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1580 - def visit_statements(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1594 - def visit_string_concat(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1606 - def visit_string_embexpr(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1610 - def visit_string_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1619 - def visit_super(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1633 - def visit_symbol_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1637 - def visit_symbols(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1656 - def visit_top_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1660 - def visit_tstring_content(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1668 - def visit_unary(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1689 - def visit_undef(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1699 - def visit_unless(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1725 - def visit_until(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1744 - def visit_var_field(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1761 - def visit_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1796 - def visit_vcall(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1808 - def visit_when(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1812 - def visit_while(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1831 - def visit_word(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1840 - def visit_words(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1850 - def visit_xstring_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1863 - def visit_yield(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1869 - def visit_zsuper(_node); end - - private - - # This is a helper that is used in places where arguments may be present - # or they may be wrapped in parentheses. It's meant to descend down the - # tree and return an array of argument nodes. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1887 - def argument_parts(node); end - - # Constant names when they are being assigned or referenced come in as a - # tree, but it's more convenient to work with them as an array. This - # method converts them into that array. This is nice because it's the - # operand that goes to opt_getconstant_path in Ruby 3.2. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1908 - def constant_names(node); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2196 - def last_statement?; end - - # For the most part when an OpAssign (operator assignment) node with a ||= - # operator is being compiled it's a matter of reading the target, checking - # if the value should be evaluated, evaluating it if so, and then writing - # the result back to the target. - # - # However, in certain kinds of assignments (X, ::X, X::Y, @@x, and $x) we - # first check if the value is defined using the defined instruction. I - # don't know why it is necessary, and suspect that it isn't. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1936 - def opassign_defined(node); end - - # Whenever a value is interpolated into a string-like structure, these - # three instructions are pushed. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2016 - def push_interpolate; end - - # Visit a type of pattern in a pattern match. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2029 - def visit_pattern(node, end_label); end - - # There are a lot of nodes in the AST that act as contains of parts of - # strings. This includes things like string literals, regular expressions, - # heredocs, etc. This method will visit all the parts of a string within - # those containers. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2137 - def visit_string_parts(node); end - - # The current instruction sequence that we're compiling is always stored - # on the compiler. When we descend into a node that has its own - # instruction sequence, this method can be called to temporarily set the - # new value of the instruction sequence, yield, and then set it back. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2167 - def with_child_iseq(child_iseq); end - - # When we're compiling the last statement of a set of statements within a - # scope, the instructions sometimes change from pops to leaves. These - # kinds of peephole optimizations can reduce the overall number of - # instructions. Therefore, we keep track of whether we're compiling the - # last statement of a scope and allow visit methods to query that - # information. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2185 - def with_last_statement; end - - # OpAssign nodes can have a number of different kinds of nodes as their - # "target" (i.e., the left-hand side of the assignment). When compiling - # these nodes we typically need to first fetch the current value of the - # variable, then perform some kind of action, then store the result back - # into the variable. This method handles that by first fetching the value, - # then yielding to the block, then storing the result. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2206 - def with_opassign(node); end -end - -# This represents a set of options that can be passed to the compiler to -# control how it compiles the code. It mirrors the options that can be -# passed to RubyVM::InstructionSequence.compile, except it only includes -# options that actually change the behavior. -# -# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#52 -class SyntaxTree::YARV::Compiler::Options - # @return [Options] a new instance of Options - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#53 - def initialize(frozen_string_literal: T.unsafe(nil), inline_const_cache: T.unsafe(nil), operands_unification: T.unsafe(nil), peephole_optimization: T.unsafe(nil), specialized_instruction: T.unsafe(nil), tailcall_optimization: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#80 - def frozen_string_literal!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#84 - def frozen_string_literal?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#88 - def inline_const_cache?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#92 - def operands_unification?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#96 - def peephole_optimization?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#100 - def specialized_instruction?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#104 - def tailcall_optimization?; end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#69 - def to_hash; end -end - -# This visitor is responsible for converting Syntax Tree nodes into their -# corresponding Ruby structures. This is used to convert the operands of -# some instructions like putobject that push a Ruby object directly onto -# the stack. It is only used when the entire structure can be represented -# at compile-time, as opposed to constructed at run-time. -# -# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#114 -class SyntaxTree::YARV::Compiler::RubyVisitor < ::SyntaxTree::BasicVisitor - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_BEGIN(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_CHAR(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_END(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit___end__(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_alias(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_aref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_aref_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_arg_block(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_arg_paren(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_arg_star(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_args(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_args_forward(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#128 - def visit_array(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_aryptn(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_assign(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_assoc(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_assoc_splat(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_backref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_backtick(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132 - def visit_bare_assoc_hash(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_begin(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_binary(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_block(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_block_var(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_blockarg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_bodystmt(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_break(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_call(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_case(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_class(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_comma(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_command(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_command_call(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_comment(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_const(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_const_path_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_const_path_ref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_const_ref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_cvar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_def(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_defined(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_dyna_symbol(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_else(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_elsif(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_embdoc(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_embexpr_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_embexpr_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_embvar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_ensure(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_excessed_comma(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#141 - def visit_float(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_fndptn(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_for(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_gvar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132 - def visit_hash(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_heredoc(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_heredoc_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_heredoc_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_hshptn(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_ident(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_if(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_if_op(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#147 - def visit_imaginary(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_in(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#151 - def visit_int(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_ivar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_kw(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_kwrest_param(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#166 - def visit_label(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_label_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lambda(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lambda_var(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lbrace(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lbracket(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lparen(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_massign(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_method_add_block(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_mlhs(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_mlhs_paren(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_module(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#170 - def visit_mrhs(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_next(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_not(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_op(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_opassign(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_params(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_paren(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_period(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_pinned_begin(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_pinned_var_ref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_program(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#174 - def visit_qsymbols(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_qsymbols_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#178 - def visit_qwords(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_qwords_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#182 - def visit_range(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rassign(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#187 - def visit_rational(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rbrace(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rbracket(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_redo(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_regexp_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_regexp_content(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_regexp_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#191 - def visit_regexp_literal(node); end - - # This isn't actually a visit method, though maybe it should be. It is - # responsible for converting the set of string options on a regular - # expression into its equivalent integer. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#249 - def visit_regexp_literal_flags(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rescue(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rescue_ex(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rescue_mod(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rest_param(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_retry(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_return(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rparen(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_sclass(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_statements(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_concat(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_content(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_dvar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_embexpr(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_literal(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_super(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_symbeg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_symbol_content(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#204 - def visit_symbol_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#208 - def visit_symbols(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_symbols_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_tlambda(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_tlambeg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_top_const_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_top_const_ref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_tstring_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#212 - def visit_tstring_content(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_tstring_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_unary(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_undef(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_unless(_node); end - - # @raise [CompilationError] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_unsupported(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_until(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_var_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#216 - def visit_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_vcall(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_void_stmt(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_when(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_while(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#231 - def visit_word(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#241 - def visit_words(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_words_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_xstring(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_xstring_literal(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_yield(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_zsuper(_node); end - - class << self - # This will attempt to compile the given node. If it's possible, then - # it will return the compiled object. Otherwise it will return nil. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#122 - def compile(node); end - end -end - -# This error is raised whenever a node cannot be converted into a Ruby -# object at compile-time. -# -# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#117 -class SyntaxTree::YARV::Compiler::RubyVisitor::CompilationError < ::StandardError; end - -# ### Summary -# -# `concatarray` concatenates the two Arrays on top of the stack. -# -# It coerces the two objects at the top of the stack into Arrays by -# calling `to_a` if necessary, and makes sure to `dup` the first Array if -# it was already an Array, to avoid mutating it when concatenating. -# -# ### Usage -# -# ~~~ruby -# [1, *2] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#674 -class SyntaxTree::YARV::ConcatArray < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#687 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#699 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#683 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#675 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#691 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#695 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#679 - def to_a(_iseq); end -end - -# ### Summary -# -# `concatstrings` pops a number of strings from the stack joins them -# together into a single string and pushes that string back on the stack. -# -# This does no coercion and so is always used in conjunction with -# `objtostring` and `anytostring` to ensure the stack contents are always -# strings. -# -# ### Usage -# -# ~~~ruby -# "#{5}" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#720 -class SyntaxTree::YARV::ConcatStrings < ::SyntaxTree::YARV::Instruction - # @return [ConcatStrings] a new instance of ConcatStrings - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#723 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#739 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#755 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#735 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#727 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#743 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#721 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#747 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#751 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#731 - def to_a(_iseq); end -end - -# This class represents a control flow graph of a YARV instruction sequence. -# It constructs a graph of basic blocks that hold subsets of the list of -# instructions from the instruction sequence. -# -# You can use this class by calling the ::compile method and passing it a -# YARV instruction sequence. It will return a control flow graph object. -# -# iseq = RubyVM::InstructionSequence.compile("1 + 2") -# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a) -# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq) -# -# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#16 -class SyntaxTree::YARV::ControlFlowGraph - # @return [ControlFlowGraph] a new instance of ControlFlowGraph - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#173 - def initialize(iseq, insns, blocks); end - - # This is the set of basic blocks that this control-flow graph contains. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#171 - def blocks; end - - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#179 - def disasm; end - - # This is the list of instructions that this control flow graph contains. - # It is effectively the same as the list of instructions in the - # instruction sequence but with line numbers and events filtered out. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#168 - def insns; end - - # This is the instruction sequence that this control flow graph - # corresponds to. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#163 - def iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#202 - def to_dfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#210 - def to_mermaid; end - - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#206 - def to_son; end - - # This method is used to verify that the control flow graph is well - # formed. It does this by checking that each basic block is itself well - # formed. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#248 - def verify; end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#252 - def compile(iseq); end - end -end - -# This class is responsible for creating a control flow graph from the -# given instruction sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#19 -class SyntaxTree::YARV::ControlFlowGraph::Compiler - # @return [Compiler] a new instance of Compiler - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#34 - def initialize(iseq); end - - # This method is used to compile the instruction sequence into a control - # flow graph. It returns an instance of ControlFlowGraph. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#54 - def compile; end - - # This is a hash of indices in the YARV instruction sequence that point - # to their corresponding instruction. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#25 - def insns; end - - # This is the instruction sequence that is being compiled. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#21 - def iseq; end - - # This is a hash of labels that point to their corresponding index into - # the YARV instruction sequence. Note that this is not the same as the - # index into the list of instructions on the instruction sequence - # object. Instead, this is the index into the C array, so it includes - # operands. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#32 - def labels; end - - private - - # Builds up a set of basic blocks by iterating over the starts of each - # block. They are keyed by the index of their first instruction. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#92 - def build_basic_blocks; end - - # Connect the blocks by letting them know which blocks are incoming and - # outgoing from each block. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#123 - def connect_basic_blocks(blocks); end - - # Finds the indices of the instructions that start a basic block because - # they're either: - # - # * the start of an instruction sequence - # * the target of a branch - # * fallen through to from a branch - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#72 - def find_basic_block_starts; end - - # If there are blocks that are unreachable, we can remove them from the - # graph entirely at this point. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#145 - def prune_basic_blocks(blocks); end -end - -# Constructs a data-flow-graph of a YARV instruction sequence, via a -# control-flow-graph. Data flow is discovered locally and then globally. The -# graph only considers data flow through the stack - local variables and -# objects are considered fully escaped in this analysis. -# -# You can use this class by calling the ::compile method and passing it a -# control flow graph. It will return a data flow graph object. -# -# iseq = RubyVM::InstructionSequence.compile("1 + 2") -# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a) -# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq) -# dfg = SyntaxTree::YARV::DataFlowGraph.compile(cfg) -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#18 -class SyntaxTree::YARV::DataFlowGraph - # @return [DataFlowGraph] a new instance of DataFlowGraph - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#68 - def initialize(cfg, insn_flows, block_flows); end - - # Returns the value of attribute block_flows. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 - def block_flows; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#74 - def blocks; end - - # Returns the value of attribute cfg. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 - def cfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#78 - def disasm; end - - # Returns the value of attribute insn_flows. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 - def insn_flows; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#127 - def to_mermaid; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#123 - def to_son; end - - # Verify that we constructed the data flow graph correctly. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#179 - def verify; end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#204 - def compile(cfg); end - end -end - -# This represents an object that goes on the stack that is passed between -# basic blocks. -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#32 -class SyntaxTree::YARV::DataFlowGraph::BlockArgument - # @return [BlockArgument] a new instance of BlockArgument - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#35 - def initialize(name); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#39 - def local?; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#33 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#43 - def to_str; end -end - -# This class is responsible for creating a data flow graph from the given -# control flow graph. -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#210 -class SyntaxTree::YARV::DataFlowGraph::Compiler - # @return [Compiler] a new instance of Compiler - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#221 - def initialize(cfg); end - - # This data structure will hold the data flow between basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#219 - def block_flows; end - - # This is the control flow graph that is being compiled. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#212 - def cfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#227 - def compile; end - - # This data structure will hold the data flow between instructions - # within individual basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#216 - def insn_flows; end - - private - - # Find the data that flows between basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#304 - def find_external_flow; end - - # Find the data flow within each basic block. Using an abstract stack, - # connect from consumers of data to the producers of that data. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#237 - def find_internal_flow; end -end - -# This object represents the flow of data between instructions. -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#20 -class SyntaxTree::YARV::DataFlowGraph::DataFlow - # @return [DataFlow] a new instance of DataFlow - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#24 - def initialize; end - - # Returns the value of attribute in. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#21 - def in; end - - # Returns the value of attribute out. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#22 - def out; end -end - -# This represents an object that goes on the stack that is passed between -# instructions within a basic block. -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#50 -class SyntaxTree::YARV::DataFlowGraph::LocalArgument - # @return [LocalArgument] a new instance of LocalArgument - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#53 - def initialize(length); end - - # Returns the value of attribute length. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51 - def length; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#57 - def local?; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#61 - def to_str; end -end - -# This class is responsible for taking a compiled instruction sequence and -# walking through it to generate equivalent Ruby code. -# -# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#7 -class SyntaxTree::YARV::Decompiler - include ::SyntaxTree::DSL - - # @return [Decompiler] a new instance of Decompiler - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#32 - def initialize(iseq); end - - # Returns the value of attribute block_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30 - def block_label; end - - # Returns the value of attribute iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30 - def iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#37 - def to_ruby; end - - private - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#52 - def decompile(iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#256 - def local_name(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#43 - def node_for(value); end -end - -# When we're decompiling, we use a looped case statement to emulate -# jumping around in the same way the virtual machine would. This class -# provides convenience methods for generating the AST nodes that have to -# do with that label. -# -# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#12 -class SyntaxTree::YARV::Decompiler::BlockLabel - include ::SyntaxTree::DSL - - # @return [BlockLabel] a new instance of BlockLabel - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#16 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#20 - def field; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#14 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#24 - def ref; end -end - -# ### Summary -# -# `defineclass` defines a class. First it pops the superclass off the -# stack, then it pops the object off the stack that the class should be -# defined under. It has three arguments: the name of the constant, the -# instruction sequence associated with the class, and various flags that -# indicate if it is a singleton class, a module, or a regular class. -# -# ### Usage -# -# ~~~ruby -# class Foo -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#775 -class SyntaxTree::YARV::DefineClass < ::SyntaxTree::YARV::Instruction - # @return [DefineClass] a new instance of DefineClass - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#784 - def initialize(name, class_iseq, flags); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#806 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#823 - def call(vm); end - - # Returns the value of attribute class_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 - def class_iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#802 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#790 - def disasm(fmt); end - - # Returns the value of attribute flags. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 - def flags; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#811 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#815 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#819 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#798 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#780 -SyntaxTree::YARV::DefineClass::FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#779 -SyntaxTree::YARV::DefineClass::FLAG_SCOPED = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#776 -SyntaxTree::YARV::DefineClass::TYPE_CLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#778 -SyntaxTree::YARV::DefineClass::TYPE_MODULE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#777 -SyntaxTree::YARV::DefineClass::TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `definemethod` defines a method on the class of the current value of -# `self`. It accepts two arguments. The first is the name of the method -# being defined. The second is the instruction sequence representing the -# body of the method. -# -# ### Usage -# -# ~~~ruby -# def value = "value" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1068 -class SyntaxTree::YARV::DefineMethod < ::SyntaxTree::YARV::Instruction - # @return [DefineMethod] a new instance of DefineMethod - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1071 - def initialize(method_name, method_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1092 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1101 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1088 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1076 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1097 - def length; end - - # Returns the value of attribute method_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069 - def method_iseq; end - - # Returns the value of attribute method_name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069 - def method_name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1084 - def to_a(_iseq); end -end - -# ### Summary -# -# `definesmethod` defines a method on the singleton class of the current -# value of `self`. It accepts two arguments. The first is the name of the -# method being defined. The second is the instruction sequence representing -# the body of the method. It pops the object off the stack that the method -# should be defined on. -# -# ### Usage -# -# ~~~ruby -# def self.value = "value" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1137 -class SyntaxTree::YARV::DefineSMethod < ::SyntaxTree::YARV::Instruction - # @return [DefineSMethod] a new instance of DefineSMethod - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1140 - def initialize(method_name, method_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1161 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1174 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1157 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1145 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1166 - def length; end - - # Returns the value of attribute method_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138 - def method_iseq; end - - # Returns the value of attribute method_name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138 - def method_name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1170 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1153 - def to_a(_iseq); end -end - -# ### Summary -# -# `defined` checks if the top value of the stack is defined. If it is, it -# pushes its value onto the stack. Otherwise it pushes `nil`. -# -# ### Usage -# -# ~~~ruby -# defined?(x) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#859 -class SyntaxTree::YARV::Defined < ::SyntaxTree::YARV::Instruction - # @return [Defined] a new instance of Defined - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#880 - def initialize(type, name, message); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#939 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#956 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#935 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#886 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#944 - def length; end - - # Returns the value of attribute message. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 - def message; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#948 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#952 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#931 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 - def type; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#872 -SyntaxTree::YARV::Defined::TYPE_ASGN = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#865 -SyntaxTree::YARV::Defined::TYPE_CONST = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#876 -SyntaxTree::YARV::Defined::TYPE_CONST_FROM = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#864 -SyntaxTree::YARV::Defined::TYPE_CVAR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#873 -SyntaxTree::YARV::Defined::TYPE_EXPR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#871 -SyntaxTree::YARV::Defined::TYPE_FALSE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#875 -SyntaxTree::YARV::Defined::TYPE_FUNC = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#863 -SyntaxTree::YARV::Defined::TYPE_GVAR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#861 -SyntaxTree::YARV::Defined::TYPE_IVAR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#862 -SyntaxTree::YARV::Defined::TYPE_LVAR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#866 -SyntaxTree::YARV::Defined::TYPE_METHOD = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#860 -SyntaxTree::YARV::Defined::TYPE_NIL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#874 -SyntaxTree::YARV::Defined::TYPE_REF = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#869 -SyntaxTree::YARV::Defined::TYPE_SELF = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#870 -SyntaxTree::YARV::Defined::TYPE_TRUE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#867 -SyntaxTree::YARV::Defined::TYPE_YIELD = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#868 -SyntaxTree::YARV::Defined::TYPE_ZSUPER = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `definedivar` checks if an instance variable is defined. It is a -# specialization of the `defined` instruction. It accepts three arguments: -# the name of the instance variable, an inline cache, and the string that -# should be pushed onto the stack in the event that the instance variable -# is defined. -# -# ### Usage -# -# ~~~ruby -# defined?(@value) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1011 -class SyntaxTree::YARV::DefinedIVar < ::SyntaxTree::YARV::Instruction - # @return [DefinedIVar] a new instance of DefinedIVar - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1014 - def initialize(name, cache, message); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1035 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1048 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1031 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1020 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1040 - def length; end - - # Returns the value of attribute message. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 - def message; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1044 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1027 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#5 -class SyntaxTree::YARV::Disassembler - # @return [Disassembler] a new instance of Disassembler - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#46 - def initialize(current_iseq = T.unsafe(nil)); end - - # Helpers for various instructions - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#58 - def calldata(value); end - - # Returns the value of attribute current_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44 - def current_iseq; end - - # Sets the attribute current_iseq - # - # @param value the value to set the attribute current_iseq to. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44 - def current_iseq=(_arg0); end - - # Returns the value of attribute current_prefix. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#43 - def current_prefix; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#62 - def enqueue(iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#66 - def event(name); end - - # Entrypoints - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#116 - def format!; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#123 - def format_insns!(insns, length = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#87 - def inline_storage(cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#91 - def instruction(name, operands = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#95 - def label(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#99 - def local(index, explicit: T.unsafe(nil), implicit: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#108 - def object(value); end - - # Returns the value of attribute output. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41 - def output; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#167 - def print(string); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#171 - def puts(string); end - - # Returns the value of attribute queue. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41 - def queue; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#175 - def string; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#179 - def with_prefix(value); end - - private - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#192 - def format_iseq(iseq); end -end - -# This class is another object that handles disassembling a YARV -# instruction sequence but it renders it without any of the extra spacing -# or alignment. -# -# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#9 -class SyntaxTree::YARV::Disassembler::Squished - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#10 - def calldata(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#14 - def enqueue(iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#17 - def event(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#20 - def inline_storage(cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#24 - def instruction(name, operands = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#28 - def label(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#32 - def local(index, **_arg1); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#36 - def object(value); end -end - -# ### Summary -# -# `dup` copies the top value of the stack and pushes it onto the stack. -# -# ### Usage -# -# ~~~ruby -# $global = 5 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1206 -class SyntaxTree::YARV::Dup < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1219 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1231 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1215 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1207 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1223 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1227 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1235 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1211 - def to_a(_iseq); end -end - -# ### Summary -# -# `duparray` dups an Array literal and pushes it onto the stack. -# -# ### Usage -# -# ~~~ruby -# [true] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1250 -class SyntaxTree::YARV::DupArray < ::SyntaxTree::YARV::Instruction - # @return [DupArray] a new instance of DupArray - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1253 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1269 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1281 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1265 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1257 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1273 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1251 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1277 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1261 - def to_a(_iseq); end -end - -# ### Summary -# -# `duphash` dups a Hash literal and pushes it onto the stack. -# -# ### Usage -# -# ~~~ruby -# { a: 1 } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1296 -class SyntaxTree::YARV::DupHash < ::SyntaxTree::YARV::Instruction - # @return [DupHash] a new instance of DupHash - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1299 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1315 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1327 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1311 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1303 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1319 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1297 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1323 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1307 - def to_a(_iseq); end -end - -# ### Summary -# -# `dupn` duplicates the top `n` stack elements. -# -# ### Usage -# -# ~~~ruby -# Object::X ||= true -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1342 -class SyntaxTree::YARV::DupN < ::SyntaxTree::YARV::Instruction - # @return [DupN] a new instance of DupN - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1345 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1361 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1373 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1357 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1349 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1365 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1343 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1369 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1353 - def to_a(_iseq); end -end - -# ### Summary -# -# `expandarray` looks at the top of the stack, and if the value is an array -# it replaces it on the stack with `number` elements of the array, or `nil` -# if the elements are missing. -# -# ### Usage -# -# ~~~ruby -# x, = [true, false, nil] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1392 -class SyntaxTree::YARV::ExpandArray < ::SyntaxTree::YARV::Instruction - # @return [ExpandArray] a new instance of ExpandArray - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1395 - def initialize(number, flags); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1412 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1429 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1408 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1400 - def disasm(fmt); end - - # Returns the value of attribute flags. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393 - def flags; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1417 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1421 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1425 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1404 - def to_a(_iseq); end -end - -# ### Summary -# -# `getblockparam` is a similar instruction to `getlocal` in that it looks -# for a local variable in the current instruction sequence's local table and -# walks recursively up the parent instruction sequences until it finds it. -# The local it retrieves, however, is a special block local that was passed -# to the current method. It pushes the value of the block local onto the -# stack. -# -# ### Usage -# -# ~~~ruby -# def foo(&block) -# block -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1486 -class SyntaxTree::YARV::GetBlockParam < ::SyntaxTree::YARV::Instruction - # @return [GetBlockParam] a new instance of GetBlockParam - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1489 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1508 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1521 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1504 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1494 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1513 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1517 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1498 - def to_a(iseq); end -end - -# ### Summary -# -# `getblockparamproxy` is almost the same as `getblockparam` except that it -# pushes a proxy object onto the stack instead of the actual value of the -# block local. This is used when a method is being called on the block -# local. -# -# ### Usage -# -# ~~~ruby -# def foo(&block) -# block.call -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1541 -class SyntaxTree::YARV::GetBlockParamProxy < ::SyntaxTree::YARV::Instruction - # @return [GetBlockParamProxy] a new instance of GetBlockParamProxy - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1544 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1566 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1579 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1562 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1549 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1571 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1575 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1556 - def to_a(iseq); end -end - -# ### Summary -# -# `getclassvariable` looks for a class variable in the current class and -# pushes its value onto the stack. It uses an inline cache to reduce the -# need to lookup the class variable in the class hierarchy every time. -# -# ### Usage -# -# ~~~ruby -# @@class_variable -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1596 -class SyntaxTree::YARV::GetClassVariable < ::SyntaxTree::YARV::Instruction - # @return [GetClassVariable] a new instance of GetClassVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1599 - def initialize(name, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1619 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1632 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1615 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1604 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1624 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1628 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1611 - def to_a(_iseq); end -end - -# ### Summary -# -# `getconstant` performs a constant lookup and pushes the value of the -# constant onto the stack. It pops both the class it should look in and -# whether or not it should look globally as well. -# -# ### Usage -# -# ~~~ruby -# Constant -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1651 -class SyntaxTree::YARV::GetConstant < ::SyntaxTree::YARV::Instruction - # @return [GetConstant] a new instance of GetConstant - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1654 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1670 - def ==(other); end - - # @raise [NameError] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1686 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1666 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1658 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1674 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1652 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1678 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1682 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1662 - def to_a(_iseq); end -end - -# ### Summary -# -# `getglobal` pushes the value of a global variables onto the stack. -# -# ### Usage -# -# ~~~ruby -# $$ -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1717 -class SyntaxTree::YARV::GetGlobal < ::SyntaxTree::YARV::Instruction - # @return [GetGlobal] a new instance of GetGlobal - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1720 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1736 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1748 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1732 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1724 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1740 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1718 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1744 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1728 - def to_a(_iseq); end -end - -# ### Summary -# -# `getinstancevariable` pushes the value of an instance variable onto the -# stack. It uses an inline cache to avoid having to look up the instance -# variable in the class hierarchy every time. -# -# This instruction has two forms, but both have the same structure. Before -# Ruby 3.2, the inline cache corresponded to both the get and set -# instructions and could be shared. Since Ruby 3.2, it uses object shapes -# instead so the caches are unique per instruction. -# -# ### Usage -# -# ~~~ruby -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1772 -class SyntaxTree::YARV::GetInstanceVariable < ::SyntaxTree::YARV::Instruction - # @return [GetInstanceVariable] a new instance of GetInstanceVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1775 - def initialize(name, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1795 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1808 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1791 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1780 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1800 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1804 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1787 - def to_a(_iseq); end -end - -# ### Summary -# -# `getlocal` fetches the value of a local variable from a frame determined -# by the level and index arguments. The level is the number of frames back -# to look and the index is the index in the local table. It pushes the value -# it finds onto the stack. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# tap { tap { value } } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1828 -class SyntaxTree::YARV::GetLocal < ::SyntaxTree::YARV::Instruction - # @return [GetLocal] a new instance of GetLocal - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1831 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1850 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1862 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1846 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1836 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1854 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1858 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1840 - def to_a(iseq); end -end - -# ### Summary -# -# `getlocal_WC_0` is a specialized version of the `getlocal` instruction. It -# fetches the value of a local variable from the current frame determined by -# the index given as its only argument. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# value -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1880 -class SyntaxTree::YARV::GetLocalWC0 < ::SyntaxTree::YARV::Instruction - # @return [GetLocalWC0] a new instance of GetLocalWC0 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1883 - def initialize(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1899 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1915 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1911 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1895 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1887 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1881 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1903 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1907 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1891 - def to_a(iseq); end -end - -# ### Summary -# -# `getlocal_WC_1` is a specialized version of the `getlocal` instruction. It -# fetches the value of a local variable from the parent frame determined by -# the index given as its only argument. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# self.then { value } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1933 -class SyntaxTree::YARV::GetLocalWC1 < ::SyntaxTree::YARV::Instruction - # @return [GetLocalWC1] a new instance of GetLocalWC1 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1936 - def initialize(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1952 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1968 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1964 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1948 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1940 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1934 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1956 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1960 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1944 - def to_a(iseq); end -end - -# ### Summary -# -# `getspecial` pushes the value of a special local variable onto the stack. -# -# ### Usage -# -# ~~~ruby -# 1 if (a == 1) .. (b == 2) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1983 -class SyntaxTree::YARV::GetSpecial < ::SyntaxTree::YARV::Instruction - # @return [GetSpecial] a new instance of GetSpecial - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1990 - def initialize(key, type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2007 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2019 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2003 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1995 - def disasm(fmt); end - - # Returns the value of attribute key. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988 - def key; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2011 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2015 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1999 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988 - def type; end -end - -# $~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1985 -SyntaxTree::YARV::GetSpecial::SVAR_BACKREF = T.let(T.unsafe(nil), Integer) - -# flipflop -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1986 -SyntaxTree::YARV::GetSpecial::SVAR_FLIPFLOP_START = T.let(T.unsafe(nil), Integer) - -# $_ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1984 -SyntaxTree::YARV::GetSpecial::SVAR_LASTLINE = T.let(T.unsafe(nil), Integer) - -# This is a base class for all YARV instructions. It provides a few -# convenience methods for working with instructions. -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#7 -class SyntaxTree::YARV::Instruction - # This returns an array of labels. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#33 - def branch_targets; end - - # This method creates an instruction that represents the canonical - # (non-specialized) form of this instruction. If this instruction is not - # a specialized instruction, then this method returns `self`. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#11 - def canonical; end - - # Whether or not this instruction falls through to the next instruction if - # its branching fails. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#44 - def falls_through?; end - - # Whether or not this instruction leaves the current frame. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#38 - def leaves?; end - - # This returns the size of the instruction in terms of the number of slots - # it occupies in the instruction sequence. Effectively this is 1 plus the - # number of operands. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#18 - def length; end - - # This returns the number of values that are popped off the stack. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#28 - def pops; end - - # This returns the number of values that are pushed onto the stack. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#23 - def pushes; end - - # Does the instruction have side effects? Control-flow counts as a - # side-effect, as do some special-case instructions like Leave. By default - # every instruction is marked as having side effects. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#51 - def side_effects?; end -end - -# This class is meant to mirror RubyVM::InstructionSequence. It contains a -# list of instructions along with the metadata pertaining to them. It also -# functions as a builder for the instruction sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#9 -class SyntaxTree::YARV::InstructionSequence - # @return [InstructionSequence] a new instance of InstructionSequence - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#168 - def initialize(name, file, line, type, parent_iseq = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#652 - def adjuststack(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#656 - def anytostring; end - - # Returns the value of attribute argument_options. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#143 - def argument_options; end - - # This is the list of information about the arguments to this - # instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 - def argument_size; end - - # This is the list of information about the arguments to this - # instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 - def argument_size=(_arg0); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#472 - def block_child_iseq(line); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#660 - def branchif(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#664 - def branchnil(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#668 - def branchunless(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#565 - def catch_break(iseq, begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#575 - def catch_ensure(iseq, begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#585 - def catch_next(begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#595 - def catch_redo(begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#605 - def catch_rescue(iseq, begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#615 - def catch_retry(begin_label, end_label, exit_label, restore_sp); end - - # The catch table for this instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#146 - def catch_table; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#672 - def checkkeyword(keyword_bits_index, keyword_index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#676 - def checkmatch(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#680 - def checktype(type); end - - # Child instruction sequence methods - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#468 - def child_iseq(name, line, type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#478 - def class_child_iseq(name, line); end - - # This method converts our linked list of instructions into a final array - # and performs any other compilation steps necessary. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#305 - def compile!; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#684 - def concatarray; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#688 - def concatstrings(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#692 - def defineclass(name, class_iseq, flags); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#696 - def defined(type, name, message); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#700 - def definedivar(name, cache, message); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#709 - def definemethod(name, method_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#713 - def definesmethod(name, method_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#292 - def disasm; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#717 - def dup; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#721 - def duparray(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#725 - def duphash(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#729 - def dupn(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#232 - def eval; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#648 - def event(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#733 - def expandarray(length, flags); end - - # The source location of the instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 - def file; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#737 - def getblockparam(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#741 - def getblockparamproxy(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#745 - def getclassvariable(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#753 - def getconstant(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#757 - def getglobal(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#761 - def getinstancevariable(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#769 - def getlocal(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#788 - def getspecial(key, type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#207 - def inline_storage; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#213 - def inline_storage_for(name); end - - # The hash of names of instance and class variables pointing to the - # index of their associated inline storage. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#156 - def inline_storages; end - - # The list of instructions for this instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#149 - def insns; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#299 - def inspect; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#792 - def intern; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#796 - def invokeblock(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#800 - def invokesuper(calldata, block_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#804 - def jump(label); end - - # Instruction push methods - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#629 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#808 - def leave; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#219 - def length; end - - # The source location of the instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 - def line; end - - # The table of local variables. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#152 - def local_table; end - - # Query methods - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#199 - def local_variable(name, level = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#482 - def method_child_iseq(name, line); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#486 - def module_child_iseq(name, line); end - - # The name of the instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#129 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#812 - def newarray(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#816 - def newarraykwsplat(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#820 - def newhash(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#824 - def newrange(exclude_end); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#828 - def nop; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#832 - def objtostring(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#836 - def once(iseq, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#840 - def opt_aref_with(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#844 - def opt_aset_with(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#848 - def opt_case_dispatch(case_dispatch_hash, else_label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#852 - def opt_getconstant_path(names); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#888 - def opt_getinlinecache(label, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#892 - def opt_setinlinecache(cache); end - - # These are various compilation options provided. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#166 - def options; end - - # The parent instruction sequence, if there is one. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#138 - def parent_iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#896 - def pop; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#633 - def push(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#900 - def putnil; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#904 - def putobject(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#922 - def putself; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#926 - def putspecialobject(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#930 - def putstring(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#934 - def send(calldata, block_iseq = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#938 - def setblockparam(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#942 - def setclassvariable(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#950 - def setconstant(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#954 - def setglobal(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#958 - def setinstancevariable(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#966 - def setlocal(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#985 - def setn(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#989 - def setspecial(key); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#490 - def singleton_class_child_iseq(line); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#341 - def specialize_instructions!; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#993 - def splatarray(flag); end - - # An object that will track the current size of the stack and the - # maximum size of the stack for this instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#163 - def stack; end - - # The index of the next inline storage that will be created. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#159 - def storage_index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#997 - def swap; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1001 - def throw(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#236 - def to_a; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#280 - def to_cfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#284 - def to_dfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#288 - def to_son; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1005 - def topn(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1009 - def toregexp(options, length); end - - # The type of the instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#135 - def type; end - - class << self - # This method will create a new instruction sequence from a serialized - # RubyVM::InstructionSequence object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1015 - def from(source, options = T.unsafe(nil), parent_iseq = T.unsafe(nil)); end - - # This provides a handle to the rb_iseq_load function, which allows you - # to pass a serialized iseq to Ruby and have it return a - # RubyVM::InstructionSequence object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#13 - def iseq_load(iseq); end - end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#510 -class SyntaxTree::YARV::InstructionSequence::CatchBreak < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#511 - def to_a; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#523 -class SyntaxTree::YARV::InstructionSequence::CatchEnsure < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#524 - def to_a; end -end - -# Catch table methods -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#498 -class SyntaxTree::YARV::InstructionSequence::CatchEntry - # @return [CatchEntry] a new instance of CatchEntry - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#501 - def initialize(iseq, begin_label, end_label, exit_label, restore_sp); end - - # Returns the value of attribute begin_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def begin_label; end - - # Returns the value of attribute end_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def end_label; end - - # Returns the value of attribute exit_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def exit_label; end - - # Returns the value of attribute iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def iseq; end - - # Returns the value of attribute restore_sp. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def restore_sp; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#535 -class SyntaxTree::YARV::InstructionSequence::CatchNext < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#536 - def to_a; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#541 -class SyntaxTree::YARV::InstructionSequence::CatchRedo < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#542 - def to_a; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#547 -class SyntaxTree::YARV::InstructionSequence::CatchRescue < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#548 - def to_a; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#559 -class SyntaxTree::YARV::InstructionSequence::CatchRetry < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#560 - def to_a; end -end - -# When the list of instructions is first being created, it's stored as a -# linked list. This is to make it easier to perform peephole optimizations -# and other transformations like instruction specialization. -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#35 -class SyntaxTree::YARV::InstructionSequence::InstructionList - include ::Enumerable - - # @return [InstructionList] a new instance of InstructionList - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#48 - def initialize; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#53 - def each(&_blk); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#58 - def each_node; end - - # Returns the value of attribute head_node. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46 - def head_node; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#68 - def push(instruction); end - - # Returns the value of attribute tail_node. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46 - def tail_node; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#36 -class SyntaxTree::YARV::InstructionSequence::InstructionList::Node - # @return [Node] a new instance of Node - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#39 - def initialize(value, next_node = T.unsafe(nil)); end - - # Returns the value of attribute next_node. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 - def next_node; end - - # Sets the attribute next_node - # - # @param value the value to set the attribute next_node to. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 - def next_node=(_arg0); end - - # Returns the value of attribute value. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 - def value; end - - # Sets the attribute value - # - # @param value the value to set the attribute value to. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 - def value=(_arg0); end -end - -# This represents the destination of instructions that jump. Initially it -# does not track its position so that when we perform optimizations the -# indices don't get messed up. -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#107 -class SyntaxTree::YARV::InstructionSequence::Label - # @return [Label] a new instance of Label - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#115 - def initialize(name = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#123 - def inspect; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#108 - def name; end - - # When we're serializing the instruction sequence, we need to be able to - # look up the label from the branch instructions and then access the - # subsequent node. So we'll store the reference here. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113 - def node; end - - # When we're serializing the instruction sequence, we need to be able to - # look up the label from the branch instructions and then access the - # subsequent node. So we'll store the reference here. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113 - def node=(_arg0); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#119 - def patch!(name); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#83 -SyntaxTree::YARV::InstructionSequence::MAGIC = T.let(T.unsafe(nil), String) - -# This object is used to track the size of the stack at any given time. It -# is effectively a mini symbolic interpreter. It's necessary because when -# instruction sequences get serialized they include a :stack_max field on -# them. This field is used to determine how much stack space to allocate -# for the instruction sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#90 -class SyntaxTree::YARV::InstructionSequence::Stack - # @return [Stack] a new instance of Stack - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#93 - def initialize; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#98 - def change_by(value); end - - # Returns the value of attribute current_size. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91 - def current_size; end - - # Returns the value of attribute maximum_size. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91 - def maximum_size; end -end - -# ### Summary -# -# `intern` converts the top element of the stack to a symbol and pushes the -# symbol onto the stack. -# -# ### Usage -# -# ~~~ruby -# :"#{"foo"}" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2042 -class SyntaxTree::YARV::Intern < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2055 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2067 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2051 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2043 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2059 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2063 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2047 - def to_a(_iseq); end -end - -# ### Summary -# -# `invokeblock` invokes the block given to the current method. It pops the -# arguments for the block off the stack and pushes the result of running the -# block onto the stack. -# -# ### Usage -# -# ~~~ruby -# def foo -# yield -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2086 -class SyntaxTree::YARV::InvokeBlock < ::SyntaxTree::YARV::Instruction - # @return [InvokeBlock] a new instance of InvokeBlock - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2089 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2105 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2121 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2087 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2101 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2093 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2109 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2113 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2117 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2097 - def to_a(_iseq); end -end - -# ### Summary -# -# `invokesuper` is similar to the `send` instruction, except that it calls -# the super method. It pops the receiver and arguments off the stack and -# pushes the return value onto the stack. -# -# ### Usage -# -# ~~~ruby -# def foo -# super -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2140 -class SyntaxTree::YARV::InvokeSuper < ::SyntaxTree::YARV::Instruction - # @return [InvokeSuper] a new instance of InvokeSuper - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2143 - def initialize(calldata, block_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2164 - def ==(other); end - - # Returns the value of attribute block_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141 - def block_iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2178 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2160 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2148 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2169 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2174 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2156 - def to_a(_iseq); end -end - -# ### Summary -# -# `jump` unconditionally jumps to the label given as its only argument. -# -# ### Usage -# -# ~~~ruby -# x = 0 -# if x == 0 -# puts "0" -# else -# puts "2" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2217 -class SyntaxTree::YARV::Jump < ::SyntaxTree::YARV::Instruction - # @return [Jump] a new instance of Jump - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2220 - def initialize(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2236 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2248 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2244 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2232 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2224 - def disasm(fmt); end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2218 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2240 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2228 - def to_a(_iseq); end -end - -# ### Summary -# -# `leave` exits the current frame. -# -# ### Usage -# -# ~~~ruby -# ;; -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2263 -class SyntaxTree::YARV::Leave < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2276 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2290 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2272 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2264 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2294 - def leaves?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2280 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2284 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2268 - def to_a(_iseq); end -end - -# This module contains the instructions that used to be a part of YARV but -# have been replaced or removed in more recent versions. -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#7 -module SyntaxTree::YARV::Legacy; end - -# ### Summary -# -# `getclassvariable` looks for a class variable in the current class and -# pushes its value onto the stack. -# -# This version of the `getclassvariable` instruction is no longer used -# since in Ruby 3.0 it gained an inline cache.` -# -# ### Usage -# -# ~~~ruby -# @@class_variable -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#22 -class SyntaxTree::YARV::Legacy::GetClassVariable < ::SyntaxTree::YARV::Instruction - # @return [GetClassVariable] a new instance of GetClassVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#25 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#41 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#57 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#53 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#37 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#29 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#45 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#23 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#49 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#33 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_getinlinecache` is a wrapper around a series of `putobject` and -# `getconstant` instructions that allows skipping past them if the inline -# cache is currently set. It pushes the value of the cache onto the stack -# if it is set, otherwise it pushes `nil`. -# -# This instruction is no longer used since in Ruby 3.2 it was replaced by -# the consolidated `opt_getconstant_path` instruction. -# -# ### Usage -# -# ~~~ruby -# Constant -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#78 -class SyntaxTree::YARV::Legacy::OptGetInlineCache < ::SyntaxTree::YARV::Instruction - # @return [OptGetInlineCache] a new instance of OptGetInlineCache - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#81 - def initialize(label, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#101 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#118 - def branch_targets; end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#114 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#97 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#86 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#122 - def falls_through?; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#106 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#110 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#93 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_newarray_max` is a specialization that occurs when the `max` method -# is called on an array literal. It pops the values of the array off the -# stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# [a, b, c].max -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#139 -class SyntaxTree::YARV::Legacy::OptNewArrayMax < ::SyntaxTree::YARV::Instruction - # @return [OptNewArrayMax] a new instance of OptNewArrayMax - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#142 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#158 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#174 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#154 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#146 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#162 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#140 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#166 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#170 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#150 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_newarray_min` is a specialization that occurs when the `min` method -# is called on an array literal. It pops the values of the array off the -# stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# [a, b, c].min -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#191 -class SyntaxTree::YARV::Legacy::OptNewArrayMin < ::SyntaxTree::YARV::Instruction - # @return [OptNewArrayMin] a new instance of OptNewArrayMin - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#194 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#210 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#226 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#206 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#198 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#214 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#192 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#218 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#222 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#202 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_setinlinecache` sets an inline cache for a constant lookup. It pops -# the value it should set off the top of the stack. It uses this value to -# set the cache. It then pushes that value back onto the top of the stack. -# -# This instruction is no longer used since in Ruby 3.2 it was replaced by -# the consolidated `opt_getconstant_path` instruction. -# -# ### Usage -# -# ~~~ruby -# Constant -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#246 -class SyntaxTree::YARV::Legacy::OptSetInlineCache < ::SyntaxTree::YARV::Instruction - # @return [OptSetInlineCache] a new instance of OptSetInlineCache - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#249 - def initialize(cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#265 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#247 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#281 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#261 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#253 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#269 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#273 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#277 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#257 - def to_a(_iseq); end -end - -# ### Summary -# -# `setclassvariable` looks for a class variable in the current class and -# sets its value to the value it pops off the top of the stack. -# -# This version of the `setclassvariable` instruction is no longer used -# since in Ruby 3.0 it gained an inline cache. -# -# ### Usage -# -# ~~~ruby -# @@class_variable = 1 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#299 -class SyntaxTree::YARV::Legacy::SetClassVariable < ::SyntaxTree::YARV::Instruction - # @return [SetClassVariable] a new instance of SetClassVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#302 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#318 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#334 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#330 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#314 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#306 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#322 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#300 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#326 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#310 - def to_a(_iseq); end -end - -# This represents every local variable associated with an instruction -# sequence. There are two kinds of locals: plain locals that are what you -# expect, and block proxy locals, which represent local variables -# associated with blocks that were passed into the current instruction -# sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#10 -class SyntaxTree::YARV::LocalTable - # @return [LocalTable] a new instance of LocalTable - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#43 - def initialize; end - - # Add a BlockLocal to the local table. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#73 - def block(name); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#47 - def empty?; end - - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#51 - def find(name, level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#56 - def has?(name); end - - # Returns the value of attribute locals. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#41 - def locals; end - - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#64 - def name_at(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#60 - def names; end - - # This is the offset from the top of the stack where this local variable - # lives. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#84 - def offset(index); end - - # Add a PlainLocal to the local table. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#78 - def plain(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#68 - def size; end -end - -# A local representing a block passed into the current instruction -# sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#13 -class SyntaxTree::YARV::LocalTable::BlockLocal - # @return [BlockLocal] a new instance of BlockLocal - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#16 - def initialize(name); end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#14 - def name; end -end - -# The result of looking up a local variable in the current local table. -# -# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#31 -class SyntaxTree::YARV::LocalTable::Lookup - # @return [Lookup] a new instance of Lookup - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#34 - def initialize(local, index, level); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 - def index; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 - def level; end - - # Returns the value of attribute local. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 - def local; end -end - -# A regular local variable. -# -# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#22 -class SyntaxTree::YARV::LocalTable::PlainLocal - # @return [PlainLocal] a new instance of PlainLocal - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#25 - def initialize(name); end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#23 - def name; end -end - -# ### Summary -# -# `newarray` puts a new array initialized with `number` values from the -# stack. It pops `number` values off the stack and pushes the array onto the -# stack. -# -# ### Usage -# -# ~~~ruby -# ["string"] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2311 -class SyntaxTree::YARV::NewArray < ::SyntaxTree::YARV::Instruction - # @return [NewArray] a new instance of NewArray - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2314 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2330 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2346 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2326 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2318 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2334 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2312 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2338 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2342 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2322 - def to_a(_iseq); end -end - -# ### Summary -# -# `newarraykwsplat` is a specialized version of `newarray` that takes a ** -# splat argument. It pops `number` values off the stack and pushes the array -# onto the stack. -# -# ### Usage -# -# ~~~ruby -# ["string", **{ foo: "bar" }] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2363 -class SyntaxTree::YARV::NewArrayKwSplat < ::SyntaxTree::YARV::Instruction - # @return [NewArrayKwSplat] a new instance of NewArrayKwSplat - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2366 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2382 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2398 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2378 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2370 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2386 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2364 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2390 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2394 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2374 - def to_a(_iseq); end -end - -# ### Summary -# -# `newhash` puts a new hash onto the stack, using `number` elements from the -# stack. `number` needs to be even. It pops `number` elements off the stack -# and pushes a hash onto the stack. -# -# ### Usage -# -# ~~~ruby -# def foo(key, value) -# { key => value } -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2417 -class SyntaxTree::YARV::NewHash < ::SyntaxTree::YARV::Instruction - # @return [NewHash] a new instance of NewHash - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2420 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2436 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2452 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2432 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2424 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2440 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2418 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2444 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2448 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2428 - def to_a(_iseq); end -end - -# ### Summary -# -# `newrange` creates a new range object from the top two values on the -# stack. It pops both of them off, and then pushes on the new range. It -# takes one argument which is 0 if the end is included or 1 if the end value -# is excluded. -# -# ### Usage -# -# ~~~ruby -# x = 0 -# y = 1 -# p (x..y), (x...y) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2472 -class SyntaxTree::YARV::NewRange < ::SyntaxTree::YARV::Instruction - # @return [NewRange] a new instance of NewRange - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2475 - def initialize(exclude_end); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2491 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2507 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2487 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2479 - def disasm(fmt); end - - # Returns the value of attribute exclude_end. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2473 - def exclude_end; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2495 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2499 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2503 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2483 - def to_a(_iseq); end -end - -# ### Summary -# -# `nop` is a no-operation instruction. It is used to pad the instruction -# sequence so there is a place for other instructions to jump to. -# -# ### Usage -# -# ~~~ruby -# raise rescue true -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2523 -class SyntaxTree::YARV::Nop < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2536 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2540 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2532 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2524 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2543 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2528 - def to_a(_iseq); end -end - -# ### Summary -# -# `objtostring` pops a value from the stack, calls `to_s` on that value and -# then pushes the result back to the stack. -# -# It has various fast paths for classes like String, Symbol, Module, Class, -# etc. For everything else it calls `to_s`. -# -# ### Usage -# -# ~~~ruby -# "#{5}" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2562 -class SyntaxTree::YARV::ObjToString < ::SyntaxTree::YARV::Instruction - # @return [ObjToString] a new instance of ObjToString - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2565 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2581 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2597 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2563 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2577 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2569 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2585 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2589 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2593 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2573 - def to_a(_iseq); end -end - -# ### Summary -# -# `once` is an instruction that wraps an instruction sequence and ensures -# that is it only ever executed once for the lifetime of the program. It -# uses a cache to ensure that it is only executed once. It pushes the result -# of running the instruction sequence onto the stack. -# -# ### Usage -# -# ~~~ruby -# END { puts "END" } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2615 -class SyntaxTree::YARV::Once < ::SyntaxTree::YARV::Instruction - # @return [Once] a new instance of Once - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2618 - def initialize(iseq, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2636 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2648 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2632 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2623 - def disasm(fmt); end - - # Returns the value of attribute iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616 - def iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2640 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2644 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2628 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_and` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `&` operator is used. There is a fast path for if -# both operands are integers. It pops both the receiver and the argument off -# the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 & 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2668 -class SyntaxTree::YARV::OptAnd < ::SyntaxTree::YARV::Instruction - # @return [OptAnd] a new instance of OptAnd - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2671 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2687 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2707 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2669 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2703 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2683 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2675 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2691 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2695 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2699 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2679 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_aref` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `[]` operator is used. There are fast paths if the -# receiver is an integer, array, or hash. -# -# ### Usage -# -# ~~~ruby -# 7[2] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2724 -class SyntaxTree::YARV::OptAref < ::SyntaxTree::YARV::Instruction - # @return [OptAref] a new instance of OptAref - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2727 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2743 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2763 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2725 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2759 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2739 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2731 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2747 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2751 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2755 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2735 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_aref_with` is a specialization of the `opt_aref` instruction that -# occurs when the `[]` operator is used with a string argument known at -# compile time. There are fast paths if the receiver is a hash. It pops the -# receiver off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# { 'test' => true }['test'] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2781 -class SyntaxTree::YARV::OptArefWith < ::SyntaxTree::YARV::Instruction - # @return [OptArefWith] a new instance of OptArefWith - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2784 - def initialize(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2804 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2821 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2800 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2789 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2809 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2813 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2817 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2796 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_aset` is an instruction for setting the hash value by the key in -# the `recv[obj] = set` format. It is a specialization of the -# `opt_send_without_block` instruction. It pops the receiver, the key, and -# the value off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# {}[:key] = value -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2839 -class SyntaxTree::YARV::OptAset < ::SyntaxTree::YARV::Instruction - # @return [OptAset] a new instance of OptAset - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2842 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2858 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2878 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2840 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2874 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2854 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2846 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2862 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2866 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2870 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2850 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_aset_with` is an instruction for setting the hash value by the known -# string key in the `recv[obj] = set` format. It pops the receiver and the -# value off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# {}["key"] = value -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2895 -class SyntaxTree::YARV::OptAsetWith < ::SyntaxTree::YARV::Instruction - # @return [OptAsetWith] a new instance of OptAsetWith - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2898 - def initialize(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2918 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2935 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2914 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2903 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2923 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2927 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2931 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2910 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_case_dispatch` is a branch instruction that moves the control flow -# for case statements that have clauses where they can all be used as hash -# keys for an internal hash. -# -# It has two arguments: the `case_dispatch_hash` and an `else_label`. It -# pops one value off the stack: a hash key. `opt_case_dispatch` looks up the -# key in the `case_dispatch_hash` and jumps to the corresponding label if -# there is one. If there is no value in the `case_dispatch_hash`, -# `opt_case_dispatch` jumps to the `else_label` index. -# -# ### Usage -# -# ~~~ruby -# case 1 -# when 1 -# puts "foo" -# else -# puts "bar" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2964 -class SyntaxTree::YARV::OptCaseDispatch < ::SyntaxTree::YARV::Instruction - # @return [OptCaseDispatch] a new instance of OptCaseDispatch - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2967 - def initialize(case_dispatch_hash, else_label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2991 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3009 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3005 - def call(vm); end - - # Returns the value of attribute case_dispatch_hash. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965 - def case_dispatch_hash; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2987 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2972 - def disasm(fmt); end - - # Returns the value of attribute else_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965 - def else_label; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3013 - def falls_through?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2997 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3001 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2979 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_div` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `/` operator is used. There are fast paths for if -# both operands are integers, or if both operands are floats. It pops both -# the receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 / 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3031 -class SyntaxTree::YARV::OptDiv < ::SyntaxTree::YARV::Instruction - # @return [OptDiv] a new instance of OptDiv - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3034 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3050 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3070 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3032 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3066 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3046 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3038 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3054 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3058 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3062 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3042 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_empty_p` is an optimization applied when the method `empty?` is -# called. It pops the receiver off the stack and pushes on the result of the -# method call. -# -# ### Usage -# -# ~~~ruby -# "".empty? -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3087 -class SyntaxTree::YARV::OptEmptyP < ::SyntaxTree::YARV::Instruction - # @return [OptEmptyP] a new instance of OptEmptyP - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3090 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3106 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3126 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3088 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3122 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3102 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3094 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3110 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3114 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3118 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3098 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_eq` is a specialization of the `opt_send_without_block` instruction -# that occurs when the == operator is used. Fast paths exist when both -# operands are integers, floats, symbols or strings. It pops both the -# receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 == 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3144 -class SyntaxTree::YARV::OptEq < ::SyntaxTree::YARV::Instruction - # @return [OptEq] a new instance of OptEq - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3147 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3163 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3183 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3145 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3179 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3159 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3151 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3167 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3171 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3175 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3155 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_ge` is a specialization of the `opt_send_without_block` instruction -# that occurs when the >= operator is used. Fast paths exist when both -# operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 4 >= 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3201 -class SyntaxTree::YARV::OptGE < ::SyntaxTree::YARV::Instruction - # @return [OptGE] a new instance of OptGE - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3204 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3220 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3240 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3202 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3236 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3216 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3208 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3224 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3228 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3232 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3212 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_gt` is a specialization of the `opt_send_without_block` instruction -# that occurs when the > operator is used. Fast paths exist when both -# operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 4 > 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3314 -class SyntaxTree::YARV::OptGT < ::SyntaxTree::YARV::Instruction - # @return [OptGT] a new instance of OptGT - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3317 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3333 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3353 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3315 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3349 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3329 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3321 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3337 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3341 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3345 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3325 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_getconstant_path` performs a constant lookup on a chain of constant -# names. It accepts as its argument an array of constant names, and pushes -# the value of the constant onto the stack. -# -# ### Usage -# -# ~~~ruby -# ::Object -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3257 -class SyntaxTree::YARV::OptGetConstantPath < ::SyntaxTree::YARV::Instruction - # @return [OptGetConstantPath] a new instance of OptGetConstantPath - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3260 - def initialize(names); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3277 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3289 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3273 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3264 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3281 - def length; end - - # Returns the value of attribute names. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3258 - def names; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3285 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3269 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_le` is a specialization of the `opt_send_without_block` instruction -# that occurs when the <= operator is used. Fast paths exist when both -# operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 3 <= 4 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3371 -class SyntaxTree::YARV::OptLE < ::SyntaxTree::YARV::Instruction - # @return [OptLE] a new instance of OptLE - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3374 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3390 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3410 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3372 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3406 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3386 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3378 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3394 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3398 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3402 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3382 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_lt` is a specialization of the `opt_send_without_block` instruction -# that occurs when the < operator is used. Fast paths exist when both -# operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 3 < 4 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3485 -class SyntaxTree::YARV::OptLT < ::SyntaxTree::YARV::Instruction - # @return [OptLT] a new instance of OptLT - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3488 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3504 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3524 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3486 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3520 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3500 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3492 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3508 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3512 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3516 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3496 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_ltlt` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `<<` operator is used. Fast paths exists when the -# receiver is either a String or an Array. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# "" << 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3542 -class SyntaxTree::YARV::OptLTLT < ::SyntaxTree::YARV::Instruction - # @return [OptLTLT] a new instance of OptLTLT - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3545 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3561 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3581 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3543 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3577 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3557 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3549 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3565 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3569 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3573 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3553 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_length` is a specialization of `opt_send_without_block`, when the -# `length` method is called. There are fast paths when the receiver is -# either a string, hash, or array. It pops the receiver off the stack and -# pushes on the result of the method call. -# -# ### Usage -# -# ~~~ruby -# "".length -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3428 -class SyntaxTree::YARV::OptLength < ::SyntaxTree::YARV::Instruction - # @return [OptLength] a new instance of OptLength - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3431 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3447 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3467 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3429 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3463 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3443 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3435 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3451 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3455 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3459 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3439 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_minus` is a specialization of the `opt_send_without_block` -# instruction that occurs when the `-` operator is used. There are fast -# paths for if both operands are integers or if both operands are floats. It -# pops both the receiver and the argument off the stack and pushes on the -# result. -# -# ### Usage -# -# ~~~ruby -# 3 - 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3600 -class SyntaxTree::YARV::OptMinus < ::SyntaxTree::YARV::Instruction - # @return [OptMinus] a new instance of OptMinus - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3603 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3619 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3639 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3601 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3635 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3615 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3607 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3623 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3627 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3631 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3611 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_mod` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `%` operator is used. There are fast paths for if -# both operands are integers or if both operands are floats. It pops both -# the receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 4 % 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3657 -class SyntaxTree::YARV::OptMod < ::SyntaxTree::YARV::Instruction - # @return [OptMod] a new instance of OptMod - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3660 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3676 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3696 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3658 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3692 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3672 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3664 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3680 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3684 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3688 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3668 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_mult` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `*` operator is used. There are fast paths for if -# both operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 3 * 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3714 -class SyntaxTree::YARV::OptMult < ::SyntaxTree::YARV::Instruction - # @return [OptMult] a new instance of OptMult - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3717 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3733 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3753 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3715 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3749 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3729 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3721 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3737 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3741 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3745 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3725 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_neq` is an optimization that tests whether two values at the top of -# the stack are not equal by testing their equality and calling the `!` on -# the result. This allows `opt_neq` to use the fast paths optimized in -# `opt_eq` when both operands are Integers, Floats, Symbols, or Strings. It -# pops both the receiver and the argument off the stack and pushes on the -# result. -# -# ### Usage -# -# ~~~ruby -# 2 != 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3773 -class SyntaxTree::YARV::OptNEq < ::SyntaxTree::YARV::Instruction - # @return [OptNEq] a new instance of OptNEq - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3776 - def initialize(eq_calldata, neq_calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3796 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3813 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3792 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3781 - def disasm(fmt); end - - # Returns the value of attribute eq_calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774 - def eq_calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3801 - def length; end - - # Returns the value of attribute neq_calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774 - def neq_calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3805 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3809 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3788 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_newarray_send` is a specialization that occurs when a dynamic array -# literal is created and immediately sent the `min`, `max`, or `hash` -# methods. It pops the values of the array off the stack and pushes on the -# result of the method call. -# -# ### Usage -# -# ~~~ruby -# [a, b, c].max -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3832 -class SyntaxTree::YARV::OptNewArraySend < ::SyntaxTree::YARV::Instruction - # @return [OptNewArraySend] a new instance of OptNewArraySend - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3835 - def initialize(number, method); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3855 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3872 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3851 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3840 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3860 - def length; end - - # Returns the value of attribute method. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3833 - def method; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3833 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3864 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3868 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3847 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_nil_p` is an optimization applied when the method `nil?` is called. -# It returns true immediately when the receiver is `nil` and defers to the -# `nil?` method in other cases. It pops the receiver off the stack and -# pushes on the result. -# -# ### Usage -# -# ~~~ruby -# "".nil? -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3890 -class SyntaxTree::YARV::OptNilP < ::SyntaxTree::YARV::Instruction - # @return [OptNilP] a new instance of OptNilP - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3893 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3909 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3929 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3891 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3925 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3905 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3897 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3913 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3917 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3921 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3901 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_not` negates the value on top of the stack by calling the `!` method -# on it. It pops the receiver off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# !true -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3945 -class SyntaxTree::YARV::OptNot < ::SyntaxTree::YARV::Instruction - # @return [OptNot] a new instance of OptNot - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3948 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3964 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3984 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3946 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3980 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3960 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3952 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3968 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3972 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3976 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3956 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_or` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `|` operator is used. There is a fast path for if -# both operands are integers. It pops both the receiver and the argument off -# the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 | 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4002 -class SyntaxTree::YARV::OptOr < ::SyntaxTree::YARV::Instruction - # @return [OptOr] a new instance of OptOr - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4005 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4021 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4041 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4003 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4037 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4017 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4009 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4025 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4029 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4033 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4013 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_plus` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `+` operator is used. There are fast paths for if -# both operands are integers, floats, strings, or arrays. It pops both the -# receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 + 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4059 -class SyntaxTree::YARV::OptPlus < ::SyntaxTree::YARV::Instruction - # @return [OptPlus] a new instance of OptPlus - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4062 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4078 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4098 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4060 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4094 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4074 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4066 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4082 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4086 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4090 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4070 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_regexpmatch2` is a specialization of the `opt_send_without_block` -# instruction that occurs when the `=~` operator is used. It pops both the -# receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# /a/ =~ "a" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4115 -class SyntaxTree::YARV::OptRegExpMatch2 < ::SyntaxTree::YARV::Instruction - # @return [OptRegExpMatch2] a new instance of OptRegExpMatch2 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4118 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4134 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4154 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4116 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4150 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4130 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4122 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4138 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4142 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4146 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4126 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_send_without_block` is a specialization of the send instruction that -# occurs when a method is being called without a block. It pops the receiver -# and the arguments off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# puts "Hello, world!" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4171 -class SyntaxTree::YARV::OptSendWithoutBlock < ::SyntaxTree::YARV::Instruction - # @return [OptSendWithoutBlock] a new instance of OptSendWithoutBlock - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4174 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4190 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4210 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4172 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4206 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4186 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4178 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4194 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4198 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4202 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4182 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_size` is a specialization of `opt_send_without_block`, when the -# `size` method is called. There are fast paths when the receiver is either -# a string, hash, or array. It pops the receiver off the stack and pushes on -# the result. -# -# ### Usage -# -# ~~~ruby -# "".size -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4228 -class SyntaxTree::YARV::OptSize < ::SyntaxTree::YARV::Instruction - # @return [OptSize] a new instance of OptSize - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4231 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4247 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4267 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4229 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4263 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4243 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4235 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4251 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4255 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4259 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4239 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_str_freeze` pushes a frozen known string value with no interpolation -# onto the stack using the #freeze method. If the method gets overridden, -# this will fall back to a send. -# -# ### Usage -# -# ~~~ruby -# "hello".freeze -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4284 -class SyntaxTree::YARV::OptStrFreeze < ::SyntaxTree::YARV::Instruction - # @return [OptStrFreeze] a new instance of OptStrFreeze - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4287 - def initialize(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4307 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4320 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4303 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4292 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4312 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4316 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4299 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_str_uminus` pushes a frozen known string value with no interpolation -# onto the stack. If the method gets overridden, this will fall back to a -# send. -# -# ### Usage -# -# ~~~ruby -# -"string" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4337 -class SyntaxTree::YARV::OptStrUMinus < ::SyntaxTree::YARV::Instruction - # @return [OptStrUMinus] a new instance of OptStrUMinus - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4340 - def initialize(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4360 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4373 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4356 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4345 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4365 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4369 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4352 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_succ` is a specialization of the `opt_send_without_block` instruction -# when the method being called is `succ`. Fast paths exist when the receiver -# is either a String or a Fixnum. It pops the receiver off the stack and -# pushes on the result. -# -# ### Usage -# -# ~~~ruby -# "".succ -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4391 -class SyntaxTree::YARV::OptSucc < ::SyntaxTree::YARV::Instruction - # @return [OptSucc] a new instance of OptSucc - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4394 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4410 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4430 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4392 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4426 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4406 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4398 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4414 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4418 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4422 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4402 - def to_a(_iseq); end -end - -# ### Summary -# -# `pop` pops the top value off the stack. -# -# ### Usage -# -# ~~~ruby -# a ||= 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4445 -class SyntaxTree::YARV::Pop < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4458 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4466 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4454 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4446 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4462 - def pops; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4470 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4450 - def to_a(_iseq); end -end - -# ### Summary -# -# `putnil` pushes a global nil object onto the stack. -# -# ### Usage -# -# ~~~ruby -# nil -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4485 -class SyntaxTree::YARV::PutNil < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4498 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4510 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4506 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4494 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4486 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4502 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4514 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4490 - def to_a(_iseq); end -end - -# ### Summary -# -# `putobject` pushes a known value onto the stack. -# -# ### Usage -# -# ~~~ruby -# 5 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4529 -class SyntaxTree::YARV::PutObject < ::SyntaxTree::YARV::Instruction - # @return [PutObject] a new instance of PutObject - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4532 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4548 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4560 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4544 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4536 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4552 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4530 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4556 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4564 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4540 - def to_a(_iseq); end -end - -# ### Summary -# -# `putobject_INT2FIX_0_` pushes 0 on the stack. It is a specialized -# instruction resulting from the operand unification optimization. It is -# equivalent to `putobject 0`. -# -# ### Usage -# -# ~~~ruby -# 0 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4581 -class SyntaxTree::YARV::PutObjectInt2Fix0 < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4594 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4606 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4602 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4590 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4582 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4598 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4610 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4586 - def to_a(_iseq); end -end - -# ### Summary -# -# `putobject_INT2FIX_1_` pushes 1 on the stack. It is a specialized -# instruction resulting from the operand unification optimization. It is -# equivalent to `putobject 1`. -# -# ### Usage -# -# ~~~ruby -# 1 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4627 -class SyntaxTree::YARV::PutObjectInt2Fix1 < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4640 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4652 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4648 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4636 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4628 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4644 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4656 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4632 - def to_a(_iseq); end -end - -# ### Summary -# -# `putself` pushes the current value of self onto the stack. -# -# ### Usage -# -# ~~~ruby -# puts "Hello, world!" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4671 -class SyntaxTree::YARV::PutSelf < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4684 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4692 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4680 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4672 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4688 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4696 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4676 - def to_a(_iseq); end -end - -# ### Summary -# -# `putspecialobject` pushes one of three special objects onto the stack. -# These are either the VM core special object, the class base special -# object, or the constant base special object. -# -# ### Usage -# -# ~~~ruby -# alias foo bar -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4713 -class SyntaxTree::YARV::PutSpecialObject < ::SyntaxTree::YARV::Instruction - # @return [PutSpecialObject] a new instance of PutSpecialObject - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4720 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4736 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4748 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4732 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4724 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4740 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4718 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4744 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4728 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4715 -SyntaxTree::YARV::PutSpecialObject::OBJECT_CBASE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4716 -SyntaxTree::YARV::PutSpecialObject::OBJECT_CONST_BASE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4714 -SyntaxTree::YARV::PutSpecialObject::OBJECT_VMCORE = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `putstring` pushes an unfrozen string literal onto the stack. -# -# ### Usage -# -# ~~~ruby -# "foo" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4772 -class SyntaxTree::YARV::PutString < ::SyntaxTree::YARV::Instruction - # @return [PutString] a new instance of PutString - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4775 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4791 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4803 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4787 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4779 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4795 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4773 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4799 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4783 - def to_a(_iseq); end -end - -# A sea of nodes is an intermediate representation used by a compiler to -# represent both control and data flow in the same graph. The way we use it -# allows us to have the vertices of the graph represent either an -# instruction in the instruction sequence or a synthesized node that we add -# to the graph. The edges of the graph represent either control flow or data -# flow. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#11 -class SyntaxTree::YARV::SeaOfNodes - # @return [SeaOfNodes] a new instance of SeaOfNodes - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#462 - def initialize(dfg, nodes, local_graphs); end - - # Returns the value of attribute dfg. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 - def dfg; end - - # Returns the value of attribute local_graphs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 - def local_graphs; end - - # Returns the value of attribute nodes. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 - def nodes; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#468 - def to_mermaid; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#499 - def verify; end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#529 - def compile(dfg); end - end -end - -# The compiler is responsible for taking a data flow graph and turning it -# into a sea of nodes. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#100 -class SyntaxTree::YARV::SeaOfNodes::Compiler - # @return [Compiler] a new instance of Compiler - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#103 - def initialize(dfg); end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#113 - def compile; end - - # Returns the value of attribute dfg. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101 - def dfg; end - - # Returns the value of attribute nodes. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101 - def nodes; end - - private - - # Eliminate as many unnecessary nodes as we can. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#339 - def cleanup_insn_nodes; end - - # We don't always build things in an optimal way. Go back and fix up - # some mess we left. Ideally we wouldn't create these problems in the - # first place. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#315 - def cleanup_phi_nodes; end - - # Connect one node to another. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#423 - def connect(from, to, type, label = T.unsafe(nil)); end - - # Connect control flow that flows between basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#246 - def connect_local_graphs_control(local_graphs); end - - # Connect data flow that flows between basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#271 - def connect_local_graphs_data(local_graphs); end - - # Connect all of the inputs to all of the outputs of a node. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#433 - def connect_over(node); end - - # Create a sub-graph for a single basic block - block block argument - # inputs and outputs will be left dangling, to be connected later. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#136 - def create_local_graph(block); end - - # Counter for synthetic nodes. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#130 - def id_counter; end - - # Remove a node from the graph. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#447 - def remove(node); end -end - -# The edge of a graph represents either control flow or data flow. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#67 -class SyntaxTree::YARV::SeaOfNodes::Edge - # @return [Edge] a new instance of Edge - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#75 - def initialize(from, to, type, label); end - - # Returns the value of attribute from. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#70 - def from; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#73 - def label; end - - # Returns the value of attribute to. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#71 - def to; end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#72 - def type; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#68 -SyntaxTree::YARV::SeaOfNodes::Edge::TYPES = T.let(T.unsafe(nil), Array) - -# This object represents a node in the graph that holds a YARV -# instruction. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#14 -class SyntaxTree::YARV::SeaOfNodes::InsnNode - # @return [InsnNode] a new instance of InsnNode - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#17 - def initialize(insn, offset); end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#25 - def id; end - - # Returns the value of attribute inputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 - def inputs; end - - # Returns the value of attribute insn. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 - def insn; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#29 - def label; end - - # Returns the value of attribute offset. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 - def offset; end - - # Returns the value of attribute outputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 - def outputs; end -end - -# Merge nodes are present in any block that has multiple incoming blocks. -# It provides a place for Phi nodes to attach their results. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#52 -class SyntaxTree::YARV::SeaOfNodes::MergeNode - # @return [MergeNode] a new instance of MergeNode - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#55 - def initialize(id); end - - # Returns the value of attribute id. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 - def id; end - - # Returns the value of attribute inputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 - def inputs; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#61 - def label; end - - # Returns the value of attribute outputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 - def outputs; end -end - -# Phi nodes are used to represent the merging of data flow from multiple -# incoming blocks. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#36 -class SyntaxTree::YARV::SeaOfNodes::PhiNode - # @return [PhiNode] a new instance of PhiNode - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#39 - def initialize(id); end - - # Returns the value of attribute id. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 - def id; end - - # Returns the value of attribute inputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 - def inputs; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#45 - def label; end - - # Returns the value of attribute outputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 - def outputs; end -end - -# A subgraph represents the local data and control flow of a single basic -# block. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#87 -class SyntaxTree::YARV::SeaOfNodes::SubGraph - # @return [SubGraph] a new instance of SubGraph - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#90 - def initialize(first_fixed, last_fixed, inputs, outputs); end - - # Returns the value of attribute first_fixed. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 - def first_fixed; end - - # Returns the value of attribute inputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 - def inputs; end - - # Returns the value of attribute last_fixed. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 - def last_fixed; end - - # Returns the value of attribute outputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 - def outputs; end -end - -# ### Summary -# -# `send` invokes a method with an optional block. It pops its receiver and -# the arguments for the method off the stack and pushes the return value -# onto the stack. It has two arguments: the calldata for the call site and -# the optional block instruction sequence. -# -# ### Usage -# -# ~~~ruby -# "hello".tap { |i| p i } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4821 -class SyntaxTree::YARV::Send < ::SyntaxTree::YARV::Instruction - # @return [Send] a new instance of Send - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4824 - def initialize(calldata, block_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4845 - def ==(other); end - - # Returns the value of attribute block_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4822 - def block_iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4863 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4822 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4841 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4829 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4850 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4854 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4859 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4837 - def to_a(_iseq); end -end - -# ### Summary -# -# `setblockparam` sets the value of a block local variable on a frame -# determined by the level and index arguments. The level is the number of -# frames back to look and the index is the index in the local table. It pops -# the value it is setting off the stack. -# -# ### Usage -# -# ~~~ruby -# def foo(&bar) -# bar = baz -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4905 -class SyntaxTree::YARV::SetBlockParam < ::SyntaxTree::YARV::Instruction - # @return [SetBlockParam] a new instance of SetBlockParam - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4908 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4927 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4940 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4923 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4913 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4906 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4932 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4906 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4936 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4917 - def to_a(iseq); end -end - -# ### Summary -# -# `setclassvariable` looks for a class variable in the current class and -# sets its value to the value it pops off the top of the stack. It uses an -# inline cache to reduce the need to lookup the class variable in the class -# hierarchy every time. -# -# ### Usage -# -# ~~~ruby -# @@class_variable = 1 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4958 -class SyntaxTree::YARV::SetClassVariable < ::SyntaxTree::YARV::Instruction - # @return [SetClassVariable] a new instance of SetClassVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4961 - def initialize(name, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4981 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4994 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4977 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4966 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4986 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4990 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4973 - def to_a(_iseq); end -end - -# ### Summary -# -# `setconstant` pops two values off the stack: the value to set the -# constant to and the constant base to set it in. -# -# ### Usage -# -# ~~~ruby -# Constant = 1 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5012 -class SyntaxTree::YARV::SetConstant < ::SyntaxTree::YARV::Instruction - # @return [SetConstant] a new instance of SetConstant - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5015 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5031 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5043 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5027 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5019 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5035 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5013 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5039 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5023 - def to_a(_iseq); end -end - -# ### Summary -# -# `setglobal` sets the value of a global variable to a value popped off the -# top of the stack. -# -# ### Usage -# -# ~~~ruby -# $global = 5 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5060 -class SyntaxTree::YARV::SetGlobal < ::SyntaxTree::YARV::Instruction - # @return [SetGlobal] a new instance of SetGlobal - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5063 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5079 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5091 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5075 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5067 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5083 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5061 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5087 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5071 - def to_a(_iseq); end -end - -# ### Summary -# -# `setinstancevariable` pops a value off the top of the stack and then sets -# the instance variable associated with the instruction to that value. -# -# This instruction has two forms, but both have the same structure. Before -# Ruby 3.2, the inline cache corresponded to both the get and set -# instructions and could be shared. Since Ruby 3.2, it uses object shapes -# instead so the caches are unique per instruction. -# -# ### Usage -# -# ~~~ruby -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5114 -class SyntaxTree::YARV::SetInstanceVariable < ::SyntaxTree::YARV::Instruction - # @return [SetInstanceVariable] a new instance of SetInstanceVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5117 - def initialize(name, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5137 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5115 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5150 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5133 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5122 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5142 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5115 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5146 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5129 - def to_a(_iseq); end -end - -# ### Summary -# -# `setlocal` sets the value of a local variable on a frame determined by the -# level and index arguments. The level is the number of frames back to -# look and the index is the index in the local table. It pops the value it -# is setting off the stack. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# tap { tap { value = 10 } } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5170 -class SyntaxTree::YARV::SetLocal < ::SyntaxTree::YARV::Instruction - # @return [SetLocal] a new instance of SetLocal - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5173 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5192 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5204 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5188 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5178 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5171 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5196 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5171 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5200 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5182 - def to_a(iseq); end -end - -# ### Summary -# -# `setlocal_WC_0` is a specialized version of the `setlocal` instruction. It -# sets the value of a local variable on the current frame to the value at -# the top of the stack as determined by the index given as its only -# argument. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5222 -class SyntaxTree::YARV::SetLocalWC0 < ::SyntaxTree::YARV::Instruction - # @return [SetLocalWC0] a new instance of SetLocalWC0 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5225 - def initialize(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5241 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5257 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5253 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5237 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5229 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5223 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5245 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5249 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5233 - def to_a(iseq); end -end - -# ### Summary -# -# `setlocal_WC_1` is a specialized version of the `setlocal` instruction. It -# sets the value of a local variable on the parent frame to the value at the -# top of the stack as determined by the index given as its only argument. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# self.then { value = 10 } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5275 -class SyntaxTree::YARV::SetLocalWC1 < ::SyntaxTree::YARV::Instruction - # @return [SetLocalWC1] a new instance of SetLocalWC1 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5278 - def initialize(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5294 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5310 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5306 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5290 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5282 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5276 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5298 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5302 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5286 - def to_a(iseq); end -end - -# ### Summary -# -# `setn` sets a value in the stack to a value popped off the top of the -# stack. It then pushes that value onto the top of the stack as well. -# -# ### Usage -# -# ~~~ruby -# {}[:key] = 'val' -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5326 -class SyntaxTree::YARV::SetN < ::SyntaxTree::YARV::Instruction - # @return [SetN] a new instance of SetN - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5329 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5345 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5361 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5341 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5333 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5349 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5327 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5353 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5357 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5337 - def to_a(_iseq); end -end - -# ### Summary -# -# `setspecial` pops a value off the top of the stack and sets a special -# local variable to that value. The special local variable is determined by -# the key given as its only argument. -# -# ### Usage -# -# ~~~ruby -# baz if (foo == 1) .. (bar == 1) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5378 -class SyntaxTree::YARV::SetSpecial < ::SyntaxTree::YARV::Instruction - # @return [SetSpecial] a new instance of SetSpecial - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5381 - def initialize(key); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5397 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5409 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5393 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5385 - def disasm(fmt); end - - # Returns the value of attribute key. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5379 - def key; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5401 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5405 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5389 - def to_a(_iseq); end -end - -# ### Summary -# -# `splatarray` coerces the array object at the top of the stack into Array -# by calling `to_a`. It pushes a duplicate of the array if there is a flag, -# and the original array if there isn't one. -# -# ### Usage -# -# ~~~ruby -# x = *(5) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5433 -class SyntaxTree::YARV::SplatArray < ::SyntaxTree::YARV::Instruction - # @return [SplatArray] a new instance of SplatArray - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5436 - def initialize(flag); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5452 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5468 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5448 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5440 - def disasm(fmt); end - - # Returns the value of attribute flag. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5434 - def flag; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5456 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5460 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5464 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5444 - def to_a(_iseq); end -end - -# ### Summary -# -# `swap` swaps the top two elements in the stack. -# -# ### TracePoint -# -# `swap` does not dispatch any events. -# -# ### Usage -# -# ~~~ruby -# !!defined?([[]]) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5507 -class SyntaxTree::YARV::Swap < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5520 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5532 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5516 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5508 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5524 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5528 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5512 - def to_a(_iseq); end -end - -# ### Summary -# -# `throw` pops a value off the top of the stack and throws it. It is caught -# using the instruction sequence's (or an ancestor's) catch table. It pushes -# on the result of throwing the value. -# -# ### Usage -# -# ~~~ruby -# [1, 2, 3].map { break 2 } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5550 -class SyntaxTree::YARV::Throw < ::SyntaxTree::YARV::Instruction - # @return [Throw] a new instance of Throw - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5566 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5582 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5598 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5578 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5570 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5586 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5590 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5594 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5574 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5564 - def type; end - - private - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5625 - def error_backtrace(vm); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5553 -SyntaxTree::YARV::Throw::RUBY_TAG_BREAK = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5559 -SyntaxTree::YARV::Throw::RUBY_TAG_FATAL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5554 -SyntaxTree::YARV::Throw::RUBY_TAG_NEXT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5551 -SyntaxTree::YARV::Throw::RUBY_TAG_NONE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5557 -SyntaxTree::YARV::Throw::RUBY_TAG_RAISE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5556 -SyntaxTree::YARV::Throw::RUBY_TAG_REDO = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5555 -SyntaxTree::YARV::Throw::RUBY_TAG_RETRY = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5552 -SyntaxTree::YARV::Throw::RUBY_TAG_RETURN = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5558 -SyntaxTree::YARV::Throw::RUBY_TAG_THROW = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5561 -SyntaxTree::YARV::Throw::VM_THROW_NO_ESCAPE_FLAG = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5562 -SyntaxTree::YARV::Throw::VM_THROW_STATE_MASK = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `toregexp` pops a number of values off the stack, combines them into a new -# regular expression, and pushes the new regular expression onto the stack. -# -# ### Usage -# -# ~~~ruby -# /foo #{bar}/ -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5700 -class SyntaxTree::YARV::ToRegExp < ::SyntaxTree::YARV::Instruction - # @return [ToRegExp] a new instance of ToRegExp - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5703 - def initialize(options, length); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5720 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5733 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5716 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5708 - def disasm(fmt); end - - # Returns the value of attribute length. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5701 - def length; end - - # Returns the value of attribute options. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5701 - def options; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5725 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5729 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5712 - def to_a(_iseq); end -end - -# ### Summary -# -# `topn` pushes a single value onto the stack that is a copy of the value -# within the stack that is `number` of slots down from the top. -# -# ### Usage -# -# ~~~ruby -# case 3 -# when 1..5 -# puts "foo" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5653 -class SyntaxTree::YARV::TopN < ::SyntaxTree::YARV::Instruction - # @return [TopN] a new instance of TopN - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5656 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5672 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5684 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5668 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5660 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5676 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5654 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5680 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5664 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#8 -class SyntaxTree::YARV::VM - extend ::Forwardable - - # @return [VM] a new instance of VM - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#216 - def initialize(events = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#623 - def catch(tag, &block); end - - # Helper methods for instructions - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#494 - def const_base; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#610 - def eval(source, binding = T.unsafe(nil), filename = T.unsafe(nil), lineno = T.unsafe(nil)); end - - # Returns the value of attribute events. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#209 - def events; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#344 - def find_catch_entry(frame, type); end - - # Returns the value of attribute frame. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#214 - def frame; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#498 - def frame_at(level); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#504 - def frame_svar; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#510 - def frame_yield; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#516 - def frozen_core; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#520 - def jump(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#524 - def leave; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#606 - def load(filepath); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#528 - def local_get(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#532 - def local_set(index, level, value); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pop(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def push(*args, **_arg1, &block); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#598 - def require(filepath); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#549 - def require_internal(filepath, loading: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#602 - def require_relative(filepath); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#543 - def require_resolved(filepath); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#360 - def run_block_frame(iseq, frame, *args, **kwargs, &block); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#366 - def run_class_frame(iseq, clazz); end - - # Helper methods for frames - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#230 - def run_frame(frame); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#370 - def run_method_frame(name, nesting, iseq, _self, *args, **kwargs, &block); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#384 - def run_rescue_frame(iseq, frame, error); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#356 - def run_top_frame(iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#391 - def setup_arguments(iseq, args, kwargs, block); end - - # Returns the value of attribute stack. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#211 - def stack; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#619 - def throw(tag, value = T.unsafe(nil)); end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#222 - def run(iseq); end - end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#48 -class SyntaxTree::YARV::VM::BlockFrame < ::SyntaxTree::YARV::VM::Frame - # @return [BlockFrame] a new instance of BlockFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#49 - def initialize(iseq, parent, stack_index); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#89 -class SyntaxTree::YARV::VM::BreakError < ::SyntaxTree::YARV::VM::ThrownError; end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#64 -class SyntaxTree::YARV::VM::ClassFrame < ::SyntaxTree::YARV::VM::Frame - # @return [ClassFrame] a new instance of ClassFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#65 - def initialize(iseq, parent, stack_index, _self); end -end - -# Methods for overriding runtime behavior -# -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#540 -SyntaxTree::YARV::VM::DLEXT = T.let(T.unsafe(nil), String) - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#205 -SyntaxTree::YARV::VM::FROZEN_CORE = T.let(T.unsafe(nil), SyntaxTree::YARV::VM::FrozenCore) - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#25 -class SyntaxTree::YARV::VM::Frame - # @return [Frame] a new instance of Frame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#29 - def initialize(iseq, parent, stack_index, _self, nesting); end - - # Returns the value of attribute _self. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def _self; end - - # Returns the value of attribute iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def iseq; end - - # Returns the value of attribute line. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 - def line; end - - # Sets the attribute line - # - # @param value the value to set the attribute line to. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 - def line=(_arg0); end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def nesting; end - - # Returns the value of attribute parent. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def parent; end - - # Returns the value of attribute pc. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 - def pc; end - - # Sets the attribute pc - # - # @param value the value to set the attribute pc to. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 - def pc=(_arg0); end - - # Returns the value of attribute stack_index. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def stack_index; end - - # Returns the value of attribute svars. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def svars; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#95 -class SyntaxTree::YARV::VM::FrozenCore; end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#9 -class SyntaxTree::YARV::VM::Jump - # @return [Jump] a new instance of Jump - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#12 - def initialize(label); end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#10 - def label; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#17 -class SyntaxTree::YARV::VM::Leave - # @return [Leave] a new instance of Leave - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#20 - def initialize(value); end - - # Returns the value of attribute value. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#18 - def value; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#54 -class SyntaxTree::YARV::VM::MethodFrame < ::SyntaxTree::YARV::VM::Frame - # @return [MethodFrame] a new instance of MethodFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#57 - def initialize(iseq, nesting, parent, stack_index, _self, name, block); end - - # Returns the value of attribute block. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55 - def block; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55 - def name; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#92 -class SyntaxTree::YARV::VM::NextError < ::SyntaxTree::YARV::VM::ThrownError; end - -# This is the main entrypoint for events firing in the VM, which allows -# us to implement tracing. -# -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#122 -class SyntaxTree::YARV::VM::NullEvents - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#123 - def publish_frame_change(frame); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#126 - def publish_instruction(iseq, insn); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#129 - def publish_stack_change(stack); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#132 - def publish_tracepoint(event); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#70 -class SyntaxTree::YARV::VM::RescueFrame < ::SyntaxTree::YARV::VM::Frame - # @return [RescueFrame] a new instance of RescueFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#71 - def initialize(iseq, parent, stack_index); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#86 -class SyntaxTree::YARV::VM::ReturnError < ::SyntaxTree::YARV::VM::ThrownError; end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#541 -SyntaxTree::YARV::VM::SOEXT = T.let(T.unsafe(nil), String) - -# This is a simple implementation of tracing that prints to STDOUT. -# -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#137 -class SyntaxTree::YARV::VM::STDOUTEvents - # @return [STDOUTEvents] a new instance of STDOUTEvents - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#140 - def initialize; end - - # Returns the value of attribute disassembler. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#138 - def disassembler; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#144 - def publish_frame_change(frame); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#148 - def publish_instruction(iseq, insn); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#153 - def publish_stack_change(stack); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#157 - def publish_tracepoint(event); end -end - -# This represents the global VM stack. It effectively is an array, but -# wraps mutating functions with instrumentation. -# -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#164 -class SyntaxTree::YARV::VM::Stack - # @return [Stack] a new instance of Stack - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#167 - def initialize(events); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#196 - def [](*_arg0, **_arg1, &_arg2); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#200 - def []=(*_arg0, **_arg1, &_arg2); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#172 - def concat(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute events. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165 - def events; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#176 - def last; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#180 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#188 - def pop(*_arg0, **_arg1, &_arg2); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#184 - def push(*_arg0, **_arg1, &_arg2); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#192 - def slice!(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute values. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165 - def values; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#76 -class SyntaxTree::YARV::VM::ThrownError < ::StandardError - # @return [ThrownError] a new instance of ThrownError - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#79 - def initialize(value, backtrace); end - - # Returns the value of attribute value. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#77 - def value; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#42 -class SyntaxTree::YARV::VM::TopFrame < ::SyntaxTree::YARV::VM::Frame - # @return [TopFrame] a new instance of TopFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#43 - def initialize(iseq); end -end - -# Yield represents using the +yield+ keyword with arguments. -# -# yield value -# -# source://syntax_tree//lib/syntax_tree/node.rb#12273 -class SyntaxTree::YieldNode < ::SyntaxTree::Node - # @return [YieldNode] a new instance of YieldNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#12280 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12334 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12286 - def accept(visitor); end - - # [nil | Args | Paren] the arguments passed to the yield - # - # source://syntax_tree//lib/syntax_tree/node.rb#12275 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12290 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12278 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12294 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12290 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12307 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12311 - def format(q); end -end - -# ZSuper represents the bare +super+ keyword with no arguments. -# -# super -# -# source://syntax_tree//lib/syntax_tree/node.rb#12343 -class SyntaxTree::ZSuper < ::SyntaxTree::Node - # @return [ZSuper] a new instance of ZSuper - # - # source://syntax_tree//lib/syntax_tree/node.rb#12347 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12377 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12352 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12356 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12345 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12360 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12356 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12369 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12373 - def format(q); end -end diff --git a/sorbet/rbi/gems/tapioca@0.12.0.rbi b/sorbet/rbi/gems/tapioca@0.16.3.rbi similarity index 87% rename from sorbet/rbi/gems/tapioca@0.12.0.rbi rename to sorbet/rbi/gems/tapioca@0.16.3.rbi index 37d2918..e30c4cd 100644 --- a/sorbet/rbi/gems/tapioca@0.12.0.rbi +++ b/sorbet/rbi/gems/tapioca@0.16.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `tapioca` gem. # Please instead update this file by running `bin/tapioca gem tapioca`. + class Bundler::Dependency < ::Gem::Dependency include ::Tapioca::BundlerExt::AutoRequireHook end @@ -54,7 +55,7 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.1.9/lib/rbi/model.rb#119 + # source://rbi/0.2.1/lib/rbi/model.rb#121 sig do params( loc: T.nilable(::RBI::Loc), @@ -64,19 +65,15 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.1.9/lib/rbi/model.rb#126 + # source://rbi/0.2.1/lib/rbi/model.rb#128 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.1.9/lib/rbi/printer.rb#226 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi/0.1.9/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.2.1/lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/annotate.rb#49 + # source://rbi/0.2.1/lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end @@ -102,18 +99,19 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(name: ::String).void } def create_include(name); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#89 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#90 sig do params( name: ::String, parameters: T::Array[::RBI::TypedParam], - return_type: ::String, + return_type: T.nilable(::String), class_method: T::Boolean, visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment] + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) ).void end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil), &block); end # source://tapioca//lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } @@ -140,27 +138,35 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/deannotate.rb#41 + # source://rbi/0.2.1/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.1.9/lib/rbi/model.rb#132 + # source://rbi/0.2.1/lib/rbi/model.rb#134 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.1.9/lib/rbi/rewriters/filter_versions.rb#118 + # source://rbi/0.2.1/lib/rbi/rewriters/filter_versions.rb#118 sig { params(version: ::Gem::Version).void } def filter_versions!(version); end - # source://rbi/0.1.9/lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi/0.2.1/lib/rbi/rewriters/flatten_singleton_methods.rb#60 + sig { void } + def flatten_singleton_methods!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/flatten_visibilities.rb#60 + sig { void } + def flatten_visibilities!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/group_nodes.rb#81 sig { void } def group_nodes!; end - # source://rbi/0.1.9/lib/rbi/index.rb#68 + # source://rbi/0.2.1/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.1.9/lib/rbi/rewriters/merge_trees.rb#324 + # source://rbi/0.2.1/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -171,44 +177,48 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/nest_non_public_methods.rb#46 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_non_public_members.rb#46 sig { void } - def nest_non_public_methods!; end + def nest_non_public_members!; end - # source://rbi/0.1.9/lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.1.9/lib/rbi/model.rb#110 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_top_level_members.rb#63 + sig { void } + def nest_top_level_members!; end + + # source://rbi/0.2.1/lib/rbi/model.rb#112 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.1.9/lib/rbi/printer.rb#233 - sig { override.returns(T::Boolean) } - def oneline?; end + # source://rbi/0.2.1/lib/rbi/rewriters/attr_to_methods.rb#53 + sig { void } + def replace_attributes_with_methods!; end - # source://rbi/0.1.9/lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.2.1/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end private - # source://tapioca//lib/tapioca/rbi_ext/model.rb#116 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#123 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#111 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#118 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://tapioca//lib/tapioca/rbi_ext/model.rb#126 +# source://tapioca//lib/tapioca/rbi_ext/model.rb#133 class RBI::TypedParam < ::T::Struct const :param, ::RBI::Param const :type, ::String class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -377,7 +387,7 @@ end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 module Tapioca class << self - # source://tapioca//lib/tapioca.rb#19 + # source://tapioca//lib/tapioca.rb#20 sig do type_parameters(:Result) .params( @@ -388,7 +398,7 @@ module Tapioca end end -# source://tapioca//lib/tapioca.rb#37 +# source://tapioca//lib/tapioca.rb#39 Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 @@ -428,13 +438,13 @@ module Tapioca::BundlerExt::AutoRequireHook end end -# source://tapioca//lib/tapioca.rb#60 +# source://tapioca//lib/tapioca.rb#62 Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#59 +# source://tapioca//lib/tapioca.rb#61 Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#58 +# source://tapioca//lib/tapioca.rb#60 Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/cli.rb#5 @@ -443,24 +453,24 @@ class Tapioca::Cli < ::Thor include ::Tapioca::ConfigHelper include ::Tapioca::EnvHelper - # source://tapioca//lib/tapioca/cli.rb#355 + # source://tapioca//lib/tapioca/cli.rb#366 def __print_version; end - # source://tapioca//lib/tapioca/cli.rb#337 + # source://tapioca//lib/tapioca/cli.rb#348 def annotations; end - # source://tapioca//lib/tapioca/cli.rb#309 + # source://tapioca//lib/tapioca/cli.rb#320 def check_shims; end # source://tapioca//lib/tapioca/cli.rb#46 def configure; end - # source://tapioca//lib/tapioca/cli.rb#138 + # source://tapioca//lib/tapioca/cli.rb#147 def dsl(*constant_or_paths); end # @raise [MalformattedArgumentError] # - # source://tapioca//lib/tapioca/cli.rb#253 + # source://tapioca//lib/tapioca/cli.rb#264 def gem(*gems); end # source://tapioca//lib/tapioca/cli.rb#27 @@ -474,11 +484,11 @@ class Tapioca::Cli < ::Thor private - # source://tapioca//lib/tapioca/cli.rb#369 + # source://tapioca//lib/tapioca/cli.rb#380 def print_init_next_steps; end class << self - # source://tapioca//lib/tapioca/cli.rb#361 + # source://tapioca//lib/tapioca/cli.rb#372 def exit_on_failure?; end end end @@ -515,7 +525,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke abstract! - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#31 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#33 sig do params( requested_constants: T::Array[::String], @@ -525,6 +535,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke exclude: T::Array[::String], file_header: T::Boolean, tapioca_path: ::String, + skip_constant: T::Array[::String], quiet: T::Boolean, verbose: T::Boolean, number_of_workers: T.nilable(::Integer), @@ -532,22 +543,23 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke gem_dir: ::String, rbi_formatter: ::Tapioca::RBIFormatter, app_root: ::String, - halt_upon_load_error: T::Boolean + halt_upon_load_error: T::Boolean, + compiler_options: T::Hash[::String, T.untyped] ).void end - def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, skip_constant: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), compiler_options: T.unsafe(nil)); end private - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#94 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#100 sig { returns(T::Array[::String]) } def all_requested_constants; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#284 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#208 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#217 sig do params( constant_name: ::String, @@ -558,75 +570,75 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke end def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#146 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#154 sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } def constantize(constant_names, ignore_missing: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#169 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#177 sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def constantize_compilers(compiler_names); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#344 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#353 sig { returns(T::Array[::String]) } def constants_from_requested_paths; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#117 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#123 sig { returns(::Tapioca::Dsl::Pipeline) } def create_pipeline; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#247 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#256 sig { params(constant_name: ::String).returns(::Pathname) } def dsl_rbi_filename(constant_name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#132 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#140 sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#339 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#348 sig { params(constant: ::String).returns(::String) } def generate_command_for(constant); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#70 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#76 sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) } def generate_dsl_rbi_files(outpath, quiet:); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#107 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#113 sig { void } def load_application; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#226 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235 sig { params(dir: ::Pathname).void } def perform_dsl_verification(dir); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#102 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#108 sig { returns(::Tapioca::Dsl::Pipeline) } def pipeline; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#244 sig { params(files: T::Set[::Pathname]).void } def purge_stale_dsl_rbi_files(files); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#334 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#343 sig { params(constant: ::String).returns(::String) } def rbi_filename_for(constant); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#315 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#324 sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } def rbi_files_in(path); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#302 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#188 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#197 sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } def resolve(name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#322 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#331 sig { params(class_name: ::String).returns(::String) } def underscore(class_name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#252 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#261 sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } def verify_dsl_rbi(tmp_dir:); end end @@ -665,11 +677,11 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command private - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#221 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#230 sig { returns(T::Array[::String]) } def added_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#282 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#291 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end @@ -677,19 +689,19 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } def compile_gem_rbi(gem); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#216 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#225 sig { params(gem_name: ::String).returns(::Pathname) } def existing_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#264 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#273 sig { returns(T::Hash[::String, ::String]) } def existing_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#228 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#237 sig { params(gem_name: ::String).returns(::Pathname) } def expected_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#270 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#279 sig { returns(T::Hash[::String, ::String]) } def expected_rbis; end @@ -702,11 +714,11 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command end def gem_dependencies(gem, dependencies = T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#233 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#242 sig { params(gem_name: ::String).returns(T::Boolean) } def gem_rbi_exists?(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#277 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#286 sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } def gem_rbi_filename(gem_name, version); end @@ -714,27 +726,27 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def gems_to_generate(gem_names); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#287 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#296 sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } def merge_with_exported_rbi(gem, file); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#258 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#267 sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } def move(old_filename, new_filename); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#168 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#177 sig { void } def perform_additions; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#141 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#150 sig { void } def perform_removals; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#211 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#220 sig { returns(T::Array[::String]) } def removed_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#238 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#247 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end end @@ -755,11 +767,11 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke private - # source://tapioca//lib/tapioca/commands/annotations.rb#193 + # source://tapioca//lib/tapioca/commands/annotations.rb#197 sig { params(name: ::String, content: ::String).returns(::String) } def add_header(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#213 + # source://tapioca//lib/tapioca/commands/annotations.rb#217 sig { params(name: ::String, content: ::String).returns(::String) } def apply_typed_override(name, content); end @@ -768,18 +780,18 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke def execute; end # source://tapioca//lib/tapioca/commands/annotations.rb#136 - sig { params(repo_uris: T::Array[::String], gem_name: ::String).void } - def fetch_annotation(repo_uris, gem_name); end + sig { params(repo_uris: T::Array[::String], gem_info: ::Tapioca::GemInfo).void } + def fetch_annotation(repo_uris, gem_info); end # source://tapioca//lib/tapioca/commands/annotations.rb#113 - sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) } - def fetch_annotations(gem_names); end + sig { params(project_gems: T::Array[::Tapioca::GemInfo]).returns(T::Array[::String]) } + def fetch_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#152 + # source://tapioca//lib/tapioca/commands/annotations.rb#156 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#169 + # source://tapioca//lib/tapioca/commands/annotations.rb#173 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_http_file(repo_uri, path); end @@ -791,31 +803,35 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } def fetch_indexes; end - # source://tapioca//lib/tapioca/commands/annotations.rb#161 + # source://tapioca//lib/tapioca/commands/annotations.rb#165 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_local_file(repo_uri, path); end + # source://tapioca//lib/tapioca/commands/annotations.rb#229 + sig { params(gem_version: ::Gem::Version, content: ::String).returns(::String) } + def filter_versions(gem_version, content); end + # source://tapioca//lib/tapioca/commands/annotations.rb#50 - sig { returns(T::Array[::String]) } + sig { returns(T::Array[::Tapioca::GemInfo]) } def list_gemfile_gems; end - # source://tapioca//lib/tapioca/commands/annotations.rb#225 + # source://tapioca//lib/tapioca/commands/annotations.rb#237 sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } def merge_files(gem_name, contents); end # source://tapioca//lib/tapioca/commands/annotations.rb#60 - sig { params(project_gems: T::Array[::String]).void } + sig { params(project_gems: T::Array[::Tapioca::GemInfo]).void } def remove_expired_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#252 + # source://tapioca//lib/tapioca/commands/annotations.rb#264 sig { returns(T::Hash[::String, T.nilable(::String)]) } def repo_tokens; end - # source://tapioca//lib/tapioca/commands/annotations.rb#280 + # source://tapioca//lib/tapioca/commands/annotations.rb#292 sig { params(path: ::String, repo_uri: ::String, message: ::String).void } def say_http_error(path, repo_uri, message:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#264 + # source://tapioca//lib/tapioca/commands/annotations.rb#276 sig { params(repo_uri: ::String).returns(T.nilable(::String)) } def token_for(repo_uri); end end @@ -863,7 +879,7 @@ class Tapioca::Commands::Command sig { void } def initialize; end - # source://thor/1.3.0/lib/thor/base.rb#155 + # source://thor/1.3.2/lib/thor/base.rb#155 sig { returns(::Thor::Actions) } def file_writer; end @@ -1077,11 +1093,11 @@ module Tapioca::ConfigHelper private - # source://tapioca//lib/tapioca/helpers/config_helper.rb#151 + # source://tapioca//lib/tapioca/helpers/config_helper.rb#153 sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } def build_error(msg); end - # source://tapioca//lib/tapioca/helpers/config_helper.rb#176 + # source://tapioca//lib/tapioca/helpers/config_helper.rb#178 sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) } def build_error_message(config_file, errors); end @@ -1097,7 +1113,7 @@ module Tapioca::ConfigHelper sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void } def filter_defaults(options); end - # source://tapioca//lib/tapioca/helpers/config_helper.rb#194 + # source://tapioca//lib/tapioca/helpers/config_helper.rb#196 sig do params( options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess) @@ -1120,58 +1136,58 @@ module Tapioca::ConfigHelper def validate_config_options(command_options, config_key, config_options); end end -# source://tapioca//lib/tapioca/helpers/config_helper.rb#146 +# source://tapioca//lib/tapioca/helpers/config_helper.rb#148 class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end -# source://tapioca//lib/tapioca/helpers/config_helper.rb#141 +# source://tapioca//lib/tapioca/helpers/config_helper.rb#143 class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :message, ::String const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end -# source://tapioca//lib/tapioca.rb#44 +# source://tapioca//lib/tapioca.rb#46 Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#40 +# source://tapioca//lib/tapioca.rb#42 Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#56 +# source://tapioca//lib/tapioca.rb#58 Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#41 +# source://tapioca//lib/tapioca.rb#43 Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#46 +# source://tapioca//lib/tapioca.rb#48 Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) -# source://tapioca//lib/tapioca.rb#38 +# source://tapioca//lib/tapioca.rb#40 Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#39 +# source://tapioca//lib/tapioca.rb#41 Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca/rbi_formatter.rb#29 +# source://tapioca//lib/tapioca/rbi_formatter.rb#31 Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) -# source://tapioca//lib/tapioca.rb#55 +# source://tapioca//lib/tapioca.rb#57 Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) -# source://tapioca//lib/tapioca.rb#42 +# source://tapioca//lib/tapioca.rb#44 Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#43 +# source://tapioca//lib/tapioca.rb#45 Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/dsl/compilers.rb#5 @@ -1193,17 +1209,24 @@ class Tapioca::Dsl::Compiler ConstantType = type_member { { upper: Module } } - # source://tapioca//lib/tapioca/dsl/compiler.rb#64 - sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void } - def initialize(pipeline, root, constant); end + # source://tapioca//lib/tapioca/dsl/compiler.rb#107 + sig do + params( + pipeline: ::Tapioca::Dsl::Pipeline, + root: ::RBI::Tree, + constant: ConstantType, + options: T::Hash[::String, T.untyped] + ).void + end + def initialize(pipeline, root, constant, options = T.unsafe(nil)); end # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. # - # source://tapioca//lib/tapioca/dsl/compiler.rb#81 + # source://tapioca//lib/tapioca/dsl/compiler.rb#125 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#72 + # source://tapioca//lib/tapioca/dsl/compiler.rb#116 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end @@ -1213,58 +1236,75 @@ class Tapioca::Dsl::Compiler # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#77 + # source://tapioca//lib/tapioca/dsl/compiler.rb#121 sig { abstract.void } def decorate; end + # source://tapioca//lib/tapioca/dsl/compiler.rb#26 + sig { returns(T::Hash[::String, T.untyped]) } + def options; end + # source://tapioca//lib/tapioca/dsl/compiler.rb#23 sig { returns(::RBI::Tree) } def root; end private - # source://tapioca//lib/tapioca/dsl/compiler.rb#130 + # source://tapioca//lib/tapioca/dsl/compiler.rb#174 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } def compile_method_parameters_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#166 + # source://tapioca//lib/tapioca/dsl/compiler.rb#210 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } def compile_method_return_type_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#120 + # source://tapioca//lib/tapioca/dsl/compiler.rb#164 sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end # Get the types of each parameter from a method signature # - # source://tapioca//lib/tapioca/dsl/compiler.rb#94 + # source://tapioca//lib/tapioca/dsl/compiler.rb#138 sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } def parameters_types_from_signature(method_def, signature); end class << self # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#34 + # source://tapioca//lib/tapioca/dsl/compiler.rb#39 sig { abstract.returns(T::Enumerable[::Module]) } def gather_constants; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#29 + # source://tapioca//lib/tapioca/dsl/compiler.rb#34 sig { params(constant: ::Module).returns(T::Boolean) } def handles?(constant); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#37 + # source://tapioca//lib/tapioca/dsl/compiler.rb#42 sig { returns(T::Set[::Module]) } def processable_constants; end + # source://tapioca//lib/tapioca/dsl/compiler.rb#50 + sig { params(constants: T::Array[::Module]).void } + def requested_constants=(constants); end + private - # source://tapioca//lib/tapioca/dsl/compiler.rb#47 + # source://tapioca//lib/tapioca/dsl/compiler.rb#75 sig { returns(T::Enumerable[T::Class[T.anything]]) } def all_classes; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#55 + # source://tapioca//lib/tapioca/dsl/compiler.rb#87 sig { returns(T::Enumerable[::Module]) } def all_modules; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#61 + sig do + type_parameters(:U) + .params( + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) + ).returns(T::Array[T.type_parameter(:U)]) + end + def descendants_of(klass); end end end @@ -1283,7 +1323,7 @@ Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/dsl/pipeline.rb#6 class Tapioca::Dsl::Pipeline - # source://tapioca//lib/tapioca/dsl/pipeline.rb#34 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#39 sig do params( requested_constants: T::Array[::Module], @@ -1291,32 +1331,34 @@ class Tapioca::Dsl::Pipeline requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], error_handler: T.proc.params(error: ::String).void, - number_of_workers: T.nilable(::Integer) + skipped_constants: T::Array[::Module], + number_of_workers: T.nilable(::Integer), + compiler_options: T::Hash[::String, T.untyped] ).void end - def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end + def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), skipped_constants: T.unsafe(nil), number_of_workers: T.unsafe(nil), compiler_options: T.unsafe(nil)); end # source://tapioca//lib/tapioca/dsl/pipeline.rb#10 sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } def active_compilers; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#93 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#102 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#98 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#116 sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def compilers; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 sig { returns(T.proc.params(error: ::String).void) } def error_handler; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#25 sig { returns(T::Array[::String]) } def errors; end @@ -1328,7 +1370,7 @@ class Tapioca::Dsl::Pipeline sig { returns(T::Array[::Pathname]) } def requested_paths; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#58 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#67 sig do type_parameters(:T) .params( @@ -1337,17 +1379,21 @@ class Tapioca::Dsl::Pipeline end def run(&blk); end + # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 + sig { returns(T::Array[::Module]) } + def skipped_constants; end + private - # source://tapioca//lib/tapioca/dsl/pipeline.rb#199 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#224 sig { void } def abort_if_pending_migrations!; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#144 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#169 sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } def filter_anonymous_and_reloaded_constants(constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#124 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#133 sig do params( requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], @@ -1356,20 +1402,21 @@ class Tapioca::Dsl::Pipeline end def gather_active_compilers(requested_compilers, excluded_compilers); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#132 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#147 sig do params( requested_constants: T::Array[::Module], - requested_paths: T::Array[::Pathname] + requested_paths: T::Array[::Pathname], + skipped_constants: T::Array[::Module] ).returns(T::Set[::Module]) end - def gather_constants(requested_constants, requested_paths); end + def gather_constants(requested_constants, requested_paths, skipped_constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#173 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#198 sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#192 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#217 sig { params(error: ::String).returns(T.noreturn) } def report_error(error); end end @@ -1573,6 +1620,10 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } def initialize_method_for(constant); end + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#216 + sig { params(method: ::UnboundMethod).returns(T.untyped) } + def lookup_signature_of(method); end + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#172 sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } def method_names_by_visibility(mod); end @@ -1665,7 +1716,7 @@ end class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#25 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#28 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end @@ -1902,49 +1953,60 @@ class Tapioca::Gem::Pipeline include ::Tapioca::SorbetHelper include ::Tapioca::RBIHelper - # source://tapioca//lib/tapioca/gem/pipeline.rb#17 - sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean, include_loc: T::Boolean).void } - def initialize(gem, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/gem/pipeline.rb#27 + sig do + params( + gem: ::Tapioca::Gemfile::GemSpec, + error_handler: T.proc.params(error: ::String).void, + include_doc: T::Boolean, + include_loc: T::Boolean + ).void + end + def initialize(gem, error_handler:, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#48 + # source://tapioca//lib/tapioca/gem/pipeline.rb#64 sig { returns(::RBI::Tree) } def compile; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#119 + # source://tapioca//lib/tapioca/gem/pipeline.rb#135 sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } def constant_in_gem?(name); end + # source://tapioca//lib/tapioca/gem/pipeline.rb#17 + sig { returns(T.proc.params(error: ::String).void) } + def error_handler; end + # source://tapioca//lib/tapioca/gem/pipeline.rb#14 sig { returns(::Tapioca::Gemfile::GemSpec) } def gem; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#137 + # source://tapioca//lib/tapioca/gem/pipeline.rb#153 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_in_gem?(method); end # Helpers # - # source://tapioca//lib/tapioca/gem/pipeline.rb#147 + # source://tapioca//lib/tapioca/gem/pipeline.rb#163 sig { params(constant: ::Module).returns(T.nilable(::String)) } def name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#71 + # source://tapioca//lib/tapioca/gem/pipeline.rb#87 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } def push_const(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#61 + # source://tapioca//lib/tapioca/gem/pipeline.rb#77 sig { params(symbol: ::String, constant: ::BasicObject).void } def push_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#66 + # source://tapioca//lib/tapioca/gem/pipeline.rb#82 sig { params(symbol: ::String, constant: ::Module).void } def push_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#85 + # source://tapioca//lib/tapioca/gem/pipeline.rb#101 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_foreign_scope(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#99 + # source://tapioca//lib/tapioca/gem/pipeline.rb#115 sig do params( symbol: ::String, @@ -1957,137 +2019,137 @@ class Tapioca::Gem::Pipeline end def push_method(symbol, constant, method, node, signature, parameters); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#78 + # source://tapioca//lib/tapioca/gem/pipeline.rb#94 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_scope(symbol, constant, node); end # Events handling # - # source://tapioca//lib/tapioca/gem/pipeline.rb#56 + # source://tapioca//lib/tapioca/gem/pipeline.rb#72 sig { params(symbol: ::String).void } def push_symbol(symbol); end # Constants and properties filtering # - # source://tapioca//lib/tapioca/gem/pipeline.rb#106 + # source://tapioca//lib/tapioca/gem/pipeline.rb#122 sig { params(symbol_name: ::String).returns(T::Boolean) } def symbol_in_payload?(symbol_name); end private - # source://tapioca//lib/tapioca/gem/pipeline.rb#440 + # source://tapioca//lib/tapioca/gem/pipeline.rb#456 sig { params(name: ::String).void } def add_to_alias_namespace(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#445 + # source://tapioca//lib/tapioca/gem/pipeline.rb#461 sig { params(name: ::String).returns(T::Boolean) } def alias_namespaced?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#244 + # source://tapioca//lib/tapioca/gem/pipeline.rb#260 sig { params(name: ::String, constant: ::Module).void } def compile_alias(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#230 + # source://tapioca//lib/tapioca/gem/pipeline.rb#246 sig { params(symbol: ::String, constant: ::BasicObject).void } def compile_constant(symbol, constant); end # Compiling # - # source://tapioca//lib/tapioca/gem/pipeline.rb#219 + # source://tapioca//lib/tapioca/gem/pipeline.rb#235 sig { params(symbol: ::String, constant: ::Module).void } def compile_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#298 + # source://tapioca//lib/tapioca/gem/pipeline.rb#314 sig { params(name: ::String, constant: ::Module).void } def compile_module(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#265 + # source://tapioca//lib/tapioca/gem/pipeline.rb#281 sig { params(name: ::String, value: ::BasicObject).void } def compile_object(name, value); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#309 + # source://tapioca//lib/tapioca/gem/pipeline.rb#325 sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } def compile_scope(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#323 + # source://tapioca//lib/tapioca/gem/pipeline.rb#339 sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } def compile_superclass(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#421 + # source://tapioca//lib/tapioca/gem/pipeline.rb#437 sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#177 + # source://tapioca//lib/tapioca/gem/pipeline.rb#193 sig { params(event: ::Tapioca::Gem::Event).void } def dispatch(event); end # Helpers # - # source://tapioca//lib/tapioca/gem/pipeline.rb#464 + # source://tapioca//lib/tapioca/gem/pipeline.rb#480 sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } def generic_name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#433 + # source://tapioca//lib/tapioca/gem/pipeline.rb#449 sig { params(constant: ::Module).returns(T::Set[::String]) } def get_file_candidates(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#162 + # source://tapioca//lib/tapioca/gem/pipeline.rb#178 sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def load_bootstrap_symbols(gem); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#480 + # source://tapioca//lib/tapioca/gem/pipeline.rb#496 sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } def name_of_proxy_target(constant, class_name); end # Events handling # - # source://tapioca//lib/tapioca/gem/pipeline.rb#172 + # source://tapioca//lib/tapioca/gem/pipeline.rb#188 sig { returns(::Tapioca::Gem::Event) } def next_event; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#200 + # source://tapioca//lib/tapioca/gem/pipeline.rb#216 sig { params(event: ::Tapioca::Gem::ConstantFound).void } def on_constant(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#212 + # source://tapioca//lib/tapioca/gem/pipeline.rb#228 sig { params(event: ::Tapioca::Gem::NodeAdded).void } def on_node(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#191 + # source://tapioca//lib/tapioca/gem/pipeline.rb#207 sig { params(event: ::Tapioca::Gem::SymbolFound).void } def on_symbol(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#452 + # source://tapioca//lib/tapioca/gem/pipeline.rb#468 sig { params(name: ::String).void } def seen!(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#457 + # source://tapioca//lib/tapioca/gem/pipeline.rb#473 sig { params(name: ::String).returns(T::Boolean) } def seen?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#391 + # source://tapioca//lib/tapioca/gem/pipeline.rb#407 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_alias?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#379 + # source://tapioca//lib/tapioca/gem/pipeline.rb#395 sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } def skip_constant?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#408 + # source://tapioca//lib/tapioca/gem/pipeline.rb#424 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_foreign_constant?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#413 + # source://tapioca//lib/tapioca/gem/pipeline.rb#429 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_module?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#400 + # source://tapioca//lib/tapioca/gem/pipeline.rb#416 sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } def skip_object?(name, constant); end # Constants and properties filtering # - # source://tapioca//lib/tapioca/gem/pipeline.rb#374 + # source://tapioca//lib/tapioca/gem/pipeline.rb#390 sig { params(name: ::String).returns(T::Boolean) } def skip_symbol?(name); end end @@ -2096,7 +2158,7 @@ end # "(eval at /path/to/file.rb:123)" # and we are just interested in the "/path/to/file.rb" part # -# source://tapioca//lib/tapioca/gem/pipeline.rb#116 +# source://tapioca//lib/tapioca/gem/pipeline.rb#132 Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp) # source://tapioca//lib/tapioca/gem/pipeline.rb#11 @@ -2149,6 +2211,21 @@ module Tapioca::GemHelper def path_in_dir?(path, dir); end end +# source://tapioca//lib/tapioca/gem_info.rb#5 +class Tapioca::GemInfo < ::T::Struct + const :name, ::String + const :version, ::Gem::Version + + class << self + # source://tapioca//lib/tapioca/gem_info.rb#13 + sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } + def from_spec(spec); end + + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 + def inherited(s); end + end +end + # source://tapioca//lib/tapioca/gemfile.rb#7 class Tapioca::Gemfile # source://tapioca//lib/tapioca/gemfile.rb#27 @@ -2227,15 +2304,15 @@ class Tapioca::Gemfile::GemSpec sig { returns(T::Array[::Gem::Dependency]) } def dependencies; end - # source://tapioca//lib/tapioca/gemfile.rb#190 + # source://tapioca//lib/tapioca/gemfile.rb#201 sig { returns(T::Boolean) } def export_rbi_files?; end - # source://tapioca//lib/tapioca/gemfile.rb#185 + # source://tapioca//lib/tapioca/gemfile.rb#196 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # source://tapioca//lib/tapioca/gemfile.rb#195 + # source://tapioca//lib/tapioca/gemfile.rb#206 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end @@ -2263,7 +2340,7 @@ class Tapioca::Gemfile::GemSpec sig { returns(::String) } def rbi_file_name; end - # source://tapioca//lib/tapioca/gemfile.rb#207 + # source://tapioca//lib/tapioca/gemfile.rb#218 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end @@ -2274,31 +2351,31 @@ class Tapioca::Gemfile::GemSpec private - # source://tapioca//lib/tapioca/gemfile.rb#218 + # source://tapioca//lib/tapioca/gemfile.rb#229 sig { returns(T::Array[::Pathname]) } def collect_files; end - # source://tapioca//lib/tapioca/gemfile.rb#233 + # source://tapioca//lib/tapioca/gemfile.rb#244 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # source://tapioca//lib/tapioca/gemfile.rb#292 + # source://tapioca//lib/tapioca/gemfile.rb#303 sig { returns(T::Boolean) } def gem_ignored?; end - # source://tapioca//lib/tapioca/gemfile.rb#271 + # source://tapioca//lib/tapioca/gemfile.rb#282 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#238 + # source://tapioca//lib/tapioca/gemfile.rb#249 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # source://tapioca//lib/tapioca/gemfile.rb#250 + # source://tapioca//lib/tapioca/gemfile.rb#261 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # source://tapioca//lib/tapioca/gemfile.rb#264 + # source://tapioca//lib/tapioca/gemfile.rb#275 sig { returns(::String) } def version_string; end @@ -2315,6 +2392,9 @@ Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/gemfile.rb#10 Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } +# source://tapioca//lib/tapioca.rb#33 +Tapioca::LIB_ROOT_DIR = T.let(T.unsafe(nil), String) + # source://tapioca//lib/tapioca/loaders/loader.rb#5 module Tapioca::Loaders; end @@ -2337,7 +2417,7 @@ class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader protected - # source://tapioca//lib/tapioca/loaders/dsl.rb#81 + # source://tapioca//lib/tapioca/loaders/dsl.rb#88 sig { void } def load_application; end @@ -2436,16 +2516,16 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array<String>] # - # source://sorbet-runtime/0.5.11262/lib/types/private/methods/_methods.rb#257 - def eager_load_paths(*args, **_arg1, &blk); end + # source://tapioca//lib/tapioca/loaders/loader.rb#234 + def eager_load_paths(engine); end - # source://tapioca//lib/tapioca/loaders/loader.rb#198 + # source://tapioca//lib/tapioca/loaders/loader.rb#199 sig { void } def eager_load_rails_app; end # @return [Array<T.class_of(Rails::Engine)>] # - # source://tapioca//lib/tapioca/loaders/loader.rb#169 + # source://tapioca//lib/tapioca/loaders/loader.rb#178 def engines; end # source://tapioca//lib/tapioca/loaders/loader.rb#29 @@ -2459,11 +2539,11 @@ class Tapioca::Loaders::Loader end def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end - # source://tapioca//lib/tapioca/loaders/loader.rb#127 + # source://tapioca//lib/tapioca/loaders/loader.rb#136 sig { void } def load_engines_in_classic_mode; end - # source://tapioca//lib/tapioca/loaders/loader.rb#105 + # source://tapioca//lib/tapioca/loaders/loader.rb#114 sig { void } def load_engines_in_zeitwerk_mode; end @@ -2478,30 +2558,26 @@ class Tapioca::Loaders::Loader end def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/loaders/loader.rb#80 + # source://tapioca//lib/tapioca/loaders/loader.rb#89 sig { void } def load_rails_engines; end - # source://tapioca//lib/tapioca/loaders/loader.rb#219 + # source://tapioca//lib/tapioca/loaders/loader.rb#220 sig { params(file: T.nilable(::String)).void } def require_helper(file); end - # source://tapioca//lib/tapioca/loaders/loader.rb#94 + # source://tapioca//lib/tapioca/loaders/loader.rb#103 def run_initializers; end - # source://tapioca//lib/tapioca/loaders/loader.rb#183 + # source://tapioca//lib/tapioca/loaders/loader.rb#192 sig { params(path: ::String).void } def safe_require(path); end - # source://tapioca//lib/tapioca/loaders/loader.rb#190 - sig { void } - def silence_deprecations; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#152 + # source://tapioca//lib/tapioca/loaders/loader.rb#161 sig { params(blk: T.proc.void).void } def with_rails_application(&blk); end - # source://tapioca//lib/tapioca/loaders/loader.rb#145 + # source://tapioca//lib/tapioca/loaders/loader.rb#154 sig { returns(T::Boolean) } def zeitwerk_mode?; end end @@ -2548,19 +2624,19 @@ module Tapioca::RBIFilesHelper private - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#209 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#223 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) } def extract_empty_scopes(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#214 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#228 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } def extract_methods_and_attrs(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#224 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#238 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) } def extract_mixins(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#234 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#248 sig do params( nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)] @@ -2568,7 +2644,7 @@ module Tapioca::RBIFilesHelper end def extract_nodes_with_sigs(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#202 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#216 sig do params( nodes: T::Array[::RBI::Node], @@ -2578,7 +2654,7 @@ module Tapioca::RBIFilesHelper end def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#266 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#280 sig { params(path: ::String).returns(::String) } def gem_name_from_rbi_path(path); end @@ -2590,14 +2666,14 @@ module Tapioca::RBIFilesHelper sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) } def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#239 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#253 sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } def update_gem_rbis_strictnesses(errors, gem_dir); end end # source://tapioca//lib/tapioca/rbi_formatter.rb#5 class Tapioca::RBIFormatter < ::RBI::Formatter - # source://tapioca//lib/tapioca/rbi_formatter.rb#22 + # source://tapioca//lib/tapioca/rbi_formatter.rb#24 sig { params(file: ::RBI::File).void } def write_empty_body_comment!(file); end @@ -2616,6 +2692,10 @@ module Tapioca::RBIHelper sig { params(type: ::String).returns(::String) } def as_nilable_type(type); end + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 + sig { params(type: ::String).returns(::String) } + def as_non_nilable_type(type); end + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#72 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_block_param(name, type:); end @@ -2652,11 +2732,11 @@ module Tapioca::RBIHelper sig { params(sig_string: ::String).returns(::String) } def sanitize_signature_types(sig_string); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#109 sig { params(name: ::String).returns(T::Boolean) } def valid_method_name?(name); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#114 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#123 sig { params(name: ::String).returns(T::Boolean) } def valid_parameter_name?(name); end @@ -2866,7 +2946,7 @@ class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple def initialize(raw_type, underlying_type); end # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45 - sig { params(obj: T.untyped).returns(T::Boolean) } + sig { override.params(obj: T.untyped).returns(T::Boolean) } def valid?(obj); end end @@ -2875,7 +2955,7 @@ module Tapioca::Runtime::Reflection extend ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::Reflection - # source://tapioca//lib/tapioca/runtime/reflection.rb#196 + # source://tapioca//lib/tapioca/runtime/reflection.rb#201 sig { params(constant: ::Module).returns(T.untyped) } def abstract_type_of(constant); end @@ -2919,7 +2999,7 @@ module Tapioca::Runtime::Reflection # class D < C; end # descendants_of(C) # => [B, A, D] # - # source://tapioca//lib/tapioca/runtime/reflection.rb#167 + # source://tapioca//lib/tapioca/runtime/reflection.rb#172 sig do type_parameters(:U) .params( @@ -2928,11 +3008,11 @@ module Tapioca::Runtime::Reflection end def descendants_of(klass); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#189 + # source://tapioca//lib/tapioca/runtime/reflection.rb#194 sig { params(constant: ::Module).returns(T::Set[::String]) } def file_candidates_for(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#202 + # source://tapioca//lib/tapioca/runtime/reflection.rb#207 sig { params(constant: ::Module).returns(T::Boolean) } def final_module?(constant); end @@ -2940,7 +3020,7 @@ module Tapioca::Runtime::Reflection sig { params(constant: ::Module).returns(T::Array[::Module]) } def inherited_ancestors_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#145 + # source://tapioca//lib/tapioca/runtime/reflection.rb#150 sig { params(constant: ::Module, method: ::Symbol).returns(::Method) } def method_of(constant, method); end @@ -2948,7 +3028,7 @@ module Tapioca::Runtime::Reflection sig { params(constant: ::Module).returns(T.nilable(::String)) } def name_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#140 + # source://tapioca//lib/tapioca/runtime/reflection.rb#145 sig { params(type: ::T::Types::Base).returns(::String) } def name_of_type(type); end @@ -2976,18 +3056,22 @@ module Tapioca::Runtime::Reflection # by searching for the label "<top (required)>". If none is found, it returns the location # labeled "<main>", which is the original call site. # - # source://tapioca//lib/tapioca/runtime/reflection.rb#179 + # source://tapioca//lib/tapioca/runtime/reflection.rb#184 sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } def resolve_loc(locations); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#207 + # source://tapioca//lib/tapioca/runtime/reflection.rb#212 sig { params(constant: ::Module).returns(T::Boolean) } def sealed_module?(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#133 + # source://tapioca//lib/tapioca/runtime/reflection.rb#138 sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } def signature_of(method); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#133 + sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } + def signature_of!(method); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#72 sig { params(constant: ::Module).returns(T::Class[T.anything]) } def singleton_class_of(constant); end @@ -2998,23 +3082,23 @@ module Tapioca::Runtime::Reflection private - # source://tapioca//lib/tapioca/runtime/reflection.rb#244 + # source://tapioca//lib/tapioca/runtime/reflection.rb#249 sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } def child_module_for_parent_with_name(parent, name); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#260 + # source://tapioca//lib/tapioca/runtime/reflection.rb#265 sig { params(name: ::String).returns(T::Boolean) } def has_aliased_namespace?(name); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#255 + # source://tapioca//lib/tapioca/runtime/reflection.rb#260 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_defined_by_forwardable_module?(method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#230 + # source://tapioca//lib/tapioca/runtime/reflection.rb#235 sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } def methods_for(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#214 + # source://tapioca//lib/tapioca/runtime/reflection.rb#219 sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } def relevant_methods_for(constant); end end @@ -3198,9 +3282,9 @@ end class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum enums do - Prepend = new - Include = new Extend = new + Include = new + Prepend = new end end @@ -3246,10 +3330,10 @@ module Tapioca::Runtime::Trackers::Tracker end end -# source://tapioca//lib/tapioca.rb#33 +# source://tapioca//lib/tapioca.rb#35 Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#32 +# source://tapioca//lib/tapioca.rb#34 Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 @@ -3344,8 +3428,8 @@ module Tapioca::Static::SymbolLoader # @return [Array<T.class_of(Rails::Engine)>] # - # source://sorbet-runtime/0.5.11262/lib/types/private/methods/_methods.rb#257 - def engines(*args, **_arg1, &blk); end + # source://tapioca//lib/tapioca/static/symbol_loader.rb#69 + def engines; end # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 sig { params(input: ::String, table_type: ::String).returns(::String) } @@ -3381,10 +3465,10 @@ end # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca.rb#35 +# source://tapioca//lib/tapioca.rb#37 Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#34 +# source://tapioca//lib/tapioca.rb#36 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108 @@ -3452,41 +3536,46 @@ Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#125 class Tapioca::TypeVariableModule::Type < ::T::Enum enums do + HasAttachedClass = new Member = new Template = new - HasAttachedClass = new end end # source://tapioca//lib/tapioca/version.rb#5 Tapioca::VERSION = T.let(T.unsafe(nil), String) +# source://tapioca//lib/tapioca/helpers/source_uri.rb#6 +module URI + include ::URI::RFC2396_REGEXP +end + # source://tapioca//lib/tapioca/helpers/source_uri.rb#7 class URI::Source < ::URI::File - # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#65 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end # source://uri/0.13.0/uri/generic.rb#243 def gem_name; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#32 sig { returns(T.nilable(::String)) } def gem_version; end # source://uri/0.13.0/uri/generic.rb#283 def line_number; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#70 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#77 sig { returns(::String) } def to_s; end class << self - # source://tapioca//lib/tapioca/helpers/source_uri.rb#38 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#45 sig do params( gem_name: ::String, @@ -3501,3 +3590,14 @@ end # source://tapioca//lib/tapioca/helpers/source_uri.rb#10 URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) + +# `uri` for Ruby 3.4 switched the default parser from RFC2396 to RFC3986. The new parser emits a deprecation +# warning on a few methods and delegates them to RFC2396, namely `extract`/`make_regexp`/`escape`/`unescape`. +# On earlier versions of the uri gem, the RFC2396_PARSER constant doesn't exist, so it needs some special +# handling to select a parser that doesn't emit deprecations. While it was backported to Ruby 3.1, users may +# have the uri gem in their own bundle and thus not use a compatible version. +# +# source://tapioca//lib/tapioca/helpers/source_uri.rb#26 +URI::Source::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + +class URI::WSS < ::URI::WS; end diff --git a/sorbet/rbi/gems/thor@1.3.0.rbi b/sorbet/rbi/gems/thor@1.3.2.rbi similarity index 96% rename from sorbet/rbi/gems/thor@1.3.0.rbi rename to sorbet/rbi/gems/thor@1.3.2.rbi index 9ed8f62..10202a5 100644 --- a/sorbet/rbi/gems/thor@1.3.0.rbi +++ b/sorbet/rbi/gems/thor@1.3.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `thor` gem. # Please instead update this file by running `bin/tapioca gem thor`. + # source://thor//lib/thor/shell/lcs_diff.rb#1 module LCSDiff protected @@ -36,7 +37,7 @@ class Thor extend ::Thor::Base::ClassMethods extend ::Thor::Invocation::ClassMethods - # source://thor//lib/thor.rb#652 + # source://thor//lib/thor.rb#663 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end class << self @@ -95,6 +96,19 @@ class Thor # source://thor//lib/thor.rb#363 def check_unknown_options?(config); end + # Checks if a specified command exists. + # + # ==== Parameters + # command_name<String>:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor.rb#449 + def command_exists?(command_name); end + # Prints help information for the given command. # # ==== Parameters @@ -470,48 +484,48 @@ class Thor # the command that is going to be invoked and a boolean which indicates if # the namespace should be displayed as arguments. # - # source://thor//lib/thor.rb#535 + # source://thor//lib/thor.rb#546 def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor//lib/thor.rb#541 + # source://thor//lib/thor.rb#552 def baseclass; end - # source://thor//lib/thor.rb#549 + # source://thor//lib/thor.rb#560 def create_command(meth); end - # source://thor//lib/thor.rb#549 + # source://thor//lib/thor.rb#560 def create_task(meth); end # help command has the required check disabled by default. # - # source://thor//lib/thor.rb#467 + # source://thor//lib/thor.rb#478 def disable_required_check; end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor//lib/thor.rb#494 + # source://thor//lib/thor.rb#505 def dispatch(meth, given_args, given_opts, config); end - # source://thor//lib/thor.rb#545 + # source://thor//lib/thor.rb#556 def dynamic_command_class; end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#615 + # source://thor//lib/thor.rb#626 def find_command_possibilities(meth); end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#615 + # source://thor//lib/thor.rb#626 def find_task_possibilities(meth); end - # source://thor//lib/thor.rb#575 + # source://thor//lib/thor.rb#586 def initialize_added; end # Returns this class at least one of required options array set. @@ -519,7 +533,7 @@ class Thor # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor//lib/thor.rb#458 + # source://thor//lib/thor.rb#469 def method_at_least_one_option_names; end # Returns this class exclusive options array set. @@ -527,7 +541,7 @@ class Thor # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor//lib/thor.rb#449 + # source://thor//lib/thor.rb#460 def method_exclusive_option_names; end # receives a (possibly nil) command name and returns a name that is in @@ -540,7 +554,7 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#594 + # source://thor//lib/thor.rb#605 def normalize_command_name(meth); end # receives a (possibly nil) command name and returns a name that is in @@ -553,23 +567,23 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#594 + # source://thor//lib/thor.rb#605 def normalize_task_name(meth); end - # source://thor//lib/thor.rb#482 + # source://thor//lib/thor.rb#493 def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end - # source://thor//lib/thor.rb#471 + # source://thor//lib/thor.rb#482 def print_exclusive_options(shell, command = T.unsafe(nil)); end # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#581 + # source://thor//lib/thor.rb#592 def retrieve_command_name(args); end # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#581 + # source://thor//lib/thor.rb#592 def retrieve_task_name(args); end # Sort the commands, lexicographically by default. @@ -577,16 +591,16 @@ class Thor # Can be overridden in the subclass to change the display order of the # commands. # - # source://thor//lib/thor.rb#642 + # source://thor//lib/thor.rb#653 def sort_commands!(list); end - # source://thor//lib/thor.rb#462 + # source://thor//lib/thor.rb#473 def stop_on_unknown_option; end - # source://thor//lib/thor.rb#630 + # source://thor//lib/thor.rb#641 def subcommand_help(cmd); end - # source://thor//lib/thor.rb#630 + # source://thor//lib/thor.rb#641 def subtask_help(cmd); end end end @@ -662,7 +676,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#193 + # source://thor//lib/thor/actions/file_manipulation.rb#192 def append_file(path, *args, &block); end # Append text to a file. Since it depends on insert_into_file, it's reversible. @@ -680,7 +694,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#193 + # source://thor//lib/thor/actions/file_manipulation.rb#192 def append_to_file(path, *args, &block); end # Loads an external file and execute it in the instance binding. @@ -721,7 +735,7 @@ module Thor::Actions # # chmod "script/server", 0755 # - # source://thor//lib/thor/actions/file_manipulation.rb#146 + # source://thor//lib/thor/actions/file_manipulation.rb#145 def chmod(path, mode, config = T.unsafe(nil)); end # Comment all lines matching a given regex. It will leave the space @@ -737,16 +751,25 @@ module Thor::Actions # # comment_lines 'config/initializers/session_store.rb', /cookie_store/ # - # source://thor//lib/thor/actions/file_manipulation.rb#310 + # source://thor//lib/thor/actions/file_manipulation.rb#308 def comment_lines(path, flag, *args); end + # Copies the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source<String>:: the relative path to the source root. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status, and + # :mode => :preserve, to preserve the file mode from the source. + # # ==== Examples # # copy_file "README", "doc/README" # # copy_file "doc/README" # - # source://thor//lib/thor/actions/file_manipulation.rb#21 + # source://thor//lib/thor/actions/file_manipulation.rb#20 def copy_file(source, *args, &block); end # Create a new file relative to the destination root with the given data, @@ -885,7 +908,7 @@ module Thor::Actions # content.split("\n").first # end # - # source://thor//lib/thor/actions/file_manipulation.rb#82 + # source://thor//lib/thor/actions/file_manipulation.rb#81 def get(source, *args, &block); end # Run a regular expression replacement on a file. @@ -905,7 +928,7 @@ module Thor::Actions # match << " no more. Use thor!" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#263 + # source://thor//lib/thor/actions/file_manipulation.rb#262 def gsub_file(path, flag, *args, &block); end # Goes to the root and execute the given block. @@ -930,7 +953,7 @@ module Thor::Actions # " filter_parameter :password\n" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#217 + # source://thor//lib/thor/actions/file_manipulation.rb#216 def inject_into_class(path, klass, *args, &block); end # source://thor//lib/thor/actions/inject_into_file.rb#26 @@ -953,7 +976,7 @@ module Thor::Actions # " def help; 'help'; end\n" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#240 + # source://thor//lib/thor/actions/file_manipulation.rb#239 def inject_into_module(path, module_name, *args, &block); end # source://thor//lib/thor/actions/inject_into_file.rb#26 @@ -987,7 +1010,7 @@ module Thor::Actions # # link_file "doc/README" # - # source://thor//lib/thor/actions/file_manipulation.rb#51 + # source://thor//lib/thor/actions/file_manipulation.rb#50 def link_file(source, *args); end # Prepend text to a file. Since it depends on insert_into_file, it's reversible. @@ -1005,7 +1028,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#171 + # source://thor//lib/thor/actions/file_manipulation.rb#170 def prepend_file(path, *args, &block); end # Prepend text to a file. Since it depends on insert_into_file, it's reversible. @@ -1023,7 +1046,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#171 + # source://thor//lib/thor/actions/file_manipulation.rb#170 def prepend_to_file(path, *args, &block); end # Returns the given path relative to the absolute root (ie, root where @@ -1043,7 +1066,7 @@ module Thor::Actions # remove_file 'README' # remove_file 'app/controllers/application_controller.rb' # - # source://thor//lib/thor/actions/file_manipulation.rb#327 + # source://thor//lib/thor/actions/file_manipulation.rb#325 def remove_dir(path, config = T.unsafe(nil)); end # Removes a file at the given location. @@ -1057,7 +1080,7 @@ module Thor::Actions # remove_file 'README' # remove_file 'app/controllers/application_controller.rb' # - # source://thor//lib/thor/actions/file_manipulation.rb#327 + # source://thor//lib/thor/actions/file_manipulation.rb#325 def remove_file(path, config = T.unsafe(nil)); end # Executes a command returning the contents of the command. @@ -1105,7 +1128,7 @@ module Thor::Actions # # template "doc/README" # - # source://thor//lib/thor/actions/file_manipulation.rb#118 + # source://thor//lib/thor/actions/file_manipulation.rb#117 def template(source, *args, &block); end # Run a thor command. A hash of options can be given and it's converted to @@ -1129,9 +1152,8 @@ module Thor::Actions # source://thor//lib/thor/actions.rb#308 def thor(command, *args); end - # Uncomment all lines matching a given regex. It will leave the space - # which existed before the comment hash in tact but will remove any spacing - # between the comment hash and the beginning of the line. + # Uncomment all lines matching a given regex. Preserves indentation before + # the comment hash and removes the hash and any immediate following space. # # ==== Parameters # path<String>:: path of the file to be changed @@ -1142,7 +1164,7 @@ module Thor::Actions # # uncomment_lines 'config/initializers/session_store.rb', /active_record/ # - # source://thor//lib/thor/actions/file_manipulation.rb#291 + # source://thor//lib/thor/actions/file_manipulation.rb#289 def uncomment_lines(path, flag, *args); end protected @@ -1157,25 +1179,25 @@ module Thor::Actions private - # source://thor//lib/thor/actions/file_manipulation.rb#348 + # source://thor//lib/thor/actions/file_manipulation.rb#346 def capture(*args); end - # source://thor//lib/thor/actions/file_manipulation.rb#344 + # source://thor//lib/thor/actions/file_manipulation.rb#342 def concat(string); end # Returns the value of attribute output_buffer. # - # source://thor//lib/thor/actions/file_manipulation.rb#339 + # source://thor//lib/thor/actions/file_manipulation.rb#337 def output_buffer; end # Sets the attribute output_buffer # # @param value the value to set the attribute output_buffer to. # - # source://thor//lib/thor/actions/file_manipulation.rb#339 + # source://thor//lib/thor/actions/file_manipulation.rb#337 def output_buffer=(_arg0); end - # source://thor//lib/thor/actions/file_manipulation.rb#352 + # source://thor//lib/thor/actions/file_manipulation.rb#350 def with_output_buffer(buf = T.unsafe(nil)); end class << self @@ -1187,9 +1209,9 @@ end # Thor::Actions#capture depends on what kind of buffer is used in ERB. # Thus CapturableERB fixes ERB to use String buffer. # -# source://thor//lib/thor/actions/file_manipulation.rb#364 +# source://thor//lib/thor/actions/file_manipulation.rb#362 class Thor::Actions::CapturableERB < ::ERB - # source://thor//lib/thor/actions/file_manipulation.rb#365 + # source://thor//lib/thor/actions/file_manipulation.rb#363 def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end end @@ -1541,7 +1563,7 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def enum; end - # source://thor//lib/thor/parser/argument.rb#55 + # source://thor//lib/thor/parser/argument.rb#52 def enum_to_s; end # Returns the value of attribute name. @@ -1564,12 +1586,12 @@ class Thor::Argument # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#42 + # source://thor//lib/thor/parser/argument.rb#39 def required?; end # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#46 + # source://thor//lib/thor/parser/argument.rb#43 def show_default?; end # Returns the value of attribute type. @@ -1577,22 +1599,22 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def type; end - # source://thor//lib/thor/parser/argument.rb#38 + # source://thor//lib/thor/parser/argument.rb#35 def usage; end protected - # source://thor//lib/thor/parser/argument.rb#74 + # source://thor//lib/thor/parser/argument.rb#71 def default_banner; end # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#70 + # source://thor//lib/thor/parser/argument.rb#67 def valid_type?(type); end # @raise [ArgumentError] # - # source://thor//lib/thor/parser/argument.rb#65 + # source://thor//lib/thor/parser/argument.rb#62 def validate!; end end @@ -2621,7 +2643,7 @@ class Thor::Group # Shortcut to invoke with padding and block handling. Use internally by # invoke and invoke_from_option class methods. # - # source://thor//lib/thor/group.rb#265 + # source://thor//lib/thor/group.rb#276 def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end class << self @@ -2631,6 +2653,19 @@ class Thor::Group # source://thor//lib/thor/group.rb#161 def class_options_help(shell, groups = T.unsafe(nil)); end + # Checks if a specified command exists. + # + # ==== Parameters + # command_name<String>:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/group.rb#221 + def command_exists?(command_name); end + # The description for this Thor::Group. If none is provided, but a source root # exists, tries to find the USAGE one folder above it, otherwise searches # in the superclass. @@ -2738,33 +2773,33 @@ class Thor::Group # The banner for this class. You can customize it if you are invoking the # thor class by another ways which is not the Thor::Runner. # - # source://thor//lib/thor/group.rb#238 + # source://thor//lib/thor/group.rb#249 def banner; end - # source://thor//lib/thor/group.rb#248 + # source://thor//lib/thor/group.rb#259 def baseclass; end - # source://thor//lib/thor/group.rb#252 + # source://thor//lib/thor/group.rb#263 def create_command(meth); end - # source://thor//lib/thor/group.rb#252 + # source://thor//lib/thor/group.rb#263 def create_task(meth); end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor//lib/thor/group.rb#217 + # source://thor//lib/thor/group.rb#228 def dispatch(command, given_args, given_opts, config); end # Represents the whole class as a command. # - # source://thor//lib/thor/group.rb#243 + # source://thor//lib/thor/group.rb#254 def self_command; end # Represents the whole class as a command. # - # source://thor//lib/thor/group.rb#243 + # source://thor//lib/thor/group.rb#254 def self_task; end end end @@ -3277,14 +3312,15 @@ class Thor::Options < ::Thor::Arguments # source://thor//lib/thor/parser/options.rb#244 def normalize_switch(arg); end - # Parse boolean values which can be given as --foo=true, --foo or --no-foo. + # Parse boolean values which can be given as --foo=true or --foo for true values, or + # --foo=false, --no-foo or --skip-foo for false values. # - # source://thor//lib/thor/parser/options.rb#255 + # source://thor//lib/thor/parser/options.rb#256 def parse_boolean(switch); end # Parse the value at the peek analyzing if it requires an input or not. # - # source://thor//lib/thor/parser/options.rb#273 + # source://thor//lib/thor/parser/options.rb#274 def parse_peek(switch, option); end # @return [Boolean] @@ -3479,15 +3515,15 @@ class Thor::Shell::Basic # Readline. # # ==== Example - # ask("What is your name?") + # ask("What is your name?") # - # ask("What is the planet furthest from the sun?", :default => "Pluto") + # ask("What is the planet furthest from the sun?", :default => "Neptune") # - # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) + # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) # - # ask("What is your password?", :echo => false) + # ask("What is your password?", :echo => false) # - # ask("Where should the file be saved?", :path => true) + # ask("Where should the file be saved?", :path => true) # # source://thor//lib/thor/shell/basic.rb#80 def ask(statement, *args); end @@ -3540,7 +3576,7 @@ class Thor::Shell::Basic # source://thor//lib/thor/shell/basic.rb#31 def mute?; end - # Make a question the to user and returns true if the user replies "n" or + # Asks the user a question and returns true if the user replies "n" or # "no". # # @return [Boolean] @@ -3596,7 +3632,7 @@ class Thor::Shell::Basic # are passed straight to puts (behavior got from Highline). # # ==== Example - # say("I know you knew that.") + # say("I know you knew that.") # # source://thor//lib/thor/shell/basic.rb#98 def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end @@ -3606,7 +3642,7 @@ class Thor::Shell::Basic # are passed straight to puts (behavior got from Highline). # # ==== Example - # say_error("error: something went wrong") + # say_error("error: something went wrong") # # source://thor//lib/thor/shell/basic.rb#115 def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end @@ -3625,7 +3661,7 @@ class Thor::Shell::Basic # source://thor//lib/thor/shell/basic.rb#258 def set_color(string, *_arg1); end - # Make a question the to user and returns true if the user replies "y" or + # Asks the user a question and returns true if the user replies "y" or # "yes". # # @return [Boolean] @@ -3873,7 +3909,7 @@ class Thor::Shell::HTML < ::Thor::Shell::Basic # Ask something to the user and receives a response. # # ==== Example - # ask("What is your name?") + # ask("What is your name?") # # TODO: Implement #ask for Thor::Shell::HTML # @@ -3998,13 +4034,10 @@ class Thor::Shell::TablePrinter < ::Thor::Shell::ColumnPrinter private - # source://thor//lib/thor/shell/table_printer.rb#120 - def as_unicode; end - # source://thor//lib/thor/shell/table_printer.rb#72 def format_cell(column, row_size, index); end - # source://thor//lib/thor/shell/table_printer.rb#115 + # source://thor//lib/thor/shell/table_printer.rb#113 def indentation; end # source://thor//lib/thor/shell/table_printer.rb#47 diff --git a/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi b/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi similarity index 99% rename from sorbet/rbi/gems/unicode-display_width@2.5.0.rbi rename to sorbet/rbi/gems/unicode-display_width@2.6.0.rbi index ccdfd06..2aaad23 100644 --- a/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +++ b/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `unicode-display_width` gem. # Please instead update this file by running `bin/tapioca gem unicode-display_width`. + # source://unicode-display_width//lib/unicode/display_width/constants.rb#3 module Unicode; end diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi similarity index 90% rename from sorbet/rbi/gems/yard-sorbet@0.8.1.rbi rename to sorbet/rbi/gems/yard-sorbet@0.9.0.rbi index 8e66c30..cf7deb6 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `yard-sorbet` gem. # Please instead update this file by running `bin/tapioca gem yard-sorbet`. + class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base include ::YARDSorbet::Handlers::StructClassHandler end @@ -35,7 +36,7 @@ end # source://yard-sorbet//lib/yard-sorbet/handlers.rb#7 module YARDSorbet::Handlers; end -# Apllies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present). +# Applies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present). # # source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7 class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base @@ -94,7 +95,7 @@ end # # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9 class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base - # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#23 + # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#21 sig { void } def process; end @@ -120,7 +121,7 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73 sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void } - def document_attr_methods(method_objects); end + def document_attrs(method_objects); end # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr* # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr* @@ -130,7 +131,7 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) } def merged_into_attr?(attr_node); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#78 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#76 sig do params( attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode), @@ -140,15 +141,15 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base end def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#99 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#97 sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } def parse_params(node, docstring); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#109 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#107 sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } def parse_return(node, docstring); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#87 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#85 sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void } def parse_sig(docstring, include_params: T.unsafe(nil)); end @@ -222,27 +223,27 @@ class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base sig { returns(T::Boolean) } def immutable?; end - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#44 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#42 sig { params(kwd: ::String).returns(T.nilable(::String)) } def kw_arg(kwd); end - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#49 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#45 sig { params(name: ::String).returns(::YARDSorbet::TStructProp) } def make_prop(name); end - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#56 sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) } def params; end # Register the field explicitly as an attribute. # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#66 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void } def register_attrs(object, name); end # Store the prop for use in the constructor definition # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#74 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#68 sig { params(prop: ::YARDSorbet::TStructProp).void } def update_state(prop); end end @@ -266,13 +267,19 @@ module YARDSorbet::NodeUtils end def bfs_traverse(node, &_blk); end - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#32 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#31 sig { params(node: ::YARD::Parser::Ruby::AstNode).void } def delete_node(node); end + # Enqueue the eligible children of a node in the BFS queue + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#35 + sig { params(queue: ::Thread::Queue, node: ::YARD::Parser::Ruby::AstNode).void } + def enqueue_children(queue, node); end + # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#38 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#48 sig do params( node: ::YARD::Parser::Ruby::AstNode @@ -284,17 +291,17 @@ module YARDSorbet::NodeUtils # # @raise [IndexError] if the node does not have an adjacent sibling (ascending) # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#45 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#53 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) } def sibling_node(node); end - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#52 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#60 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } def sigable_node?(node); end # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#63 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#71 sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } def validated_attribute_names(attr_node); end end @@ -328,43 +335,43 @@ module YARDSorbet::SigToYARD private - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#61 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#58 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) } def build_generic_type(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#70 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#67 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_aref(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#82 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#79 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_array(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#90 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#87 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_collection(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#97 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#94 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_hash(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#105 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#102 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_list(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#31 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#28 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_node(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#43 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#40 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_node_type(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#110 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#107 sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } def convert_t_method(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#121 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#118 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_unknown(node); end end @@ -381,7 +388,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11633/lib/types/struct.rb#13 def inherited(s); end end end @@ -403,7 +410,7 @@ module YARDSorbet::TagUtils # Create or update a `YARD` tag with type information # - # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#30 + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#28 sig do params( docstring: ::YARD::Docstring, diff --git a/sorbet/rbi/gems/yard@0.9.34.rbi b/sorbet/rbi/gems/yard@0.9.37.rbi similarity index 97% rename from sorbet/rbi/gems/yard@0.9.34.rbi rename to sorbet/rbi/gems/yard@0.9.37.rbi index 5fae9e6..b7622a2 100644 --- a/sorbet/rbi/gems/yard@0.9.34.rbi +++ b/sorbet/rbi/gems/yard@0.9.37.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `yard` gem. # Please instead update this file by running `bin/tapioca gem yard`. + # source://yard//lib/yard.rb#61 ::RUBY18 = T.let(T.unsafe(nil), FalseClass) @@ -2480,7 +2481,7 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def ==(other); end # Accesses a custom attribute on the object @@ -2489,7 +2490,7 @@ class YARD::CodeObjects::Base # @return [Object, nil] the custom attribute or nil if not found. # @see #[]= # - # source://yard//lib/yard/code_objects/base.rb#342 + # source://yard//lib/yard/code_objects/base.rb#343 def [](key); end # Sets a custom attribute on the object @@ -2499,7 +2500,7 @@ class YARD::CodeObjects::Base # @return [void] # @see #[] # - # source://yard//lib/yard/code_objects/base.rb#355 + # source://yard//lib/yard/code_objects/base.rb#356 def []=(key, value); end # Associates a file with a code object, optionally adding the line where it was defined. @@ -2520,7 +2521,7 @@ class YARD::CodeObjects::Base # @see Docstring#add_tag # @since 0.8.4 # - # source://yard//lib/yard/code_objects/base.rb#560 + # source://yard//lib/yard/code_objects/base.rb#561 def add_tag(*tags); end # The non-localized documentation string associated with the object @@ -2547,7 +2548,7 @@ class YARD::CodeObjects::Base # the locale of the documentation string. # @return [Docstring] the documentation string # - # source://yard//lib/yard/code_objects/base.rb#404 + # source://yard//lib/yard/code_objects/base.rb#405 def docstring(locale = T.unsafe(nil)); end # Attaches a docstring to a code object by parsing the comments attached to the statement @@ -2556,7 +2557,7 @@ class YARD::CodeObjects::Base # @param comments [String, Array<String>, Docstring] the comments attached to the code object to be parsed # into a docstring and meta tags. # - # source://yard//lib/yard/code_objects/base.rb#426 + # source://yard//lib/yard/code_objects/base.rb#427 def docstring=(comments); end # Marks whether or not the method is conditionally defined at runtime @@ -2587,7 +2588,7 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def eql?(other); end # Tests if another object is equal to this, including a proxy @@ -2596,15 +2597,16 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def equal?(other); end # Returns the filename the object was first parsed at, taking # definitions with docstrings first. # # @return [String] a filename + # @return [nil] if there is no file associated with the object # - # source://yard//lib/yard/code_objects/base.rb#306 + # source://yard//lib/yard/code_objects/base.rb#307 def file; end # The files the object was defined in. To add a file, use {#add_file}. @@ -2629,7 +2631,7 @@ class YARD::CodeObjects::Base # @return [String] the rendered template # @see Templates::Engine#render # - # source://yard//lib/yard/code_objects/base.rb#504 + # source://yard//lib/yard/code_objects/base.rb#505 def format(options = T.unsafe(nil)); end # @return [String] the group this object is associated with @@ -2649,19 +2651,19 @@ class YARD::CodeObjects::Base # @return [Boolean] # @see Docstring#has_tag? # - # source://yard//lib/yard/code_objects/base.rb#555 + # source://yard//lib/yard/code_objects/base.rb#556 def has_tag?(name); end # @return [Integer] the object's hash value (for equality checking) # - # source://yard//lib/yard/code_objects/base.rb#333 + # source://yard//lib/yard/code_objects/base.rb#334 def hash; end # Inspects the object, returning the type and path # # @return [String] a string describing the object # - # source://yard//lib/yard/code_objects/base.rb#512 + # source://yard//lib/yard/code_objects/base.rb#513 def inspect; end # Returns the line the object was first parsed at (or nil) @@ -2669,13 +2671,13 @@ class YARD::CodeObjects::Base # @return [Fixnum] the line where the object was first defined. # @return [nil] if there is no line associated with the object # - # source://yard//lib/yard/code_objects/base.rb#314 + # source://yard//lib/yard/code_objects/base.rb#315 def line; end # @overload dynamic_attr_name # @overload dynamic_attr_name= # - # source://yard//lib/yard/code_objects/base.rb#372 + # source://yard//lib/yard/code_objects/base.rb#373 def method_missing(meth, *args, &block); end # The name of the object @@ -2703,7 +2705,7 @@ class YARD::CodeObjects::Base # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. # - # source://yard//lib/yard/code_objects/base.rb#521 + # source://yard//lib/yard/code_objects/base.rb#522 def namespace=(obj); end # The namespace the object is defined in. If the object is in the @@ -2720,7 +2722,7 @@ class YARD::CodeObjects::Base # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. # - # source://yard//lib/yard/code_objects/base.rb#521 + # source://yard//lib/yard/code_objects/base.rb#522 def parent=(obj); end # Represents the unique path of the object. The default implementation @@ -2733,19 +2735,19 @@ class YARD::CodeObjects::Base # @return [String] the unique path of the object # @see #sep # - # source://yard//lib/yard/code_objects/base.rb#452 + # source://yard//lib/yard/code_objects/base.rb#453 def path; end # @param other [Base, String] another code object (or object path) # @return [String] the shortest relative path from this object to +other+ # @since 0.5.3 # - # source://yard//lib/yard/code_objects/base.rb#474 + # source://yard//lib/yard/code_objects/base.rb#475 def relative_path(other); end # @return [Boolean] whether or not this object is a RootObject # - # source://yard//lib/yard/code_objects/base.rb#566 + # source://yard//lib/yard/code_objects/base.rb#567 def root?; end # Override this method with a custom component separator. For instance, @@ -2756,7 +2758,7 @@ class YARD::CodeObjects::Base # @return [String] the component that separates the namespace path # and the name (default is {NSEP}) # - # source://yard//lib/yard/code_objects/base.rb#575 + # source://yard//lib/yard/code_objects/base.rb#576 def sep; end # The one line signature representing an object. For a method, this will @@ -2789,7 +2791,7 @@ class YARD::CodeObjects::Base # @param statement [#source, String] the +Parser::Statement+ holding the source code or the raw source # as a +String+ for the definition of the code object only (not the block) # - # source://yard//lib/yard/code_objects/base.rb#387 + # source://yard//lib/yard/code_objects/base.rb#388 def source=(statement); end # Language of the source code associated with the object. Defaults to @@ -2812,14 +2814,14 @@ class YARD::CodeObjects::Base # # @see Docstring#tag # - # source://yard//lib/yard/code_objects/base.rb#547 + # source://yard//lib/yard/code_objects/base.rb#548 def tag(name); end # Gets a list of tags from the {#docstring} # # @see Docstring#tags # - # source://yard//lib/yard/code_objects/base.rb#551 + # source://yard//lib/yard/code_objects/base.rb#552 def tags(name = T.unsafe(nil)); end # @note Override this method if your object has a special title that does @@ -2828,12 +2830,12 @@ class YARD::CodeObjects::Base # @return [String] the display title for an object # @see 0.8.4 # - # source://yard//lib/yard/code_objects/base.rb#467 + # source://yard//lib/yard/code_objects/base.rb#468 def title; end # @return [nil] this object does not turn into an array # - # source://yard//lib/yard/code_objects/base.rb#336 + # source://yard//lib/yard/code_objects/base.rb#337 def to_ary; end # Represents the unique path of the object. The default implementation @@ -2846,7 +2848,7 @@ class YARD::CodeObjects::Base # @return [String] the unique path of the object # @see #sep # - # source://yard//lib/yard/code_objects/base.rb#452 + # source://yard//lib/yard/code_objects/base.rb#453 def to_s; end # Default type is the lowercase class name without the "Object" suffix. @@ -2854,7 +2856,7 @@ class YARD::CodeObjects::Base # # @return [Symbol] the type of code object this represents # - # source://yard//lib/yard/code_objects/base.rb#436 + # source://yard//lib/yard/code_objects/base.rb#437 def type; end # @return [Symbol] the visibility of an object (:public, :private, :protected) @@ -2877,7 +2879,7 @@ class YARD::CodeObjects::Base # @see #copy_to # @since 0.8.0 # - # source://yard//lib/yard/code_objects/base.rb#586 + # source://yard//lib/yard/code_objects/base.rb#587 def copyable_attributes; end private @@ -2887,10 +2889,10 @@ class YARD::CodeObjects::Base # @param source [String] the source code to format # @return [String] formatted source # - # source://yard//lib/yard/code_objects/base.rb#598 + # source://yard//lib/yard/code_objects/base.rb#599 def format_source(source); end - # source://yard//lib/yard/code_objects/base.rb#605 + # source://yard//lib/yard/code_objects/base.rb#606 def translate_docstring(locale); end class << self @@ -3263,11 +3265,11 @@ YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp) # # Extra data added to docstring # property :bar # -# source://yard//lib/yard/code_objects/macro_object.rb#30 +# source://yard//lib/yard/code_objects/macro_object.rb#29 class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [Boolean] whether this macro is attached to a method # - # source://yard//lib/yard/code_objects/macro_object.rb#149 + # source://yard//lib/yard/code_objects/macro_object.rb#148 def attached?; end # Expands the macro using @@ -3282,39 +3284,39 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # call, if there is a block. # @see expand # - # source://yard//lib/yard/code_objects/macro_object.rb#167 + # source://yard//lib/yard/code_objects/macro_object.rb#166 def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # @return [String] the macro data stored on the object # - # source://yard//lib/yard/code_objects/macro_object.rb#142 + # source://yard//lib/yard/code_objects/macro_object.rb#141 def macro_data; end # @return [String] the macro data stored on the object # - # source://yard//lib/yard/code_objects/macro_object.rb#142 + # source://yard//lib/yard/code_objects/macro_object.rb#141 def macro_data=(_arg0); end # @return [CodeObjects::Base] the method object that this macro is # attached to. # - # source://yard//lib/yard/code_objects/macro_object.rb#146 + # source://yard//lib/yard/code_objects/macro_object.rb#145 def method_object; end # @return [CodeObjects::Base] the method object that this macro is # attached to. # - # source://yard//lib/yard/code_objects/macro_object.rb#146 + # source://yard//lib/yard/code_objects/macro_object.rb#145 def method_object=(_arg0); end # Overrides {Base#path} so the macro path is ".macro.MACRONAME" # - # source://yard//lib/yard/code_objects/macro_object.rb#152 + # source://yard//lib/yard/code_objects/macro_object.rb#151 def path; end # Overrides the separator to be '.' # - # source://yard//lib/yard/code_objects/macro_object.rb#155 + # source://yard//lib/yard/code_objects/macro_object.rb#154 def sep; end class << self @@ -3332,7 +3334,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [String] the expanded macro data # @see find_or_create # - # source://yard//lib/yard/code_objects/macro_object.rb#120 + # source://yard//lib/yard/code_objects/macro_object.rb#119 def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end # Applies a macro to a docstring, interpolating the macro's data on the @@ -3348,7 +3350,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # interpolating the block data as a variable. # @return [String] the expanded macro data # - # source://yard//lib/yard/code_objects/macro_object.rb#136 + # source://yard//lib/yard/code_objects/macro_object.rb#135 def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # Creates a new macro and fills in the relevant properties. @@ -3359,7 +3361,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # macro to. If supplied, {#attached?} will be true # @return [MacroObject] the newly created object # - # source://yard//lib/yard/code_objects/macro_object.rb#40 + # source://yard//lib/yard/code_objects/macro_object.rb#39 def create(macro_name, data, method_object = T.unsafe(nil)); end # Parses a given docstring and determines if the macro is "new" or @@ -3379,7 +3381,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [nil] if the +data+ has no macro tag or if the macro is # not new and no macro by the macro name is found. # - # source://yard//lib/yard/code_objects/macro_object.rb#71 + # source://yard//lib/yard/code_objects/macro_object.rb#70 def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end # Expands +macro_data+ using the interpolation parameters. @@ -3392,7 +3394,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # # @param macro_data [String] the macro data to expand (taken from {#macro_data}) # - # source://yard//lib/yard/code_objects/macro_object.rb#93 + # source://yard//lib/yard/code_objects/macro_object.rb#92 def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # Finds a macro using +macro_name+ @@ -3401,7 +3403,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [MacroObject] if a macro is found # @return [nil] if there is no registered macro by that name # - # source://yard//lib/yard/code_objects/macro_object.rb#51 + # source://yard//lib/yard/code_objects/macro_object.rb#50 def find(macro_name); end # Parses a given docstring and determines if the macro is "new" or @@ -3421,12 +3423,12 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [nil] if the +data+ has no macro tag or if the macro is # not new and no macro by the macro name is found. # - # source://yard//lib/yard/code_objects/macro_object.rb#71 + # source://yard//lib/yard/code_objects/macro_object.rb#70 def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end end end -# source://yard//lib/yard/code_objects/macro_object.rb#31 +# source://yard//lib/yard/code_objects/macro_object.rb#30 YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) # Represents a Ruby method in source @@ -4761,7 +4763,7 @@ YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) # @see #parse_content # @since 0.8.0 # -# source://yard//lib/yard/docstring_parser.rb#30 +# source://yard//lib/yard/docstring_parser.rb#29 class YARD::DocstringParser # Creates a new parser to parse docstring data # @@ -4770,7 +4772,7 @@ class YARD::DocstringParser # @return [DocstringParser] a new instance of DocstringParser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#81 + # source://yard//lib/yard/docstring_parser.rb#80 def initialize(library = T.unsafe(nil)); end # Creates a new directive using the registered {#library} @@ -4778,14 +4780,14 @@ class YARD::DocstringParser # @return [Tags::Directive] the directive object that is created # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#232 + # source://yard//lib/yard/docstring_parser.rb#231 def create_directive(tag_name, tag_buf); end # Creates a {Tags::RefTag} # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#226 + # source://yard//lib/yard/docstring_parser.rb#225 def create_ref_tag(tag_name, name, object_name); end # Creates a tag from the {Tags::DefaultFactory tag factory}. @@ -4797,7 +4799,7 @@ class YARD::DocstringParser # @return [Tags::Tag, Tags::RefTag] a tag # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#209 + # source://yard//lib/yard/docstring_parser.rb#208 def create_tag(tag_name, tag_buf = T.unsafe(nil)); end # @return [Array<Tags::Directive>] a list of directives identified @@ -4805,7 +4807,7 @@ class YARD::DocstringParser # Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#45 + # source://yard//lib/yard/docstring_parser.rb#44 def directives; end # @return [Array<Tags::Directive>] a list of directives identified @@ -4813,7 +4815,7 @@ class YARD::DocstringParser # Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#45 + # source://yard//lib/yard/docstring_parser.rb#44 def directives=(_arg0); end # @return [Handlers::Base, nil] the handler parsing this @@ -4821,7 +4823,7 @@ class YARD::DocstringParser # initialized through # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#66 + # source://yard//lib/yard/docstring_parser.rb#65 def handler; end # @return [Handlers::Base, nil] the handler parsing this @@ -4829,21 +4831,21 @@ class YARD::DocstringParser # initialized through # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#66 + # source://yard//lib/yard/docstring_parser.rb#65 def handler=(_arg0); end # @return [Tags::Library] the tag library being used to # identify registered tags in the docstring. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#70 + # source://yard//lib/yard/docstring_parser.rb#69 def library; end # @return [Tags::Library] the tag library being used to # identify registered tags in the docstring. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#70 + # source://yard//lib/yard/docstring_parser.rb#69 def library=(_arg0); end # @return [CodeObjects::Base, nil] the object associated with @@ -4851,7 +4853,7 @@ class YARD::DocstringParser # not attached to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#56 + # source://yard//lib/yard/docstring_parser.rb#55 def object; end # @return [CodeObjects::Base, nil] the object associated with @@ -4859,7 +4861,7 @@ class YARD::DocstringParser # not attached to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#56 + # source://yard//lib/yard/docstring_parser.rb#55 def object=(_arg0); end # Parses all content and returns itself. @@ -4876,7 +4878,7 @@ class YARD::DocstringParser # @see #to_docstring # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#113 + # source://yard//lib/yard/docstring_parser.rb#112 def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end # Parses a given block of text. @@ -4886,7 +4888,7 @@ class YARD::DocstringParser # @param content [String] the content to parse # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#129 + # source://yard//lib/yard/docstring_parser.rb#128 def parse_content(content); end # Call post processing callbacks on parser. @@ -4896,19 +4898,19 @@ class YARD::DocstringParser # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#196 + # source://yard//lib/yard/docstring_parser.rb#195 def post_process; end # @return [String] the complete input string to the parser. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#36 + # source://yard//lib/yard/docstring_parser.rb#35 def raw_text; end # @return [String] the complete input string to the parser. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#36 + # source://yard//lib/yard/docstring_parser.rb#35 def raw_text=(_arg0); end # @return [CodeObjects::Base, nil] the object referenced by @@ -4916,7 +4918,7 @@ class YARD::DocstringParser # refer to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#61 + # source://yard//lib/yard/docstring_parser.rb#60 def reference; end # @return [CodeObjects::Base, nil] the object referenced by @@ -4924,7 +4926,7 @@ class YARD::DocstringParser # refer to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#61 + # source://yard//lib/yard/docstring_parser.rb#60 def reference=(_arg0); end # @return [OpenStruct] any arbitrary state to be passed between @@ -4933,7 +4935,7 @@ class YARD::DocstringParser # used in a docstring). # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#51 + # source://yard//lib/yard/docstring_parser.rb#50 def state; end # @return [OpenStruct] any arbitrary state to be passed between @@ -4942,7 +4944,7 @@ class YARD::DocstringParser # used in a docstring). # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#51 + # source://yard//lib/yard/docstring_parser.rb#50 def state=(_arg0); end # Backward compatibility to detect old tags that should be specified @@ -4951,42 +4953,42 @@ class YARD::DocstringParser # @return [Boolean] # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#252 + # source://yard//lib/yard/docstring_parser.rb#251 def tag_is_directive?(tag_name); end # @return [Array<Tags::Tag>] the list of meta-data tags identified # by the parser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#40 + # source://yard//lib/yard/docstring_parser.rb#39 def tags; end # @return [Array<Tags::Tag>] the list of meta-data tags identified # by the parser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#40 + # source://yard//lib/yard/docstring_parser.rb#39 def tags=(_arg0); end # @return [String] the parsed text portion of the docstring, # with tags removed. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#33 + # source://yard//lib/yard/docstring_parser.rb#32 def text; end # @return [String] the parsed text portion of the docstring, # with tags removed. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#33 + # source://yard//lib/yard/docstring_parser.rb#32 def text=(_arg0); end # @return [Docstring] translates parsed text into # a Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#95 + # source://yard//lib/yard/docstring_parser.rb#94 def to_docstring; end private @@ -4995,7 +4997,7 @@ class YARD::DocstringParser # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#324 + # source://yard//lib/yard/docstring_parser.rb#323 def call_after_parse_callbacks; end # Calls the {Tags::Directive#after_parse} callback on all the @@ -5003,17 +5005,17 @@ class YARD::DocstringParser # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#319 + # source://yard//lib/yard/docstring_parser.rb#318 def call_directives_after_parse; end # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#305 + # source://yard//lib/yard/docstring_parser.rb#304 def detect_reference(content); end # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#301 + # source://yard//lib/yard/docstring_parser.rb#300 def namespace; end class << self @@ -5028,13 +5030,13 @@ class YARD::DocstringParser # with all directives and tags created. # @yieldreturn [void] # - # source://yard//lib/yard/docstring_parser.rb#266 + # source://yard//lib/yard/docstring_parser.rb#265 def after_parse(&block); end # @return [Array<Proc>] the {after_parse} callback proc objects # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#271 + # source://yard//lib/yard/docstring_parser.rb#270 def after_parse_callbacks; end end end @@ -5043,7 +5045,7 @@ end # # @since 0.8.0 # -# source://yard//lib/yard/docstring_parser.rb#73 +# source://yard//lib/yard/docstring_parser.rb#72 YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp) # source://yard//lib/yard/gem_index.rb#6 @@ -5952,14 +5954,14 @@ end # # @see Handlers::Base # -# source://yard//lib/yard/handlers/processor.rb#20 +# source://yard//lib/yard/handlers/processor.rb#19 class YARD::Handlers::Processor # Creates a new Processor for a +file+. # # @param parser [Parser::SourceParser] the parser used to initialize the processor # @return [Processor] a new instance of Processor # - # source://yard//lib/yard/handlers/processor.rb#92 + # source://yard//lib/yard/handlers/processor.rb#91 def initialize(parser); end # Share state across different handlers inside of a file. @@ -5972,7 +5974,7 @@ class YARD::Handlers::Processor # @return [OpenStruct] an open structure that can store arbitrary data # @see #globals # - # source://yard//lib/yard/handlers/processor.rb#88 + # source://yard//lib/yard/handlers/processor.rb#87 def extra_state; end # Share state across different handlers inside of a file. @@ -5985,17 +5987,17 @@ class YARD::Handlers::Processor # @return [OpenStruct] an open structure that can store arbitrary data # @see #globals # - # source://yard//lib/yard/handlers/processor.rb#88 + # source://yard//lib/yard/handlers/processor.rb#87 def extra_state=(_arg0); end # @return [String] the filename # - # source://yard//lib/yard/handlers/processor.rb#41 + # source://yard//lib/yard/handlers/processor.rb#40 def file; end # @return [String] the filename # - # source://yard//lib/yard/handlers/processor.rb#41 + # source://yard//lib/yard/handlers/processor.rb#40 def file=(_arg0); end # Searches for all handlers in {Base.subclasses} that match the +statement+ @@ -6003,7 +6005,7 @@ class YARD::Handlers::Processor # @param statement the statement object to match. # @return [Array<Base>] a list of handlers to process the statement with. # - # source://yard//lib/yard/handlers/processor.rb#151 + # source://yard//lib/yard/handlers/processor.rb#150 def find_handlers(statement); end # Handlers can share state for the entire post processing stage through @@ -6023,7 +6025,7 @@ class YARD::Handlers::Processor # @return [OpenStruct] global shared state for post-processing stage # @see #extra_state # - # source://yard//lib/yard/handlers/processor.rb#77 + # source://yard//lib/yard/handlers/processor.rb#76 def globals; end # Handlers can share state for the entire post processing stage through @@ -6043,17 +6045,17 @@ class YARD::Handlers::Processor # @return [OpenStruct] global shared state for post-processing stage # @see #extra_state # - # source://yard//lib/yard/handlers/processor.rb#77 + # source://yard//lib/yard/handlers/processor.rb#76 def globals=(_arg0); end # @return [CodeObjects::NamespaceObject] the current namespace # - # source://yard//lib/yard/handlers/processor.rb#44 + # source://yard//lib/yard/handlers/processor.rb#43 def namespace; end # @return [CodeObjects::NamespaceObject] the current namespace # - # source://yard//lib/yard/handlers/processor.rb#44 + # source://yard//lib/yard/handlers/processor.rb#43 def namespace=(_arg0); end # @return [CodeObjects::Base, nil] unlike the namespace, the owner @@ -6061,7 +6063,7 @@ class YARD::Handlers::Processor # For instance, when parsing a method body, the {CodeObjects::MethodObject} # is set as the owner, in case any extra method information is processed. # - # source://yard//lib/yard/handlers/processor.rb#56 + # source://yard//lib/yard/handlers/processor.rb#55 def owner; end # @return [CodeObjects::Base, nil] unlike the namespace, the owner @@ -6069,7 +6071,7 @@ class YARD::Handlers::Processor # For instance, when parsing a method body, the {CodeObjects::MethodObject} # is set as the owner, in case any extra method information is processed. # - # source://yard//lib/yard/handlers/processor.rb#56 + # source://yard//lib/yard/handlers/processor.rb#55 def owner=(_arg0); end # Continue parsing the remainder of the files in the +globals.ordered_parser+ @@ -6079,17 +6081,17 @@ class YARD::Handlers::Processor # @return [void] # @see Parser::OrderedParser # - # source://yard//lib/yard/handlers/processor.rb#140 + # source://yard//lib/yard/handlers/processor.rb#139 def parse_remaining_files; end # @return [Symbol] the parser type (:ruby, :ruby18, :c) # - # source://yard//lib/yard/handlers/processor.rb#59 + # source://yard//lib/yard/handlers/processor.rb#58 def parser_type; end # @return [Symbol] the parser type (:ruby, :ruby18, :c) # - # source://yard//lib/yard/handlers/processor.rb#59 + # source://yard//lib/yard/handlers/processor.rb#58 def parser_type=(_arg0); end # Processes a list of statements by finding handlers to process each @@ -6098,27 +6100,27 @@ class YARD::Handlers::Processor # @param statements [Array] a list of statements # @return [void] # - # source://yard//lib/yard/handlers/processor.rb#110 + # source://yard//lib/yard/handlers/processor.rb#109 def process(statements); end # @return [Symbol] the current scope (class, instance) # - # source://yard//lib/yard/handlers/processor.rb#50 + # source://yard//lib/yard/handlers/processor.rb#49 def scope; end # @return [Symbol] the current scope (class, instance) # - # source://yard//lib/yard/handlers/processor.rb#50 + # source://yard//lib/yard/handlers/processor.rb#49 def scope=(_arg0); end # @return [Symbol] the current visibility (public, private, protected) # - # source://yard//lib/yard/handlers/processor.rb#47 + # source://yard//lib/yard/handlers/processor.rb#46 def visibility; end # @return [Symbol] the current visibility (public, private, protected) # - # source://yard//lib/yard/handlers/processor.rb#47 + # source://yard//lib/yard/handlers/processor.rb#46 def visibility=(_arg0); end private @@ -6127,7 +6129,7 @@ class YARD::Handlers::Processor # # @return [Base] the base class # - # source://yard//lib/yard/handlers/processor.rb#172 + # source://yard//lib/yard/handlers/processor.rb#171 def handler_base_class; end # The module holding the handlers to be loaded @@ -6135,12 +6137,12 @@ class YARD::Handlers::Processor # @return [Module] the module containing the handlers depending on # {#parser_type}. # - # source://yard//lib/yard/handlers/processor.rb#180 + # source://yard//lib/yard/handlers/processor.rb#179 def handler_base_namespace; end # @return [Boolean] # - # source://yard//lib/yard/handlers/processor.rb#161 + # source://yard//lib/yard/handlers/processor.rb#160 def handles?(handler, statement); end # Loads handlers from {#handler_base_namespace}. This ensures that @@ -6149,7 +6151,7 @@ class YARD::Handlers::Processor # # @return [void] # - # source://yard//lib/yard/handlers/processor.rb#188 + # source://yard//lib/yard/handlers/processor.rb#187 def load_handlers; end class << self @@ -6157,14 +6159,14 @@ class YARD::Handlers::Processor # @return [Hash] a list of registered parser type extensions # @since 0.6.0 # - # source://yard//lib/yard/handlers/processor.rb#33 + # source://yard//lib/yard/handlers/processor.rb#32 def namespace_for_handler; end # Registers a new namespace for handlers of the given type. # # @since 0.6.0 # - # source://yard//lib/yard/handlers/processor.rb#24 + # source://yard//lib/yard/handlers/processor.rb#23 def register_handler_namespace(type, ns); end end end @@ -6997,6 +6999,11 @@ end # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#3 class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base include ::YARD::Handlers::Ruby::DecoratorHandlerMethods + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#31 + def is_attribute_method?(node); end end # Handles 'yield' calls @@ -7459,13 +7466,16 @@ end # Handles console logging for info, warnings and errors. # Uses the stdlib Logger class in Ruby for all the backend logic. # -# source://yard//lib/yard/logging.rb#9 -class YARD::Logger < ::Logger +# source://yard//lib/yard/logging.rb#8 +class YARD::Logger + include ::YARD::Logger::Severity + # Creates a new logger # + # @private # @return [Logger] a new instance of Logger # - # source://yard//lib/yard/logging.rb#43 + # source://yard//lib/yard/logging.rb#82 def initialize(pipe, *args); end # Displays an unformatted line to the logger output stream. @@ -7474,7 +7484,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#143 + # source://yard//lib/yard/logging.rb#205 def <<(msg = T.unsafe(nil)); end # Prints the backtrace +exc+ to the logger as error data. @@ -7483,7 +7493,7 @@ class YARD::Logger < ::Logger # @param level_meth [Symbol] the level to log backtrace at # @return [void] # - # source://yard//lib/yard/logging.rb#154 + # source://yard//lib/yard/logging.rb#216 def backtrace(exc, level_meth = T.unsafe(nil)); end # Captures the duration of a block of code for benchmark analysis. Also @@ -7496,7 +7506,7 @@ class YARD::Logger < ::Logger # @todo Implement capture storage for reporting of benchmarks # @yield a block of arbitrary code to benchmark # - # source://yard//lib/yard/logging.rb#80 + # source://yard//lib/yard/logging.rb#234 def capture(msg, nontty_log = T.unsafe(nil)); end # Clears the progress indicator in the TTY display. @@ -7504,14 +7514,18 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#121 + # source://yard//lib/yard/logging.rb#186 def clear_progress; end - # Changes the debug level to DEBUG if $DEBUG is set - # and writes a debugging message. + # Changes the debug level to DEBUG if $DEBUG is set and writes a debugging message. + # Logs a message with the debug severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log # - # source://yard//lib/yard/logging.rb#59 - def debug(*args); end + # source://yard//lib/yard/logging.rb#103 + def debug(message); end # Sets the logger level for the duration of the block # @@ -7523,17 +7537,65 @@ class YARD::Logger < ::Logger # values can be found in Ruby's Logger class. # @yield the block with the logger temporarily set to +new_level+ # - # source://yard//lib/yard/logging.rb#179 + # source://yard//lib/yard/logging.rb#142 def enter_level(new_level = T.unsafe(nil)); end + # Logs a message with the error severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def error(message); end + + # Logs a message with the fatal severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def fatal(message); end + + # Logs a message with the info severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def info(message); end + # @return [IO] the IO object being logged to # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#17 + # source://yard//lib/yard/logging.rb#49 def io; end - # source://yard//lib/yard/logging.rb#18 - def io=(pipe); end + # @return [IO] the IO object being logged to + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#49 + def io=(_arg0); end + + # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level + # + # source://yard//lib/yard/logging.rb#57 + def level; end + + # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level + # + # source://yard//lib/yard/logging.rb#57 + def level=(_arg0); end + + # Logs a message with a given severity + # + # @param severity [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the severity level + # @param message [String] the message to log + # + # source://yard//lib/yard/logging.rb#122 + def log(severity, message); end # Displays an unformatted line to the logger output stream. # @@ -7541,7 +7603,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#143 + # source://yard//lib/yard/logging.rb#205 def print(msg = T.unsafe(nil)); end # Displays a progress indicator for a given message. This progress report @@ -7554,7 +7616,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#96 + # source://yard//lib/yard/logging.rb#161 def progress(msg, nontty_log = T.unsafe(nil)); end # Displays an unformatted line to the logger output stream, adding @@ -7564,86 +7626,91 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#132 + # source://yard//lib/yard/logging.rb#197 def puts(msg = T.unsafe(nil)); end # @return [Boolean] whether backtraces should be shown (by default # this is on). # - # source://yard//lib/yard/logging.rb#22 + # source://yard//lib/yard/logging.rb#53 def show_backtraces; end # Sets the attribute show_backtraces # # @param value the value to set the attribute show_backtraces to. # - # source://yard//lib/yard/logging.rb#23 + # source://yard//lib/yard/logging.rb#54 def show_backtraces=(_arg0); end # @return [Boolean] whether progress indicators should be shown when # logging CLIs (by default this is off). # - # source://yard//lib/yard/logging.rb#27 + # source://yard//lib/yard/logging.rb#64 def show_progress; end # Sets the attribute show_progress # # @param value the value to set the attribute show_progress to. # - # source://yard//lib/yard/logging.rb#34 + # source://yard//lib/yard/logging.rb#70 def show_progress=(_arg0); end + # Logs a message with the unknown severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def unknown(message); end + # Remembers when a warning occurs and writes a warning message. + # Logs a message with the warn severity level. # - # source://yard//lib/yard/logging.rb#65 - def warn(*args); end + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def warn(message); end # Warns that the Ruby environment does not support continuations. Applies # to JRuby, Rubinius and MacRuby. This warning will only display once # per Ruby process. # # @deprecated Continuations are no longer needed by YARD 0.8.0+. + # @private # @return [void] # - # source://yard//lib/yard/logging.rb#167 + # source://yard//lib/yard/logging.rb#250 def warn_no_continuations; end - # Returns the value of attribute warned. + # @return [Boolean] whether a warn message has been emitted. Used for status tracking. # - # source://yard//lib/yard/logging.rb#69 + # source://yard//lib/yard/logging.rb#60 def warned; end - # Sets the attribute warned + # @return [Boolean] whether a warn message has been emitted. Used for status tracking. # - # @param value the value to set the attribute warned to. - # - # source://yard//lib/yard/logging.rb#69 + # source://yard//lib/yard/logging.rb#60 def warned=(_arg0); end private - # Override this internal Logger method to clear line - # - # source://yard//lib/yard/logging.rb#190 - def add(*args); end - - # source://yard//lib/yard/logging.rb#195 + # source://yard//lib/yard/logging.rb#255 def clear_line; end - # Log format (from Logger implementation). Used by Logger internally - # - # source://yard//lib/yard/logging.rb#201 - def format_log(sev, _time, _prog, msg); end - - # source://logger/1.6.0/logger.rb#684 - def print_no_newline(msg); end - class << self + # @private + # + # source://yard//lib/yard/logging.rb#101 + def create_log_method(name); end + # The logger instance # # @return [Logger] the logger instance # - # source://yard//lib/yard/logging.rb#38 + # source://yard//lib/yard/logging.rb#76 def instance(pipe = T.unsafe(nil)); end end end @@ -7653,9 +7720,97 @@ end # # @since 0.8.2 # -# source://yard//lib/yard/logging.rb#13 +# source://yard//lib/yard/logging.rb#45 YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array) +# Log severity levels +# +# source://yard//lib/yard/logging.rb#10 +module YARD::Logger::Severity; end + +# Debugging log level +# +# source://yard//lib/yard/logging.rb#12 +YARD::Logger::Severity::DEBUG = T.let(T.unsafe(nil), Integer) + +# Error log level +# +# source://yard//lib/yard/logging.rb#21 +YARD::Logger::Severity::ERROR = T.let(T.unsafe(nil), Integer) + +# Fatal log level +# +# source://yard//lib/yard/logging.rb#24 +YARD::Logger::Severity::FATAL = T.let(T.unsafe(nil), Integer) + +# Information log level +# +# source://yard//lib/yard/logging.rb#15 +YARD::Logger::Severity::INFO = T.let(T.unsafe(nil), Integer) + +# @private +# +# source://yard//lib/yard/logging.rb#30 +YARD::Logger::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# Unknown log level +# +# source://yard//lib/yard/logging.rb#27 +YARD::Logger::Severity::UNKNOWN = T.let(T.unsafe(nil), Integer) + +# Warning log level +# +# source://yard//lib/yard/logging.rb#18 +YARD::Logger::Severity::WARN = T.let(T.unsafe(nil), Integer) + +# An OpenStruct compatible struct class that allows for basic access of attributes +# via +struct.attr_name+ and +struct.attr_name = value+. +# +# source://yard//lib/yard/open_struct.rb#4 +class YARD::OpenStruct + # @return [OpenStruct] a new instance of OpenStruct + # + # source://yard//lib/yard/open_struct.rb#5 + def initialize(hash = T.unsafe(nil)); end + + # source://yard//lib/yard/open_struct.rb#25 + def ==(other); end + + # source://yard//lib/yard/open_struct.rb#41 + def [](key); end + + # source://yard//lib/yard/open_struct.rb#37 + def []=(key, value); end + + # source://yard//lib/yard/open_struct.rb#33 + def dig(*keys); end + + # source://yard//lib/yard/open_struct.rb#45 + def each_pair(&block); end + + # source://yard//lib/yard/open_struct.rb#29 + def hash; end + + # source://yard//lib/yard/open_struct.rb#49 + def marshal_dump; end + + # source://yard//lib/yard/open_struct.rb#53 + def marshal_load(data); end + + # @private + # + # source://yard//lib/yard/open_struct.rb#10 + def method_missing(name, *args); end + + # source://yard//lib/yard/open_struct.rb#21 + def to_h; end + + private + + # source://yard//lib/yard/open_struct.rb#59 + def __cache_lookup__(name); end +end + # Generalized options class for passing around large amounts of options between objects. # # The options class exists for better visibility and documentability of options being @@ -8207,7 +8362,7 @@ end # # @see Processor#parse_remaining_files # -# source://yard//lib/yard/parser/source_parser.rb#21 +# source://yard//lib/yard/parser/source_parser.rb#20 class YARD::Parser::OrderedParser # Creates a new OrderedParser with the global state and a list # of files to parse. @@ -8219,30 +8374,30 @@ class YARD::Parser::OrderedParser # @param files [Array<String>] the list of files to parse # @return [OrderedParser] a new instance of OrderedParser # - # source://yard//lib/yard/parser/source_parser.rb#33 + # source://yard//lib/yard/parser/source_parser.rb#32 def initialize(global_state, files); end # @return [Array<String>] the list of remaining files to parse # - # source://yard//lib/yard/parser/source_parser.rb#23 + # source://yard//lib/yard/parser/source_parser.rb#22 def files; end # @return [Array<String>] the list of remaining files to parse # - # source://yard//lib/yard/parser/source_parser.rb#23 + # source://yard//lib/yard/parser/source_parser.rb#22 def files=(_arg0); end # Parses the remainder of the {#files} list. # # @see Processor#parse_remaining_files # - # source://yard//lib/yard/parser/source_parser.rb#42 + # source://yard//lib/yard/parser/source_parser.rb#41 def parse; end end # Raised when the parser sees a Ruby syntax error # -# source://yard//lib/yard/parser/source_parser.rb#13 +# source://yard//lib/yard/parser/source_parser.rb#12 class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end # Ruby parsing components. @@ -8687,6 +8842,9 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#430 def continue; end + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1116 + def dedent(str); end + # Returns the value of attribute exception_on_syntax_error. # # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 @@ -8711,7 +8869,7 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#488 def gets; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1272 def identify_comment; end # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#945 @@ -8723,13 +8881,13 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#980 def identify_identifier; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1130 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1145 def identify_number(start); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1111 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1126 def identify_quotation(initial_char); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1192 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1207 def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end # Returns the value of attribute indent. @@ -8776,10 +8934,10 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 def read_auto_clean_up=(_arg0); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1280 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1295 def read_escape; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1242 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 def skip_inner_expression; end # Returns the value of attribute skip_space. @@ -10968,7 +11126,7 @@ end # @see Handlers::Base # @see CodeObjects::Base # -# source://yard//lib/yard/parser/source_parser.rb#64 +# source://yard//lib/yard/parser/source_parser.rb#63 class YARD::Parser::SourceParser # @overload initialize # @return [SourceParser] a new instance of SourceParser @@ -11033,10 +11191,10 @@ class YARD::Parser::SourceParser # @since 0.5.6 # - # source://yard//lib/yard/parser/source_parser.rb#516 + # source://yard//lib/yard/parser/source_parser.rb#515 def parser_class; end - # source://yard//lib/yard/parser/source_parser.rb#501 + # source://yard//lib/yard/parser/source_parser.rb#500 def parser_type=(value); end # Guesses the parser type to use depending on the file extension. @@ -11044,14 +11202,14 @@ class YARD::Parser::SourceParser # @param filename [String] the filename to use to guess the parser type # @return [Symbol] a parser type that matches the filename # - # source://yard//lib/yard/parser/source_parser.rb#509 + # source://yard//lib/yard/parser/source_parser.rb#508 def parser_type_for_filename(filename); end # Runs a {Handlers::Processor} object to post process the parsed statements. # # @return [void] # - # source://yard//lib/yard/parser/source_parser.rb#491 + # source://yard//lib/yard/parser/source_parser.rb#490 def post_process; end class << self @@ -11224,7 +11382,7 @@ class YARD::Parser::SourceParser # {YARD::Logger} # @return [void] # - # source://yard//lib/yard/parser/source_parser.rb#100 + # source://yard//lib/yard/parser/source_parser.rb#99 def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end # Parses a string +content+ @@ -11238,10 +11396,10 @@ class YARD::Parser::SourceParser # @return [Symbol] the default parser type (defaults to :ruby) # - # source://yard//lib/yard/parser/source_parser.rb#86 + # source://yard//lib/yard/parser/source_parser.rb#85 def parser_type; end - # source://yard//lib/yard/parser/source_parser.rb#88 + # source://yard//lib/yard/parser/source_parser.rb#87 def parser_type=(value); end # @private @@ -11322,30 +11480,30 @@ end # # @since 0.9.0 # -# source://yard//lib/yard/parser/source_parser.rb#71 +# source://yard//lib/yard/parser/source_parser.rb#70 YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array) # Byte order marks for various encodings # # @since 0.7.0 # -# source://yard//lib/yard/parser/source_parser.rb#75 +# source://yard//lib/yard/parser/source_parser.rb#74 YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash) -# source://yard//lib/yard/parser/source_parser.rb#66 +# source://yard//lib/yard/parser/source_parser.rb#65 YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp) -# source://yard//lib/yard/parser/source_parser.rb#67 +# source://yard//lib/yard/parser/source_parser.rb#66 YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp) -# source://yard//lib/yard/parser/source_parser.rb#65 +# source://yard//lib/yard/parser/source_parser.rb#64 YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp) # Raised when an object is recognized but cannot be documented. This # generally occurs when the Ruby syntax used to declare an object is # too dynamic in nature. # -# source://yard//lib/yard/parser/source_parser.rb#10 +# source://yard//lib/yard/parser/source_parser.rb#9 class YARD::Parser::UndocumentableError < ::RuntimeError; end # The root path for YARD source libraries @@ -14620,42 +14778,42 @@ module YARD::Tags; end # @see tag:!method # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#461 +# source://yard//lib/yard/tags/directives.rb#460 class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#462 + # source://yard//lib/yard/tags/directives.rb#461 def after_parse; end protected # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#470 + # source://yard//lib/yard/tags/directives.rb#469 def method_name; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#476 + # source://yard//lib/yard/tags/directives.rb#475 def method_signature; end private # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#486 + # source://yard//lib/yard/tags/directives.rb#485 def create_attribute_data(object); end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#516 + # source://yard//lib/yard/tags/directives.rb#515 def readable?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#512 + # source://yard//lib/yard/tags/directives.rb#511 def writable?; end end @@ -14789,14 +14947,14 @@ end # @see Library.define_directive # @since 0.8.0 # -# source://yard//lib/yard/tags/directives.rb#23 +# source://yard//lib/yard/tags/directives.rb#22 class YARD::Tags::Directive # @param tag [Tag] the meta-data tag containing all input to the docstring # @param parser [DocstringParser] the docstring parser object # @return [Directive] a new instance of Directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#55 + # source://yard//lib/yard/tags/directives.rb#54 def initialize(tag, parser); end # Called after parsing all directives and tags in the docstring. Used @@ -14805,7 +14963,7 @@ class YARD::Tags::Directive # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#74 + # source://yard//lib/yard/tags/directives.rb#73 def after_parse; end # Called when processing the directive. Subclasses should implement @@ -14817,7 +14975,7 @@ class YARD::Tags::Directive # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#69 + # source://yard//lib/yard/tags/directives.rb#68 def call; end # Set this field to replace the directive definition inside of a docstring @@ -14829,7 +14987,7 @@ class YARD::Tags::Directive # @return [nil] if no expansion should take place for this directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#34 + # source://yard//lib/yard/tags/directives.rb#33 def expanded_text; end # Set this field to replace the directive definition inside of a docstring @@ -14841,7 +14999,7 @@ class YARD::Tags::Directive # @return [nil] if no expansion should take place for this directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#34 + # source://yard//lib/yard/tags/directives.rb#33 def expanded_text=(_arg0); end # @return [Handlers::Base, nil] the handler object the docstring parser @@ -14849,33 +15007,33 @@ class YARD::Tags::Directive # through {Parser::SourceParser}. # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#49 + # source://yard//lib/yard/tags/directives.rb#48 def handler; end # @return [CodeObjects::Base, nil] the object the parent docstring is # attached to. May be nil. # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#43 + # source://yard//lib/yard/tags/directives.rb#42 def object; end # @return [DocstringParser] the parser that is parsing all tag # information out of the docstring # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#38 + # source://yard//lib/yard/tags/directives.rb#37 def parser=(_arg0); end # @return [Tag] the meta-data tag containing data input to the directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#25 + # source://yard//lib/yard/tags/directives.rb#24 def tag; end # @return [Tag] the meta-data tag containing data input to the directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#25 + # source://yard//lib/yard/tags/directives.rb#24 def tag=(_arg0); end protected @@ -14883,14 +15041,14 @@ class YARD::Tags::Directive # @return [Boolean] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#80 + # source://yard//lib/yard/tags/directives.rb#79 def inside_directive?; end # @return [DocstringParser] the parser that is parsing all tag # information out of the docstring # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#38 + # source://yard//lib/yard/tags/directives.rb#37 def parser; end end @@ -14914,11 +15072,11 @@ end # @see tag:!group # @since 0.6.0 # -# source://yard//lib/yard/tags/directives.rb#105 +# source://yard//lib/yard/tags/directives.rb#104 class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive # @since 0.6.0 # - # source://yard//lib/yard/tags/directives.rb#106 + # source://yard//lib/yard/tags/directives.rb#105 def call; end end @@ -14939,11 +15097,11 @@ end # @see tag:!endgroup # @since 0.6.0 # -# source://yard//lib/yard/tags/directives.rb#128 +# source://yard//lib/yard/tags/directives.rb#127 class YARD::Tags::GroupDirective < ::YARD::Tags::Directive # @since 0.6.0 # - # source://yard//lib/yard/tags/directives.rb#129 + # source://yard//lib/yard/tags/directives.rb#128 def call; end end @@ -15708,12 +15866,12 @@ end # end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#258 +# source://yard//lib/yard/tags/directives.rb#257 class YARD::Tags::MacroDirective < ::YARD::Tags::Directive # @raise [TagFormatError] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#259 + # source://yard//lib/yard/tags/directives.rb#258 def call; end private @@ -15721,40 +15879,40 @@ class YARD::Tags::MacroDirective < ::YARD::Tags::Directive # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#288 + # source://yard//lib/yard/tags/directives.rb#287 def anonymous?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#277 + # source://yard//lib/yard/tags/directives.rb#276 def attach?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#283 + # source://yard//lib/yard/tags/directives.rb#282 def class_method?; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#292 + # source://yard//lib/yard/tags/directives.rb#291 def expand(macro_data); end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#308 + # source://yard//lib/yard/tags/directives.rb#307 def find_or_create; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#272 + # source://yard//lib/yard/tags/directives.rb#271 def new?; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#332 + # source://yard//lib/yard/tags/directives.rb#331 def warn; end end @@ -15787,49 +15945,49 @@ end # @see tag:!attribute # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#368 +# source://yard//lib/yard/tags/directives.rb#367 class YARD::Tags::MethodDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#373 + # source://yard//lib/yard/tags/directives.rb#372 def after_parse; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#371 + # source://yard//lib/yard/tags/directives.rb#370 def call; end protected # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#413 + # source://yard//lib/yard/tags/directives.rb#412 def create_object; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#381 + # source://yard//lib/yard/tags/directives.rb#380 def method_name; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#390 + # source://yard//lib/yard/tags/directives.rb#389 def method_signature; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#394 + # source://yard//lib/yard/tags/directives.rb#393 def sanitized_tag_signature; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#403 + # source://yard//lib/yard/tags/directives.rb#402 def use_indented_text; end end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#369 +# source://yard//lib/yard/tags/directives.rb#368 YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp) # source://yard//lib/yard/tags/option_tag.rb#4 @@ -15941,11 +16099,11 @@ end # # } # @since 0.8.0 # -# source://yard//lib/yard/tags/directives.rb#545 +# source://yard//lib/yard/tags/directives.rb#544 class YARD::Tags::ParseDirective < ::YARD::Tags::Directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#546 + # source://yard//lib/yard/tags/directives.rb#545 def call; end end @@ -16029,11 +16187,11 @@ end # def method2; end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#579 +# source://yard//lib/yard/tags/directives.rb#578 class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#580 + # source://yard//lib/yard/tags/directives.rb#579 def call; end end @@ -16064,7 +16222,7 @@ class YARD::Tags::Tag # @param name [String] optional key name which the tag refers to # @return [Tag] a new instance of Tag # - # source://yard//lib/yard/tags/tag.rb#44 + # source://yard//lib/yard/tags/tag.rb#45 def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end # Provides a plain English summary of the type specification, or nil @@ -16073,27 +16231,29 @@ class YARD::Tags::Tag # @return [String] a plain English description of the associated types # @return [nil] if no types are provided or not parsable # - # source://yard//lib/yard/tags/tag.rb#65 + # source://yard//lib/yard/tags/tag.rb#66 def explain_types; end # @return [String] a name associated with the tag + # @return [nil] if no tag name is supplied # - # source://yard//lib/yard/tags/tag.rb#26 + # source://yard//lib/yard/tags/tag.rb#27 def name; end # @return [String] a name associated with the tag + # @return [nil] if no tag name is supplied # - # source://yard//lib/yard/tags/tag.rb#26 + # source://yard//lib/yard/tags/tag.rb#27 def name=(_arg0); end # @return [CodeObjects::Base] the associated object # - # source://yard//lib/yard/tags/tag.rb#29 + # source://yard//lib/yard/tags/tag.rb#30 def object; end # @return [CodeObjects::Base] the associated object # - # source://yard//lib/yard/tags/tag.rb#29 + # source://yard//lib/yard/tags/tag.rb#30 def object=(_arg0); end # @return [String] the name of the tag @@ -16124,7 +16284,7 @@ class YARD::Tags::Tag # @return [String] the first of the list of specified types # @see #types # - # source://yard//lib/yard/tags/tag.rb#56 + # source://yard//lib/yard/tags/tag.rb#57 def type; end # @return [Array<String>] a list of types associated with the tag @@ -16315,11 +16475,11 @@ end # def method2; end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#611 +# source://yard//lib/yard/tags/directives.rb#610 class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#612 + # source://yard//lib/yard/tags/directives.rb#611 def call; end end @@ -16335,7 +16495,7 @@ module YARD::Templates; end # * To render a template, call {render}. # * To register a template path in the lookup paths, call {register_template_path}. # -# source://yard//lib/yard/templates/engine.rb#12 +# source://yard//lib/yard/templates/engine.rb#11 module YARD::Templates::Engine class << self # Passes a set of objects to the +:fulldoc+ template for full documentation generation. @@ -16347,7 +16507,7 @@ module YARD::Templates::Engine # @param options [Hash] (see {render}) # @return [void] # - # source://yard//lib/yard/templates/engine.rb#101 + # source://yard//lib/yard/templates/engine.rb#100 def generate(objects, options = T.unsafe(nil)); end # Registers a new template path in {template_paths} @@ -16355,7 +16515,7 @@ module YARD::Templates::Engine # @param path [String] a new template path # @return [void] # - # source://yard//lib/yard/templates/engine.rb#21 + # source://yard//lib/yard/templates/engine.rb#20 def register_template_path(path); end # Renders a template on a {CodeObjects::Base code object} using @@ -16376,7 +16536,7 @@ module YARD::Templates::Engine # @param options [Hash] the options hash # @return [String] the rendered template # - # source://yard//lib/yard/templates/engine.rb#82 + # source://yard//lib/yard/templates/engine.rb#81 def render(options = T.unsafe(nil)); end # Creates a template module representing the path. Searches on disk @@ -16390,7 +16550,7 @@ module YARD::Templates::Engine # {template_paths} on disk. # @return [Template] the module representing the template # - # source://yard//lib/yard/templates/engine.rb#35 + # source://yard//lib/yard/templates/engine.rb#34 def template(*path); end # Forces creation of a template at +path+ within a +full_path+. @@ -16399,17 +16559,17 @@ module YARD::Templates::Engine # @param full_paths [Array<String>] the full path on disk of the template # @return [Template] the template module representing the +path+ # - # source://yard//lib/yard/templates/engine.rb#53 + # source://yard//lib/yard/templates/engine.rb#52 def template!(path, full_paths = T.unsafe(nil)); end # @return [Array<String>] the list of registered template paths # - # source://yard//lib/yard/templates/engine.rb#15 + # source://yard//lib/yard/templates/engine.rb#14 def template_paths; end # @return [Array<String>] the list of registered template paths # - # source://yard//lib/yard/templates/engine.rb#15 + # source://yard//lib/yard/templates/engine.rb#14 def template_paths=(_arg0); end # Serializes the results of a block with a +serializer+ object. @@ -16420,7 +16580,7 @@ module YARD::Templates::Engine # @yield a block whose result will be serialize # @yieldreturn [String] the contents to serialize # - # source://yard//lib/yard/templates/engine.rb#115 + # source://yard//lib/yard/templates/engine.rb#114 def with_serializer(object, serializer); end private @@ -16435,7 +16595,7 @@ module YARD::Templates::Engine # @return [Array<String>] a list of full paths that are existing # candidates for a template module # - # source://yard//lib/yard/templates/engine.rb#161 + # source://yard//lib/yard/templates/engine.rb#160 def find_template_paths(from_template, path); end # Sets default options on the options hash @@ -16446,7 +16606,7 @@ module YARD::Templates::Engine # @param options [Hash] the options hash # @return [void] # - # source://yard//lib/yard/templates/engine.rb#141 + # source://yard//lib/yard/templates/engine.rb#140 def set_default_options(options = T.unsafe(nil)); end # The name of the module that represents a +path+ @@ -16454,7 +16614,7 @@ module YARD::Templates::Engine # @param path [String] the path to generate a module name for # @return [String] the module name # - # source://yard//lib/yard/templates/engine.rb#176 + # source://yard//lib/yard/templates/engine.rb#175 def template_module_name(path); end end end @@ -17865,7 +18025,7 @@ end # # @see CLI::YardocOptions # -# source://yard//lib/yard/templates/template_options.rb#10 +# source://yard//lib/yard/templates/template_options.rb#9 class YARD::Templates::TemplateOptions < ::YARD::Options # @return [OpenStruct] an open struct containing any global state across all # generated objects in a template. @@ -17908,7 +18068,7 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Boolean] whether a mixin matches the embed_mixins list # @return [nil] if the mixin is not a module object # - # source://yard//lib/yard/templates/template_options.rb#78 + # source://yard//lib/yard/templates/template_options.rb#77 def embed_mixins_match?(mixin); end # @return [Symbol] the template output format @@ -17955,12 +18115,12 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Boolean] whether the page is the "index" # - # source://yard//lib/yard/templates/template_options.rb#64 + # source://yard//lib/yard/templates/template_options.rb#63 def index; end # @return [Boolean] whether the page is the "index" # - # source://yard//lib/yard/templates/template_options.rb#64 + # source://yard//lib/yard/templates/template_options.rb#63 def index=(_arg0); end # @return [Symbol] the markup format to use when parsing docstrings @@ -17975,51 +18135,51 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Class] the markup provider class for the markup format # - # source://yard//lib/yard/templates/template_options.rb#30 + # source://yard//lib/yard/templates/template_options.rb#29 def markup_provider; end # @return [Class] the markup provider class for the markup format # - # source://yard//lib/yard/templates/template_options.rb#30 + # source://yard//lib/yard/templates/template_options.rb#29 def markup_provider=(_arg0); end # @deprecated use {#highlight} instead. # @return [Boolean] whether highlighting should be ignored # - # source://yard//lib/yard/templates/template_options.rb#57 + # source://yard//lib/yard/templates/template_options.rb#56 def no_highlight; end - # source://yard//lib/yard/templates/template_options.rb#58 + # source://yard//lib/yard/templates/template_options.rb#57 def no_highlight=(value); end # @return [CodeObjects::Base] the main object being generated in the template # - # source://yard//lib/yard/templates/template_options.rb#38 + # source://yard//lib/yard/templates/template_options.rb#37 def object; end # @return [CodeObjects::Base] the main object being generated in the template # - # source://yard//lib/yard/templates/template_options.rb#38 + # source://yard//lib/yard/templates/template_options.rb#37 def object=(_arg0); end # @return [CodeObjects::Base] the owner of the generated object # - # source://yard//lib/yard/templates/template_options.rb#41 + # source://yard//lib/yard/templates/template_options.rb#40 def owner; end # @return [CodeObjects::Base] the owner of the generated object # - # source://yard//lib/yard/templates/template_options.rb#41 + # source://yard//lib/yard/templates/template_options.rb#40 def owner=(_arg0); end # @return [String] the title of a given page # - # source://yard//lib/yard/templates/template_options.rb#61 + # source://yard//lib/yard/templates/template_options.rb#60 def page_title; end # @return [String] the title of a given page # - # source://yard//lib/yard/templates/template_options.rb#61 + # source://yard//lib/yard/templates/template_options.rb#60 def page_title=(_arg0); end # @return [Boolean] whether serialization should be performed @@ -18035,13 +18195,13 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Serializers::Base] the serializer used to generate links and serialize # output. Serialization output only occurs if {#serialize} is +true+. # - # source://yard//lib/yard/templates/template_options.rb#51 + # source://yard//lib/yard/templates/template_options.rb#50 def serializer; end # @return [Serializers::Base] the serializer used to generate links and serialize # output. Serialization output only occurs if {#serialize} is +true+. # - # source://yard//lib/yard/templates/template_options.rb#51 + # source://yard//lib/yard/templates/template_options.rb#50 def serializer=(_arg0); end # @return [Symbol] the template name used to render output @@ -18056,22 +18216,22 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Symbol] the template type used to generate output # - # source://yard//lib/yard/templates/template_options.rb#44 + # source://yard//lib/yard/templates/template_options.rb#43 def type; end # @return [Symbol] the template type used to generate output # - # source://yard//lib/yard/templates/template_options.rb#44 + # source://yard//lib/yard/templates/template_options.rb#43 def type=(_arg0); end # @return [Verifier] the verifier object # - # source://yard//lib/yard/templates/template_options.rb#89 + # source://yard//lib/yard/templates/template_options.rb#88 def verifier; end # @return [Verifier] the verifier object # - # source://yard//lib/yard/templates/template_options.rb#89 + # source://yard//lib/yard/templates/template_options.rb#88 def verifier=(_arg0); end end From 021a4008003162dac32a266e98718af9462b2c21 Mon Sep 17 00:00:00 2001 From: Max VelDink <maxveldink@gmail.com> Date: Sun, 3 Nov 2024 04:38:48 -0500 Subject: [PATCH 3/7] fix: from rubocop and compiler changes --- lib/typed/result.rb | 4 ++-- test/test_data/failure.out | 4 +++- test/test_data/success.out | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/typed/result.rb b/lib/typed/result.rb index 73f6f9a..66aa341 100644 --- a/lib/typed/result.rb +++ b/lib/typed/result.rb @@ -76,7 +76,7 @@ class Success < Result .returns(Typed::Success[T.type_parameter(:T)]) end def self.new(payload) - super(payload) + super end sig { returns(Typed::Success[NilClass]) } @@ -151,7 +151,7 @@ class Failure < Result .returns(Typed::Failure[T.type_parameter(:T)]) end def self.new(error) - super(error) + super end sig { returns(Typed::Failure[NilClass]) } diff --git a/test/test_data/failure.out b/test/test_data/failure.out index 4bc198b..6de3f07 100644 --- a/test/test_data/failure.out +++ b/test/test_data/failure.out @@ -12,6 +12,8 @@ test/test_data/failure.rb:14: Expected `Typed::Result[Integer, String]` but foun test/test_data/failure.rb:12: 12 | Typed::Failure.new(1) ^^^^^^^^^^^^^^^^^^^^^ + Detailed explanation: + `Integer` is not a subtype of `String` for covariant type member `Typed::Result::Error` test/test_data/failure.rb:26: Expected `Integer` but found `String("error")` for argument `error` https://srb.help/7002 26 | Typed::Failure[Integer].new("error") @@ -36,6 +38,6 @@ test/test_data/failure.rb:33: Method `upcase` does not exist on `Integer` https: test/test_data/failure.rb:33: Replace with `phase` 33 | success.payload_or(1).upcase ^^^^^^ - https://github.com/sorbet/sorbet/tree/fb09bed285d9bb073a4ab129e51d7fcbc8d8c548/rbi/core/integer.rbi#L957: Defined here + https://github.com/sorbet/sorbet/tree/0ab8f3c29260f8ecee31aa960de3692419e2d3c3/rbi/core/integer.rbi#L957: Defined here 957 | def phase(); end ^^^^^^^^^^^ diff --git a/test/test_data/success.out b/test/test_data/success.out index bd72f1b..c1d1efa 100644 --- a/test/test_data/success.out +++ b/test/test_data/success.out @@ -12,6 +12,8 @@ test/test_data/success.rb:14: Expected `Typed::Result[Integer, String]` but foun test/test_data/success.rb:12: 12 | Typed::Failure.new("") ^^^^^^^^^^^^^^^^^^^^^^ + Detailed explanation: + `String` is not a subtype of `Integer` for covariant type member `Typed::Result::Payload` test/test_data/success.rb:26: Expected `Integer` but found `String("success")` for argument `payload` https://srb.help/7002 26 | Typed::Success[Integer].new("success") @@ -36,6 +38,6 @@ test/test_data/success.rb:33: Method `upcase` does not exist on `Integer` compon test/test_data/success.rb:33: Replace with `phase` 33 | success.payload_or(1).upcase ^^^^^^ - https://github.com/sorbet/sorbet/tree/fb09bed285d9bb073a4ab129e51d7fcbc8d8c548/rbi/core/integer.rbi#L957: Defined here + https://github.com/sorbet/sorbet/tree/0ab8f3c29260f8ecee31aa960de3692419e2d3c3/rbi/core/integer.rbi#L957: Defined here 957 | def phase(); end ^^^^^^^^^^^ From 8a04f74f9b1c9a00218222f55eccd2246a76762b Mon Sep 17 00:00:00 2001 From: Max VelDink <maxveldink@gmail.com> Date: Sun, 3 Nov 2024 04:41:30 -0500 Subject: [PATCH 4/7] fix: typo --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 13cc2c3..c6697a3 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -# Specify your gem's dependencies in activerecord-ejection_seat.gemspec +# Specify your gem's dependencies in sorbet-result.gemspec gemspec group :development do From 2c202b9a5746579919dfa280a37ffa19b4c2539d Mon Sep 17 00:00:00 2001 From: Max VelDink <maxveldink@gmail.com> Date: Sun, 3 Nov 2024 04:47:01 -0500 Subject: [PATCH 5/7] chore: bump bundler version --- Gemfile.lock | 2 +- sorbet-result.gemspec | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4f867c6..a969250 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,4 +120,4 @@ DEPENDENCIES tapioca BUNDLED WITH - 2.4.12 + 2.5.18 diff --git a/sorbet-result.gemspec b/sorbet-result.gemspec index ae8d004..a36d7d3 100644 --- a/sorbet-result.gemspec +++ b/sorbet-result.gemspec @@ -30,6 +30,4 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_runtime_dependency "sorbet-runtime", "~> 0.5" - - spec.add_development_dependency "minitest", "~> 5.22" end From 71cca1aba8de09c098620571aa4cfdf2c8734768 Mon Sep 17 00:00:00 2001 From: Max VelDink <maxveldink@gmail.com> Date: Sun, 3 Nov 2024 04:47:16 -0500 Subject: [PATCH 6/7] chore!: set minimum ruby version to 3.1 --- .github/workflows/main.yml | 1 - .ruby-version | 2 +- .standard.yml | 2 +- .tool-versions | 2 +- sorbet-result.gemspec | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c983670..7aa9e67 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,6 @@ jobs: strategy: matrix: ruby: - - '3.0' - '3.1' - '3.2' - '3.3' diff --git a/.ruby-version b/.ruby-version index 15a2799..fa7adc7 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.0 +3.3.5 diff --git a/.standard.yml b/.standard.yml index 6d9ed5e..8e6e9c4 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1,5 +1,5 @@ parallel: true -ruby_version: 3.0 +ruby_version: 3.1 ignore: - 'vendor/**/*' plugins: diff --git a/.tool-versions b/.tool-versions index 3294aed..1dd1998 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -ruby 3.3.0 +ruby 3.3.5 diff --git a/sorbet-result.gemspec b/sorbet-result.gemspec index a36d7d3..7cbc500 100644 --- a/sorbet-result.gemspec +++ b/sorbet-result.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |spec| spec.summary = "Adds T::Result to sorbet-runtime, which is a basic, strongly-typed monad" spec.homepage = "https://github.com/maxveldink/sorbet-result" spec.license = "MIT" - spec.required_ruby_version = ">= 3.0" + spec.required_ruby_version = ">= 3.1" spec.metadata["allowed_push_host"] = "https://rubygems.org" spec.metadata["rubygems_mfa_required"] = "true" From 851a7b41035000e10875b61573829c97865c458c Mon Sep 17 00:00:00 2001 From: Max VelDink <maxveldink@gmail.com> Date: Sun, 3 Nov 2024 04:49:26 -0500 Subject: [PATCH 7/7] docs: update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c8354..6c5541e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +- **POTENTIALLY BREAKING** Remove support for Ruby < 3.1. + ## [1.1.0] - 2024-02-21 ### Added